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

Add ddp_find_unused_parameters_true alias in Fabric's DDPStrategy #20125

Merged
merged 11 commits into from
Aug 7, 2024

Conversation

01AbhiSingh
Copy link
Contributor

@01AbhiSingh 01AbhiSingh commented Jul 24, 2024

What does this PR do?

Fixes #20037

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Following changes were made in the src/lightning/fabric/strategies/ddp.py :

strategy_registry.register(
    "ddp_find_unused_parameters_true",
    cls,
    description="Alias for `ddp_find_unused_parameters_true` and `start_method='popen'`",
    find_unused_parameters = True,
    start_method = "popen",
)

Tagging @awaelchli for visibility.
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

📚 Documentation preview 📚: https://pytorch-lightning--20125.org.readthedocs.build/en/20125/

@github-actions github-actions bot added the fabric lightning.fabric.Fabric label Jul 24, 2024
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89%. Comparing base (cf24a19) to head (3285d7a).
Report is 29 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #20125   +/-   ##
=======================================
  Coverage      89%      89%           
=======================================
  Files         267      267           
  Lines       23076    23077    +1     
=======================================
+ Hits        20577    20578    +1     
  Misses       2499     2499           

Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

@01AbhiSingh That's great!
Now you need to update the tests, you can see at the bottom of the PR what's failing.

These two tests need to be updated:

FAILED test_cli.py::test_run_get_supported_strategies
FAILED strategies/test_registry.py::test_available_strategies_in_registry

@awaelchli awaelchli changed the title Ddp strategy alias added Add ddp_find_unused_parameters_true alias in Fabric's DDPStrategy Jul 27, 2024
@awaelchli awaelchli added community This PR is from the community feature Is an improvement or enhancement bug Something isn't working and removed feature Is an improvement or enhancement labels Jul 27, 2024
@awaelchli awaelchli added this to the 2.4 milestone Jul 27, 2024
@awaelchli
Copy link
Contributor

Hey @01AbhiSingh are you able to bring this over the finish line? If help is needed, let me know 👍

@01AbhiSingh
Copy link
Contributor Author

Hey @01AbhiSingh are you able to bring this over the finish line? If help is needed, let me know 👍

Hii @awaelchli. I will update the PR asap, Sorry I got stuck with my end Semester exams. Will get back to you asap.

@01AbhiSingh
Copy link
Contributor Author

Hii @awaelchli . I tried to understand the remaining two tests that are not passing by looking at the details, but was not able to understand the issue, why is it failing. It would be very helpful if you could help. I was able to clear the tests which you mentioned here below.

@01AbhiSingh That's great! Now you need to update the tests, you can see at the bottom of the PR what's failing.

These two tests need to be updated:

FAILED test_cli.py::test_run_get_supported_strategies
FAILED strategies/test_registry.py::test_available_strategies_in_registry

@awaelchli awaelchli removed this from the 2.4 milestone Aug 7, 2024
@awaelchli awaelchli added this to the 2.4.x milestone Aug 7, 2024
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

Looks very good, thanks. Well done!

@awaelchli awaelchli merged commit be0ae06 into Lightning-AI:master Aug 7, 2024
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community This PR is from the community fabric lightning.fabric.Fabric
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ddp_find_unused_parameters_true strategy alias in Fabric
2 participants