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

Merged
merged 1 commit into from
Jul 15, 2025
Merged

refactor diloco test #232

merged 1 commit into from
Jul 15, 2025

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.

@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
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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do you mean by main check? :)

@@ -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

Copy link
Member

Choose a reason for hiding this comment

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

agree with this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved it to test folder. will start putting everything test related there

@tushar00jain tushar00jain force-pushed the pr232 branch 2 times, most recently from 0ce2173 to 56893f8 Compare July 15, 2025 17:29
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
@tushar00jain tushar00jain merged commit b8fe07e into pytorch:main Jul 15, 2025
17 of 18 checks passed
@tushar00jain tushar00jain deleted the pr232 branch July 15, 2025 19:47
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.

4 participants