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 linear learning rate scheduler #1443

Merged
merged 4 commits into from
Mar 12, 2024
Merged

Add linear learning rate scheduler #1443

merged 4 commits into from
Mar 12, 2024

Conversation

astral4
Copy link
Contributor

@astral4 astral4 commented Mar 10, 2024

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

#1198

Changes

This PR adds a linear learning rate scheduler to Burn, which didn't exist previously. This makes progress towards the issue linked above.

Testing

I wrote tests to confirm that invalid config parameters are rejected and that the learning rate changes over iterations as expected. I successfully ran run-checks.sh all. I also checked the appearance of the new documentation via cargo doc --open.

@antimora antimora requested a review from laggui March 10, 2024 17:35
Copy link

codecov bot commented Mar 10, 2024

Codecov Report

Attention: Patch coverage is 82.81250% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 85.82%. Comparing base (56f4602) to head (5d03879).
Report is 4 commits behind head on main.

❗ Current head 5d03879 differs from pull request most recent head 9b4d35d. Consider uploading reports for the commit 9b4d35d to get more accurate results

Files Patch % Lines
crates/burn-core/src/lr_scheduler/linear.rs 82.81% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1443      +/-   ##
==========================================
+ Coverage   85.76%   85.82%   +0.06%     
==========================================
  Files         640      644       +4     
  Lines       70632    71563     +931     
==========================================
+ Hits        60577    61420     +843     
- Misses      10055    10143      +88     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! 🙏

Overall, LGTM. Just a minor comment.

crates/burn-core/src/lr_scheduler/linear.rs Outdated Show resolved Hide resolved
@antimora antimora requested a review from laggui March 11, 2024 19:44
Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

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

Sorry I missed some comments in the last review since it is retroactive to the change of step_size to f64. The changes were kind of implicit but that's my fault 😅

See my comments below, and then LGTM 🚀

crates/burn-core/src/lr_scheduler/linear.rs Outdated Show resolved Hide resolved
crates/burn-core/src/lr_scheduler/linear.rs Outdated Show resolved Hide resolved
@astral4
Copy link
Contributor Author

astral4 commented Mar 11, 2024

Alright, it should be resolved now. Thanks!

@nathanielsimard nathanielsimard merged commit c52c497 into tracel-ai:main Mar 12, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants