Skip to content

Conversation

@balancap
Copy link
Contributor

Passing optimizer_cls to OptimizersContainer and OptimizersInBackwardContainer constructors, instead of name.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 24, 2025
@balancap
Copy link
Contributor Author

balancap commented Feb 24, 2025

As discussed in #876 , generalizing OptimizersContainer to enable re-use by users with different type of optimizers.

Additionally, I removed _create_optimizer, directly integrating the small Optimizer dict in the build function.

Copy link
Contributor

@tianyu-l tianyu-l left a comment

Choose a reason for hiding this comment

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

LGTM!

  1. Please fix CI breakage.
  2. Could you rebase, since #881 has been merged?

…zer class.

Passing `optimizer_cls` to `OptimizersContainer` and `OptimizersInBackwardContainer` constructors, instead of `name`.
@balancap balancap force-pushed the generalize-optimizers-container branch from 2523768 to 99cc449 Compare February 25, 2025 15:03
@balancap
Copy link
Contributor Author

Thanks @tianyu-l , should be good now after rebase. My bad forgotting to run the unit tests before pushing the final commit!

@tianyu-l tianyu-l merged commit 82629f8 into pytorch:main Feb 25, 2025
6 checks passed
MaxiBoether pushed a commit to eth-easl/torchtitan-mixtera that referenced this pull request Apr 17, 2025
…zer class. (pytorch#884)

Passing `optimizer_cls` to `OptimizersContainer` and
`OptimizersInBackwardContainer` constructors, instead of `name`.
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.

3 participants