feat(tau2): Add Tau2 agentic RL training example with proxy server#892
feat(tau2): Add Tau2 agentic RL training example with proxy server#892garrett4wade merged 28 commits intomainfrom
Conversation
Summary of ChangesHello @nuzant, 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 enhances the system by integrating a full-fledged example for training agentic Reinforcement Learning models within the Tau2 benchmark. This example demonstrates multi-turn agent training facilitated by an OpenAI-compatible proxy server. Alongside this new feature, the PR delivers crucial bug fixes to improve the stability and correctness of FSDP, the OpenAI proxy, and the Slurm scheduler, ensuring a more robust training environment. 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 introduces a comprehensive example for Tau2 agentic RL training, along with several bug fixes and improvements. However, two medium-severity vulnerabilities were identified: sensitive information logging in the Slurm scheduler (full commands with potential API keys) and a potential memory exhaustion (DoS) in the proxy rollout server due to unbounded log message storage. Additionally, the review suggests improving test stability by replacing time.sleep with polling, correcting documentation issues in the README, and refining exception handling and logging practices for better efficiency and maintainability.
- Add config_types.py for custom experiment config (Tau2ExperimentConfig) - Add 7B model configuration (config_7b.yaml) - Implement lazy attention mask creation for tree training in FSDP engine - Fix controller mode import with dynamic PYTHONPATH handling - Silence verbose logging in tree attention module - Update slurm scheduler with shlex.quote for robust shell escaping Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
01b024a to
5650d0f
Compare
| ```bash | ||
| python3 -m sglang.launch_server \ | ||
| --model-path Qwen/Qwen2.5-72B \ | ||
| --host 0.0.0.0 \ | ||
| --port 8000 \ | ||
| --tool-call-parser qwen25 \ | ||
| --chat-template ./qwen3_nonthinking.jinja \ | ||
| --dp-size 2 \ | ||
| --tp-size 4 | ||
| ``` |
There was a problem hiding this comment.
Can we instead use RolloutController to launcher the servers in training script? Two commands may increase verbosity
There was a problem hiding this comment.
I am not sure we have a way to gracefully do this right now. There are two options:
-
Just use rollout controller to launch the servers and collect addresses from name resolve. However, now rollout controller launches servers with multiple addresses, and we need to change the agent workflow to distribute user requests among these addresses.
-
Use proxy for user requests as well. This seems to be an elegant solution, but our current implementation does not support multiple proxy endpoints in a single agent workflow run.
I think we should open a new PR to implement option 2 and change the example then.
There was a problem hiding this comment.
Okay. We can just implement a router in rollout controller.
| ```bash | ||
| python3 -m sglang.launch_server \ | ||
| --model-path Qwen/Qwen2.5-72B \ | ||
| --host 0.0.0.0 \ | ||
| --port 8000 \ | ||
| --tool-call-parser qwen25 \ | ||
| --chat-template ./qwen3_nonthinking.jinja \ | ||
| --dp-size 2 \ | ||
| --tp-size 4 | ||
| ``` |
There was a problem hiding this comment.
Okay. We can just implement a router in rollout controller.
|
Update: Changed |
Description
Add a complete Tau2 agentic RL training example that demonstrates multi-turn agent training using the OpenAI-compatible proxy server.
Key additions:
examples/tau2/- Complete training example for Tau2 agentic RLagent.py- Agent implementation with airline environment tasktrain.py- Training script with GRPO workflowutils.py- Utility functions for reward computation and data processingconfig_1.7b_airline.yaml- Config for 1.7B model trainingconfig_8b_airline.yaml- Config for 8B model trainingREADME.md- Comprehensive documentationTest additions:
test_examples.pyNotes:
Related Issue
N/A
Type of Change
Checklist
jb build docs/gemini review)Breaking Change Details (if applicable):
N/A
Additional Context
Generated with Claude Code