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

manager_integ_tests: added LocalSGD integration test #55

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

d4l3k
Copy link
Member

@d4l3k d4l3k commented Dec 20, 2024

This adds an integration test for LocalSGD that tests one of the replicas crashing and recovering.

This runs for 8 steps with sync_every=2 and 4 manager steps.

This mostly is refactoring the integration tests into a more flexible Runner class and adds a new local_sgd_train_loop. It does fix one bug in LocalSGD where we don't detach the gradient before running the all reduce.

cc @Jackmin801

Test plan:

pytest torchft/manager_integ_test.py -k local_sgd -s -x

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 20, 2024
@d4l3k d4l3k merged commit f31d3b1 into main Dec 20, 2024
6 checks passed
@d4l3k d4l3k deleted the d4l3k/local_sgd_integ branch December 20, 2024 23:10
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