-
Notifications
You must be signed in to change notification settings - Fork 38
Simplify trainer config #329
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
Simplify trainer config #329
Conversation
Summary of ChangesHello @hiyuchang, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the configuration system to improve clarity and reduce complexity. By moving optimizer settings to the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request simplifies the trainer configuration by refactoring optimizer settings and other parameters. The changes are extensive, touching many configuration files. While the core logic changes in the Python files are mostly correct, I've identified a couple of critical bugs related to incorrect dictionary keys. Additionally, several YAML configuration files have potentially unintended behavior changes regarding learning rates, resume modes, and other parameters, which I've highlighted for your review to ensure they align with the intended outcome.
/unittest-all |
/gemini review |
1 similar comment
/gemini review |
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.
Code Review
This pull request is a great step towards simplifying the configuration structure by refactoring where optimizer and certain trainer parameters are defined. The changes are consistently applied across a large number of example configurations and documentation files, which significantly improves clarity and usability. I've identified two high-severity issues in the Python code that handles these new configurations. One is a logic bug that could lead to silent failures with an invalid config path, and the other is an incorrect parameter being set in the config generator UI. Addressing these will make the refactoring more robust.
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.
Code Review
This pull request simplifies the trainer configuration by moving optimizer settings and other trainer-related parameters to more logical locations in the main configuration file. This refactoring improves clarity and consistency across many example and benchmark configuration files. The documentation has also been updated to reflect these changes. The core logic changes in trinity/common/config.py
and trinity/common/verl_config.py
correctly implement this simplification. I found one potential issue where an invalid trainer_config_path
could lead to silent failures, and I've suggested a fix. Overall, this is a great improvement for configuration management.
Summary
Skipped
Tests
Github Test Reporter by CTRF 💚 |
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.
Minor comment
/unittest-all |
/unittest-module-trainer |
Summary
Skipped
Tests
Github Test Reporter by CTRF 💚 |
/unittest-module-common |
Summary
Tests
Github Test Reporter by CTRF 💚 |
Description
trainer.trainer_config.actor_rollout_ref.actor.optim
toalgorithm.optimizer
grad_clip
,use_dynamic_bsz
,ppo_max_token_len_per_gpu
ulysses_sequence_parallel_size
totrainer
trainer.trainer_config
in examples when it is not neccessaryChecklist
Please check the following items before code is ready to be reviewed.