Skip to content

refactor diloco test #232

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

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

refactor diloco test #232

wants to merge 2 commits into from

Conversation

tushar00jain
Copy link
Contributor

@tushar00jain tushar00jain commented Jul 14, 2025

Summary:

  • move the training loop to a separate file
  • convert it into a class so that methods can be overridden without having to duplicate code

Stack created with Sapling. Best reviewed with ReviewStack.

Summary:
- change to pass multiple outer optimizers in the tests
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 14, 2025
@tushar00jain tushar00jain requested review from d4l3k and H-Huang and removed request for d4l3k July 14, 2025 17:49
Summary:
- move the training loop to a separate file
- convert it into a class so that methods can be overridden without having to duplicate code
Copy link
Member

@d4l3k d4l3k left a comment

Choose a reason for hiding this comment

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

LGTM

if self.manager.current_step() >= 4:
break

return all_state_dicts
Copy link
Member

Choose a reason for hiding this comment

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

Not directly related to this PR but wonder if we should just add a main check and use this for manual testing

@@ -0,0 +1,310 @@
import copy
Copy link
Member

Choose a reason for hiding this comment

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

Does this makes sense under torchft/? Should we add an underscore to indicate it's internal or move it under some testing dir or something?

Just don't want folks getting confused and importing this directly for whatever reason

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