Skip to content

Conversation

@Charles23R
Copy link
Contributor

@Charles23R Charles23R commented Oct 24, 2025

Pull Request Template

Checklist

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

Related Issues/PRs

Provide links to relevant issues and dependent PRs.

Changes

Can now create custom learning strategies.
Added an example of a custom learning strategy.
We now need to pass learning_strategy to the build method of the Learner.

Testing

Created an example to test it. Could not test the Multi-device case yet.

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.80%. Comparing base (87aa0be) to head (da55f83).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/burn-train/src/learner/builder.rs 0.00% 10 Missing ⚠️
crates/burn-train/src/learner/train_val.rs 0.00% 6 Missing ⚠️
crates/burn-train/src/learner/strategies/base.rs 0.00% 3 Missing ⚠️
crates/burn-train/src/learner/base.rs 0.00% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project check has failed because the head coverage (64.80%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3921      +/-   ##
==========================================
- Coverage   64.81%   64.80%   -0.01%     
==========================================
  Files        1178     1178              
  Lines      139912   139907       -5     
==========================================
- Hits        90678    90664      -14     
- Misses      49234    49243       +9     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@nathanielsimard nathanielsimard left a comment

Choose a reason for hiding this comment

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

I only have a small comment, great job!

/// Struct to minimise parameters passed to [LearningMethod::learn]
/// These components are used during training
pub(crate) struct LearnerComponents<LC: LearnerComponentTypes> {
pub struct LearnerComponents<LC: LearnerComponentTypes> {
Copy link
Member

Choose a reason for hiding this comment

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

Some of the docs is wrong here.

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