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

Register backward hook for the whole optim_dict to enable working at multi schedule pp #780

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mori360
Copy link
Contributor

@mori360 mori360 commented Jan 7, 2025

Solve the bug at #777.
Python closures capture by reference to the identifier, not value. So that the hook would only be registered at the last model_parts if there are many.
Change the optim_dict to include all the optims so that hooks could be registered successfully.

TODO: update OptimizerContainer to support multi scheduler pp better

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants