Conversation
Signed-off-by: Suguna Velury <178320438+sugunav14@users.noreply.github.com>
📝 WalkthroughWalkthroughModified the torch_dtype argument construction in the SFT example script to use getattr() for safer attribute access, preventing potential AttributeErrors when torch_dtype or dtype attributes are missing from model_args. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Additional details and impacted files@@ Coverage Diff @@
## main #865 +/- ##
==========================================
- Coverage 73.73% 73.45% -0.28%
==========================================
Files 196 197 +1
Lines 20412 20651 +239
==========================================
+ Hits 15050 15169 +119
- Misses 5362 5482 +120 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What does this PR do?
Type of change: Bug fix
Overview: Newer version of trl uses dtype instead of torch_dtype. Modified code to set float32 as default for older versions of trl that you torch_dtype.
Usage
# Add a code snippet demonstrating how to use thisTesting
Before your PR is "Ready for review"
Additional Information
Summary by CodeRabbit