Conversation
Add guards in evaluate_model and inner_steps to prevent NaN loss when all labels in a batch are masked (-100). This occurs when batches contain only padding or special tokens. - Check valid_labels count before forward pass - Log warning and skip batch if valid_labels == 0 - Clean up tensors before continuing to next batch - Prevent cross_entropy from receiving empty loss target
Update miner and validator to use anneal shard 5 instead of shard 4. Update documentation to reflect the new shard number in rclone migration examples. - Change current_shard from 4 to 5 in miner.py - Change current_shard from 4 to 5 in validator.py - Update docs with anneal_000005.npy examples
WalkthroughUpdates anneal-mode starting shard from 4 → 5 in miner, validator, and docs; adds early skipping of batches whose labels are all masked (-100) in trainer to avoid NaN loss; bumps package version to 2.1.27; updates anneal hyperparameter decay_outer_steps from 120 → 150. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (57.69%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage. @@ Coverage Diff @@
## dev #685 +/- ##
=======================================
Coverage 57.69% 57.69%
=======================================
Files 27 27
Lines 4990 4990
=======================================
Hits 2879 2879
Misses 2111 2111
🚀 New features to boost your workflow:
|
Change from 120 to 150 to mitigate for now alwyas gathering the full 20 peers.
Description
Related Issue(s)
Type of Change
Branch Naming
Commit Messages
Code Quality
Testing
Documentation
If this is a breaking change
Screenshots/Examples
Additional Notes
Summary by CodeRabbit
Bug Fixes
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.