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

zyaoj/harden lr scheduler #932

Merged
merged 5 commits into from
Dec 20, 2024
Merged

zyaoj/harden lr scheduler #932

merged 5 commits into from
Dec 20, 2024

Conversation

zyaoj
Copy link
Contributor

@zyaoj zyaoj commented Dec 20, 2024

What does this PR do? Please describe:

  • Fix mypy bypass for cosine annealing lr scheduler
  • Add unit tests

Test coverage before this PR:

---------- coverage: platform linux, python 3.10.14-final-0 ----------
Name                                                       Stmts   Miss  Cover   Missing
----------------------------------------------------------------------------------------
src/fairseq2/optim/lr_scheduler/factory.py                   104     31    70%   49-51, 84-113, 139, 154, 182-191, 222-231

Test coverage after this PR:

---------- coverage: platform linux, python 3.10.14-final-0 ----------
Name                                                       Stmts   Miss  Cover   Missing
----------------------------------------------------------------------------------------
src/fairseq2/optim/lr_scheduler/factory.py                   104      5    95%   49-51, 109, 139, 154

Does your PR introduce any breaking changes? If yes, please list them:
N/A

Check list:

  • Was the content of this PR discussed and approved via a GitHub issue? (no need for typos or documentation improvements)
  • Did you read the contributor guideline?
  • Did you make sure that 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?
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (no need for typos, documentation, or minor internal changes)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 20, 2024
@zyaoj zyaoj marked this pull request as ready for review December 20, 2024 16:01
@zyaoj zyaoj requested a review from cbalioglu as a code owner December 20, 2024 16:01
@zyaoj zyaoj requested review from uralik and cbalioglu and removed request for cbalioglu December 20, 2024 16:01
Copy link
Contributor

@cbalioglu cbalioglu left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for the improvements and tests!

@cbalioglu cbalioglu merged commit 49e20be into main Dec 20, 2024
15 checks passed
@cbalioglu cbalioglu deleted the zyaoj/harden-lr-scheduler branch December 20, 2024 20:07
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 Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants