Conversation
This reverts commit 8d1113d.
This reverts commit da2713f.
Add xshapes parameter to gather() function to validate gradient tensor shapes during the transition period, rejecting sharded uploads that don't match expected model dimensions. - Add xshapes parameter to gather() function signature - Validate vals tensor shape prefix against expected xshapes - Log warning and reject responses with shape mismatches - Update miner.py to pass xshapes=self.xshapes to gather - Update validator.py to pass xshapes=self.xshapes to gather This prevents sharded gradients from being accepted during the transition period before full shard support is enabled.
Add three new test cases to verify xshapes-based gradient shape validation in comms.gather(): - test_gather_rejects_sharded_gradient_shape: Verifies that gradients with mismatched dimensions (e.g., sharded instead of full) are properly rejected when xshapes is provided - test_gather_accepts_correct_gradient_shape: Ensures gradients with correct shapes are accepted when xshapes validation is enabled - test_gather_without_xshapes_accepts_all: Confirms that shape validation is skipped entirely when xshapes parameter is None These tests protect against miners uploading incorrectly shaped gradients (particularly sharded gradients when full gradients are expected).
|
Warning Rate limit exceeded@joellidin has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 55 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (22)
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❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (81.01%) is below the target coverage (85.00%). You can increase the patch coverage or adjust the target coverage. @@ Coverage Diff @@
## main #672 +/- ##
==========================================
+ Coverage 56.45% 57.72% +1.27%
==========================================
Files 27 27
Lines 5165 4975 -190
==========================================
- Hits 2916 2872 -44
+ Misses 2249 2103 -146
🚀 New features to boost your workflow:
|
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