-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: pass model to plugin trainer_cls for rl trainer builder #2883
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe control flow for trainer class selection and argument preparation in the RL trainer builder was refactored. The Changes
Sequence Diagram(s)sequenceDiagram
participant Builder as HFRLTrainerBuilder
participant TrainerClass as Trainer Class
Builder->>Builder: build()
Builder->>Builder: _get_trainer_cls()
Builder-->>TrainerClass: Returns selected trainer class
Builder->>Builder: Prepare trainer arguments
Builder->>TrainerClass: Instantiate with arguments
Suggested labels
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Graph Analysis (1)src/axolotl/core/builders/rl.py (6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🔇 Additional comments (5)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pr breaks the contract with plugins that already returns the trainer args.
Description
RL trainer cls plugin does not pass self.model causing
TypeError: AtroposGRPOTrainer.__init__() missing 1 required positional argument: 'model'https://discord.com/channels/1104757954588196865/1117071926926512248/1392125907963084913
Motivation and Context
How has this been tested?
Untested!
Screenshots (if appropriate)
Types of changes
Social Handles (Optional)
Summary by CodeRabbit