Create run_rl.py with ART RL loop #161
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A new file,
dev/tau-bench/run_rl.py
, was created, mirroringrun.py
but implementing an ART RL training loop.Key changes and additions include:
train
function orchestrates the RL process, utilizingart.TrainableModel
,art.gather_trajectory_groups
, andmodel.train()
.TauBenchTrainingConfig
andTauBenchPolicyConfig
, were introduced to manage RL-specific hyperparameters and integratetau-bench
'sRunConfig
.rollout_tau_bench_task
function adaptstau-bench
's task evaluation to generateart.Trajectory
objects, converting agent interactions and rewards into a format suitable for ART.agent_factory
fromtau-bench.run
is used, with the agent's internal model dynamically overridden to point to theart.TrainableModel
's inference endpoint during rollouts.parse_args
was extended to include RL-specific command-line arguments while retaining mostrun.py
arguments fortau-bench
compatibility.evaluate_model
on a validation set, leveraging the samerollout_tau_bench_task
mechanism.The implementation reuses
tau-bench
abstractions likeget_env
andagent_factory
to maintain consistency and minimize changes to the existing codebase.