Repository navigation
feat(rollout): route tasksets to unmigrated agents through legacy_agent relays - #4099
Draft
ananthsub wants to merge 1 commit into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
ananthsub
force-pushed
the
ananthsub/task-schemas/legacy-agent-tasksets
branch
from
October 6, 2026 14:05
589aa3f to
f1b8c6f
Compare
ananthsub
force-pushed
the
ananthsub/task-schemas/legacy-agent-tasksets
branch
from
October 6, 2026 17:02
f1b8c6f to
4ee59c4
Compare
ananthsub
force-pushed
the
ananthsub/task-schemas/legacy-agent-tasksets
branch
from
October 6, 2026 17:44
4ee59c4 to
4bd567c
Compare
ananthsub
force-pushed
the
ananthsub/task-schemas/legacy-agent-tasksets
branch
from
October 7, 2026 05:22
4bd567c to
b9b6ecc
Compare
…nt relays A dataset that declared taskset: could only route to an environment server that accepts episode requests. A legacy_agent relay forwards /run to an agent that still owns its episode, and that agent reads task fields and collector keys such as _ng_task_index from the top level of a run request row, so an episode request would break it. Until every agent migrated, existing datasets could not declare a taskset. Rollout collection now sends a legacy_agent relay the run request row the agent reads today, rebuilt from the materialized task, and stores the agent's result with the task's ID. A taskset declared on a resources server routes to a relay when the relay's agent references that resources server, and collation validates its rows against that resources server's schema. Signed-off-by: Ananth Subramaniam <[email protected]>
ananthsub
force-pushed
the
ananthsub/task-schemas/legacy-agent-tasksets
branch
from
October 8, 2026 00:06
b9b6ecc to
5f7cbdb
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Lets a dataset declare
taskset:while its agent still runs behind alegacy_agentrelay, so existing datasets can move to taskset routing before their agents migrate.A materialized task goes to its environment server as an episode request. A
legacy_agentrelay forwards its body to an agent that still owns its episode through/run, and those agents read task fields and collector keys such as_ng_task_indexand_ng_rollout_indexfrom the top level of the row;harbor_agent_generalrequires them. An episode request would break them, so a taskset could not route to a relay.Where this fits
Datasets reach an environment server in one of two ways today: run request rows route by their agent, and datasets that declare
taskset:are materialized during collation and route byenvironment_server_routes. The goal is one path, where every dataset declares a taskset and routes to an environment server:flowchart LR P["Preparation script<br/>task rows with a stable task_id"] --> C["Collation<br/>validates, computes metrics,<br/>materializes"] Y["Dataset YAML<br/>file + taskset"] --> C S["task_data.py schemas<br/>environment server + resources server"] -.-> C C --> R["Rollout collection<br/>routes by taskset"] T["environment_server_routes"] --> R R --> E["Environment server<br/>single-agent, multi-agent,<br/>or legacy_agent relay"]The UserSim stack (#3800 and #3802) has merged. UserSim's datasets already declare
taskset:and commit plain task rows, so they use the one path. Each step is additive, and datasets withouttaskset:keep working until the last one:flowchart TB S4053["PR 4053 (merged)<br/>tasksets route to servers<br/>with several agents"] S4060["PR 4060 (merged)<br/>metrics for<br/>materialized rows"] S3800["PR 3800 (merged)<br/>UserSim runtime"] S3802["PR 3802 (merged)<br/>UserSim validation tasks"] S4096["PR 4096<br/>stable, unique<br/>task IDs"] S4097["PR 4097<br/>metrics for<br/>every row"] S4098["PR 4098<br/>schema per<br/>environment server"] S4099["PR 4099<br/>legacy_agent relays<br/>serve tasksets"] SREF["Remove the bridge<br/>for already-materialized<br/>rows"] SNEXT["Later<br/>configs declare taskset:,<br/>then agent routing retires"] S4053 --> S4060 --> S3800 --> S3802 --> S4096 --> S4097 --> S4098 --> S4099 --> SREF --> SNEXT classDef done fill:#F1EFE8,stroke:#5F5E5A,color:#444441 classDef prereq fill:#FAEEDA,stroke:#854F0B,color:#633806 classDef this fill:#EEEDFE,stroke:#534AB7,color:#26215C,stroke-width:2px classDef next fill:#E1F5EE,stroke:#0F6E56,color:#085041 class S4053,S4060,S3800,S3802 done class S4099 this class S4096,S4097,S4098,SREF,SNEXT nextGray: merged. Purple: this PR. Green: other steps.
Base branch. This stack is based on
main. Review only this PR's own diff.Changes
legacy_agentrelay the run request row its agent reads today, rebuilt from the materialized task: the task's fields, the collector keys, and the agent'sagent_ref. The agent's/runresult is stored as the rollout, with the task's ID in_ng_task_id.SingleAgentTaskDataand the agent's resources server schema.legacy_agentREADME andresources-server-apis.mdxdescribe taskset routing through a relay.No issue is linked. This follows the dataset routing design for environment servers.
Validation
tests/unit_tests/test_rollout_collection.py: the rebuilt row matches the flat row an agent reads, andrun_from_configsends a relay a run request instead of an episode request and stores the agent's result with the task's ID and thelegacy_agentresult type.tests/unit_tests/test_benchmarks.py::TestTasksetRouteToLegacyAgentRelay: a resources-declared taskset reaches a relay through its agent, an agent that references another resources server is rejected, and collation uses the agent's resources schema.legacy_agentrelay and an agent-declared example dataset, I rangym dataset collate +mode=example_validationas committed and again withtaskset:routed to the relay. Then I compared the row each agent would receive on both paths. They are identical for all of the configs that collate. The configs that do not collate fail identically onmain(stale committed metrics sidecars, judge models the config does not define, missing example files). Committed metrics sidecars did not change.pyteston the affected test modules passes on every branch of this stack.pre-commit runon the changed files: all pass.Rollouts
Not run: no model endpoint credentials were available in this environment. The collation check above compares the agent's input on both paths offline. A real rollout through a relay with a declared taskset is still needed before this leaves draft.
Compatibility and benchmark impact
taskset:are unaffected.legacy_agentrelay, and the agent behind it receives the same row as when the dataset routes by agent.