Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NeMo1 -> NeMo2 checkpoint conversion #180

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

jstjohn
Copy link
Collaborator

@jstjohn jstjohn commented Sep 21, 2024

Summary

Nemo1 to nemo2 checkpoint conversion

Details

Usage

py.test sub-packages/bionemo-geneformer/tests/bionemo/geneformer/test_model.py::test_nemo1_checkpoint_conversion

This could either be used in an interactive session or placed in a script to one off convert some specific checkpoint in nemo1 format to a checkpoint in nemo2 format.

Testing

Test checks that the checkpoint can be converted by this function, and then pointing a model at the new nemo2 checkpoint works as expected when doing fine-tuning resumption.

Tests for these changes can be run via:

py.test sub-packages/bionemo-geneformer/tests/bionemo/geneformer/test_model.py::test_nemo1_checkpoint_conversion

@jstjohn jstjohn self-assigned this Sep 21, 2024
@jstjohn jstjohn marked this pull request as draft September 21, 2024 00:10
@jstjohn jstjohn force-pushed the jstjohn/nemo1-checkpoint-connector branch 2 times, most recently from 6d17206 to 3b6be46 Compare September 25, 2024 19:24
@jstjohn
Copy link
Collaborator Author

jstjohn commented Sep 25, 2024

/build-ci

@jstjohn jstjohn force-pushed the jstjohn/nemo1-checkpoint-connector branch from 144a0c4 to 11bca4f Compare September 26, 2024 23:34
@jstjohn
Copy link
Collaborator Author

jstjohn commented Sep 26, 2024

/build-ci

@jstjohn jstjohn marked this pull request as ready for review September 26, 2024 23:38
@jstjohn
Copy link
Collaborator Author

jstjohn commented Sep 26, 2024

/build-ci

@jstjohn
Copy link
Collaborator Author

jstjohn commented Sep 27, 2024 via email

@jstjohn
Copy link
Collaborator Author

jstjohn commented Sep 27, 2024 via email

@jstjohn
Copy link
Collaborator Author

jstjohn commented Sep 27, 2024

/build-ci

@jstjohn
Copy link
Collaborator Author

jstjohn commented Sep 30, 2024

/build-ci

3rdparty/NeMo Outdated Show resolved Hide resolved
@jstjohn
Copy link
Collaborator Author

jstjohn commented Oct 1, 2024 via email

@jstjohn
Copy link
Collaborator Author

jstjohn commented Oct 1, 2024

/build-ci

@jstjohn
Copy link
Collaborator Author

jstjohn commented Oct 1, 2024

/build-ci

Comment on lines +26 to +37
"""Usage:
# ESM2 3B
## ESM2 3b checkpoint conversion:
python scripts/protein/esm2/make_nemo2_checkpoints.py --s3-path s3://bionemo-ci/models/esm2nv_3B_converted.nemo --output-path ~/.cache/bionemo/checkpoints/esm2_3B_nemo2
## ESM2 3b checkpoint upload (recursive since it is a directory)
aws s3 cp --recursive ~/.cache/bionemo/checkpoints/esm2_3B_nemo2 s3://bionemo-ci/models/esm2_3B_nemo2
# ESM2 650M
## ESM2 650M checkpoint conversion
python scripts/protein/esm2/make_nemo2_checkpoints.py --s3-path s3://bionemo-ci/models/esm2nv_650M_converted.nemo --output-path ~/.cache/bionemo/checkpoints/esm2_650M_nemo2
## ESM2 650M checkpoint upload
aws s3 cp --recursive ~/.cache/bionemo/checkpoints/esm2_650M_nemo2 s3://bionemo-ci/models/esm2_650M_nemo2
"""
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO add the steps to create the .tar.gz files:

cd esm2_650M_nemo2 && tar czvf ../esm2_650M_nemo2.tar.gz *

for example.

@malcolmgreaves malcolmgreaves marked this pull request as draft October 9, 2024 20:23
@malcolmgreaves malcolmgreaves marked this pull request as ready for review October 9, 2024 20:26
@jstjohn
Copy link
Collaborator Author

jstjohn commented Nov 12, 2024

/build-ci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants