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

Recent LR Scheduler change does not account for inference/evaluation #1059

Closed
dashstander opened this issue Oct 17, 2023 · 0 comments · Fixed by #1060
Closed

Recent LR Scheduler change does not account for inference/evaluation #1059

dashstander opened this issue Oct 17, 2023 · 0 comments · Fixed by #1060
Assignees
Labels
bug Something isn't working

Comments

@dashstander
Copy link
Contributor

The function setup_model_and_optimizer is used for evaluation and inference as a hack to initialize DeepSpeed properly. However, there was a recent change to make sure that the LR scheduler is properly updated after resuming training from a checkpoint that assumes there will be an lr_scheduler object. Right attempting to run evaluate.py from NeoX main gives

File "/mnt/ssd-1/dashiell/gpt-neox/megatron/utils.py", line 448, in setup_for_inference_or_eval
        lr_scheduler.optimizer = model.optimizerlr_scheduler.optimizer = model.optimizer

    lr_scheduler.optimizer = model.optimizerAttributeError
AttributeError: : 'NoneType' object has no attribute 'optimizer''NoneType' object has no attribute 'optimizer'
@dashstander dashstander added the bug Something isn't working label Oct 17, 2023
@dashstander dashstander self-assigned this Oct 17, 2023
@dashstander dashstander linked a pull request Oct 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant