refactor(trainer): move trainer modules from experimental to areal/trainer#896
refactor(trainer): move trainer modules from experimental to areal/trainer#896
Conversation
Summary of ChangesHello @garrett4wade, 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 project's module structure by centralizing all training-related components into a dedicated Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
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.
Code Review
This pull request is a significant refactoring that moves trainer-related modules from the experimental directory to a new areal/trainer directory. This is a good move to consolidate code and promote these modules to the main package. The changes are extensive, touching many files to update import paths and documentation. The new top-level imports for PPOTrainer and SFTTrainer simplify usage.
My review found a few minor issues, mostly incorrect file paths in documentation and one incorrect import in a test file, which are easy to miss in such a large refactoring. Overall, the changes are well-executed and improve the project structure.
595c50b to
4f4169a
Compare
|
examples/tau2/train.py:13 |
|
docs/tutorial/gsm8k_grpo.md:610 |
|
docs/tutorial/quickstart.md:158 |
…ainer Move trainer-related modules to establish a cleaner architecture: - Move PPOTrainer and SFTTrainer from areal/experimental/trainer/ to areal/trainer/ - Move PPO actor/critic from areal/engine/ppo/ to areal/trainer/ppo/ - Move SFT lm_engine from areal/engine/sft/ to areal/trainer/sft/ - Move RW engine from areal/engine/rw/ to areal/trainer/rw/ - Export PPOTrainer and SFTTrainer from top-level areal package This refactoring separates training algorithm concerns (trainer/) from backend infrastructure (engine/), making the codebase more modular. The trainers can now be imported directly via `from areal import PPOTrainer`. Updates all imports across examples, tests, docs, and internal modules.
9569002 to
ad94d1f
Compare
Description
Move trainer-related modules to establish a cleaner architecture by separating training algorithm concerns from backend infrastructure. This refactoring makes the codebase more modular and simplifies imports - trainers can now be imported directly via
from areal import PPOTrainer.Key changes:
areal/experimental/trainer/toareal/trainer/areal/engine/ppo/toareal/trainer/ppo/areal/engine/sft/toareal/trainer/sft/areal/engine/rw/toareal/trainer/rw/Related Issue
N/A
Type of Change
Checklist
jb build docs/gemini review)Breaking Change Details (if applicable):
N/A - Old import paths from
areal.experimental.trainerwill no longer work, but this is expected as experimental modules are not considered stable API.Additional Context
Files changed (44 files):
areal/trainer/- New trainer module locationareal/trainer/ppo/- PPO actor/critic moved from engineareal/trainer/sft/- SFT lm_engine moved from engineareal/trainer/rw/- RW engine moved from engineareal/__init__.py- Export PPOTrainer and SFTTrainer