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

Migrated changes that apply to loading model and optimizer #54

Merged
merged 5 commits into from
Feb 19, 2024

Conversation

josephattieh
Copy link
Collaborator

@josephattieh josephattieh commented Feb 8, 2024

This allows to load model and optimizer from checkpoint.
This does not reload the data state.

Copy link
Collaborator

@TimotheeMickus TimotheeMickus left a comment

Choose a reason for hiding this comment

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

LGTM, but

  • you do have some linting errors that still need fixing
  • I would like a confirmation that this has been tested
  • this could benefit from setting up an explicit unit test

@@ -1,5 +1,6 @@
import os
from collections import deque
from glob import glob
from collections import deque, defaultdict
Copy link
Collaborator

Choose a reason for hiding this comment

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

defaultdict is imported but not used..?

@@ -332,6 +350,9 @@ def build_task_specific_model(
if uses_adapters(model_opts):
logger.info('Creating adapters...')
create_all_adapters(nmt_model, model_opts, task_queue_manager)
if checkpoint:
# TODO: plug in properly
Copy link
Collaborator

Choose a reason for hiding this comment

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

this TODO probably worth creating another issue

@josephattieh josephattieh requested review from TimotheeMickus and jrvc and removed request for jrvc February 13, 2024 19:50
@josephattieh
Copy link
Collaborator Author

LGTM, but

  • you do have some linting errors that still need fixing
  • I would like a confirmation that this has been tested
  • this could benefit from setting up an explicit unit test

The linting errors have been fixed and the feature has been tested!

Copy link
Member

@jrvc jrvc left a comment

Choose a reason for hiding this comment

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

Thanks for the hard work :)
this looks good to me

@josephattieh josephattieh merged commit c6a193b into main Feb 19, 2024
2 checks passed
@TimotheeMickus TimotheeMickus deleted the reload_model_and_optim branch March 4, 2024 12:38
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.

3 participants