Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Fix un-usability of manual optimization in Flash. #1342

Conversation

karthikrangasai
Copy link
Contributor

What does this PR do?

In a Flash Task, self.optimizers() and self.lr_schedulers() point to the respective Flash Registry instead of returning the optimizers and the lr schedulers used by the training job. This stands in the way of performing manual optimization.

This PR attempts to fix this issue.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • 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?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #1342 (c832c8a) into master (6297566) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1342      +/-   ##
==========================================
- Coverage   92.68%   92.68%   -0.01%     
==========================================
  Files         286      286              
  Lines       12802    12802              
==========================================
- Hits        11866    11865       -1     
- Misses        936      937       +1     
Flag Coverage Δ
unittests 92.68% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
flash/core/model.py 91.19% <100.00%> (ø)
flash/text/question_answering/model.py 93.19% <0.00%> (-0.69%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6297566...c832c8a. Read the comment docs.

Copy link
Member

@justusschock justusschock left a comment

Choose a reason for hiding this comment

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

LGTM! Can you also add an entry to the changelog?

@karthikrangasai
Copy link
Contributor Author

Sure, I'll update it.

@karthikrangasai
Copy link
Contributor Author

Hello @justusschock , could you please re-run the failed tests. They have failed because of some Omegaconf issue and I think my changes don't interfere with failure of the runs.

Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

LGTM 😃

@ethanwharris ethanwharris added the bug / fix Something isn't working label Jun 6, 2022
@ethanwharris ethanwharris added this to the 0.7.x milestone Jun 6, 2022
@ethanwharris ethanwharris merged commit 4bddc08 into Lightning-Universe:master Jun 6, 2022
MrShevan pushed a commit to MrShevan/lightning-flash that referenced this pull request Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug / fix Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants