Skip to content

refactor(birdbench): run BIRD dev on single_agent_turn, with one typed taskset per dialect - #6274

Open
ffrujeri wants to merge 8 commits into
mainfrom
ffrujeri/birdbench-single-agent-turn
Open

ffrujeri wants to merge 8 commits into
mainfrom
ffrujeri/birdbench-single-agent-turn

Conversation

@ffrujeri

@ffrujeri ffrujeri commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What changed

birdbench (BIRD dev) moves from single_agent_turn_legacy, the flat-row adapter, to single_agent_turn with a typed taskset, the pattern new pairings use. Each SQL dialect becomes a benchmark of its own, with its own taskset.

  • The dataset declares taskset: birdbench, and environment_server_routes sends its tasks to birdbench_bird_sql_environment_server, which is now a single_agent_turn server with bird_sql grading and simple_agent answering. bird_sql's own flat-row Environment Server (for its example rows) is not started in this config.
  • The server keeps the limits single_agent_turn_legacy gave these episodes: 21600 s per episode and 180 s for cleanup.
  • A config test checks that the dataset's taskset routes to a single_agent_turn server with simple_agent and bird_sql.
  • One benchmark per dialect. A dialect changes the prompt and the engine that runs the model's SQL, so its scores are reported apart from the other dialects' scores. spark.yaml and postgres.yaml chain config.yaml and set the dialect, the prompt, the prepared file and the taskset. Each has a manifest, so the catalog ID, the manifest's folder and the taskset are the same name: birdbench (SQLite), birdbench/spark and birdbench/postgres. Before, every dialect ran as birdbench, with eval.sh overriding config.yaml.
  • eval.sh runs --benchmark birdbench/<dialect> for Spark and PostgreSQL. It still overrides the train split, whose dataset now carries the dialect's taskset, and it still passes the PostgreSQL DSNs.
  • eval.sh sampling. gym eval run refuses run-level sampling for typed task rows ("responses_create_params overrides are not supported for materialized task rows"). eval.sh always passed --temperature and --max-output-tokens, so after the move to a typed taskset every eval.sh run failed before its first rollout. eval.sh now pins both, and --top-p when it is given, on the policy Model Server with sampling_overrides, which applies them to every call the policy model serves. Only vllm_model and switchyard_model have sampling_overrides, so eval.sh refuses another --model-type instead of sampling with the endpoint's defaults.
  • Agent swaps (nemo_gym/config/global_config.py). --agent-type langgraph_agent/... and the DeepAgents swap clear the server's Resources tool grants, because those graphs only call models. That applied only to single_agent_turn_legacy. On single_agent_turn, BIRD's direct_http grant stayed and is required, so langgraph_agent refused every seed. The grants are now cleared on both server types.

The episode is the same as before: the server seeds the agent's session with the task, activates it once, closes it, and has bird_sql grade the answer. The prepared rows do not change; collation materializes them for the taskset.

Why

Typed tasksets with single_agent_turn are how new pairings are wired; single_agent_turn_legacy is for flat-row configs that have not migrated. #6288 and #6289 pair Auto Ontology with BIRD dev on top of this, and #6323 → #6489 take the same agent to BIRD-Interact.

The per-dialect IDs follow the agreed taskset naming, <catalog ID>[:<label>]: the catalog ID is the manifest's name and folder path, and a task set whose scores are reported separately gets its own ID rather than a label. Results keyed by taskset then keep the dialects apart. No issue: a config migration within this benchmark.

Validation

Check Result
pytest benchmarks/birdbench/tests 78 passed, 5 skipped
pytest tests/unit_tests/benchmarks/ tests/unit_tests/environment/ tests/unit_tests/config/test_global_config.py tests/unit_tests/cli/test_cli_main.py 2499 passed, 12 skipped; 1 collection error in test_babyvision_opencode_prepare.py (no Pillow in the fresh venv, untouched here). At the stack tip (#6489): 2540 passed, 6 skipped
New tests/unit_tests/benchmarks/test_birdbench_dialects.py: each dialect's manifest name, config and taskset share its ID and route to single_agent_turn; each config prepares and grades in its dialect; eval.sh (run with a stub gym) prepares and runs the dialect's benchmark for dev and train, pins sampling on vllm_model and switchyard_model, and refuses openai_model 16 passed. With the previous eval.sh, the Spark and PostgreSQL cases and the 3 sampling cases fail
discover_environment_catalog() lists birdbench, birdbench/spark, birdbench/postgres, each with its own config and taskset
gym env resolve with ++policy_model.responses_api_models.<type>.sampling_overrides.{temperature,max_output_tokens} lands in the policy model's config on vllm_model and switchyard_model
gym env validate birdbench passes: bird_sql, simple_agent, 1534 rows
New tests: --benchmark birdbench --agent-type langgraph_agent/orchestrator_agent resolves with no tool grant while plain BIRD keeps direct_http; the LangGraph grant test runs on both server types pass; both fail with the old condition
pre-commit run --files on the changed files passed
Third review round, rebased onto main (6f6f4c7, 2026-11-24): eval.sh --top-p is pinned too (187480a); test_birdbench_dialects.py 17 passed; the --top-p case fails with the previous eval.sh. Core (tests/unit_tests/benchmarks/, environment/, config/, CLI) at the stack's top: 2834 passed, 13 skipped; agent tests: 108 passed, 1 skipped; pre-commit run --all-files: passed.
Rebased onto main (5398501, 2026-11-30), a573643: one conflict, in tests/unit_tests/config/test_global_config.py (main's step-driven and rollout-stop agent tests beside this PR's parametrized swap test; both kept). Main's #6162 now drives single_agent_turn one step at a time. Core suite (tests/unit_tests) at the stack's top: 27647 passed, 39 skipped; one failure under xdist, test_indic_in22.py::test_manifest_is_discoverable_under_its_catalog_path, passes alone and is outside this stack; agent tests: 108 passed, 1 skipped; component locks: 342 checked, 0 failed; pre-commit on the stack's files: passed. Smoke through eval.sh --dialect sqlite, Claude Opus 5.5, simple_agent: 5 of 5 BIRD dev tasks correct, one model call each, no failures.
Pinned Auto Ontology's main (a00a3906, the merge of NVIDIA/auto-ontology#559) and rebased onto main (bc5383b), 2026-11-30, 12bbfea: no change in this PR. Core suite (tests/unit_tests) at the stack's top: 27674 passed, 39 skipped; one failure under xdist in test_openshell_provider.py, which passes alone and is outside this stack; agent tests: 110 passed, 1 skipped; benchmarks/birdbench/tests: 82 passed, 5 skipped; component locks: 343 checked, 0 failed; pre-commit on the stack's files: passed.
Rebased onto main (dd09637), 2026-12-01, 31b11be: main's check-manifest-selection-fields hook (#6234) now requires the selection fields, so a new commit declares them in the PostgreSQL and Spark manifests, as the SQLite manifest does (PostgreSQL network: allowlist, for the server you provide; Spark no-network). No other conflicts. tests/unit_tests/benchmarks, config, cli and tooling pass, as do the test files that failed locally with a partial environment (the rest fail on main too, on this machine); benchmarks/birdbench/tests: 82 passed; agent tests: 110 passed, 1 skipped; component locks: 343 checked, 0 failed; pre-commit on the stack's files: passed.
Fourth review round, rebased onto main (0b7bcdc), 2026-12-02, 3c5d801: main's #6711 added BIRD dev's dated versions and the schema-only prompt through eval.sh overrides of the SQLite config. The conflict is resolved so that each dialect stays its own benchmark and --version / --prompt-format override the dialect's dataset, as --split train does. Review fixes: eval.sh pins equals-form sampling flags (--top-p=0.9) too (ff40327); the PostgreSQL and Spark manifests say canonical_split: dev (3c5d801). The /run-only swap stays a known limit. Core suite (tests/unit_tests) at the stack's top: 27972 passed; the 8 that fail (tool and sandbox-transfer telemetry, two OpenSandbox script-help tests) fail on main on this machine too. benchmarks/birdbench/tests: 121 passed; agent tests: 124 passed, 1 skipped; component locks: 345 checked, 0 failed; pre-commit on the stack's files: passed. New: the equals-form test (fails without the fix) and --dialect spark --version dev_20251106. Smoke at the stack's top: BIRD dev, 5 tasks, ReAct agent: 1, 1, 1, 1, 1.
Rebased onto main (0cfc8d1, with #6752's sandbox groups), 2026-12-04, 60e7f69: no conflicts; no change in this PR. #6289 now has single_agent_turn start and lend the Auto Ontology pairing's sandbox. Core (tests/unit_tests/benchmarks, environment, config, agents, server_runtime) at the stack's top: 6353 passed, 14 skipped; the one failure, test_resolve_config_servers_logs_unresolvable_configs[recursive_alias-ConfigError], fails on main on this machine too. Component locks: 350 checked, 0 failed; pre-commit on the stack's files: passed.

Rollout evidence

eval.sh --model <Claude Opus 5.5> --dialect <d> --limit 5 --concurrency 5 on BIRD dev, 2026-11-24, for each dialect. PostgreSQL ran on a local postgres:16 container that the server loaded on first start.

Benchmark Taskset in the rows Reward Failures Run health
birdbench (SQLite) birdbench 5 of 5 0 healthy; 5 rollouts unobserved (no model-call capture)
birdbench/spark birdbench/spark 5 of 5 0 healthy; 5 unobserved
birdbench/postgres birdbench/postgres 5 of 5 0 healthy; 5 unobserved

gym eval prepare wrote birdbench_spark_dev.jsonl and birdbench_postgres_dev.jsonl from the dialect configs. The model's SQL is in each dialect: backtick-quoted `db_id`.`table` names on Spark, double-quoted "db_id"."table" names on PostgreSQL. A run with model-call capture shows that simple_agent sends no sampling of its own, so the policy Model Server's pins are the values the endpoint gets; vllm_model's tests cover how it applies sampling_overrides to the outbound request. The earlier smoke, gym eval run --benchmark birdbench --limit 5 with azure/openai/eccn-gpt-6.1-sol, also had 5 of 5.

Compatibility

  • Same dataset files. A config that overrides birdbench_bird_sql_environment_server.environment_servers.single_agent_turn_legacy.* must use single_agent_turn now.
  • eval.sh --dialect spark|postgres now runs the benchmarks birdbench/spark and birdbench/postgres: their datasets are birdbench_spark and birdbench_postgres (with --split train, birdbench_<dialect>_train), and their rows carry those tasksets. SQLite keeps birdbench and birdbench_train. Results still go to results/<split>_<dialect>/<model>/. A command that selects a dialect with +...bird_sql.dialect= overrides on --benchmark birdbench still runs, but under the taskset birdbench; use --benchmark birdbench/<dialect>.
  • eval.sh --temperature, --top-p and --max-output-tokens now pin the policy Model Server's sampling, so --model-type must be vllm_model (the default) or switchyard_model.

Known limit: swapping BIRD's agent for one with no agent sessions, such as --agent-type non_executing_simple_agent, no longer falls back to a /run relay. The relay exists only for single_agent_turn_legacy, which receives flat rows; a typed taskset sends an episode envelope that /run does not accept. Other typed single_agent_turn benchmarks already have this limit. It goes away as agents implement agent sessions, so this PR does not add a typed /run adapter.

@copy-pr-bot

copy-pr-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ffrujeri
ffrujeri added this pull request to stack #6275 November 17, 2026 02:05
@ffrujeri ffrujeri added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers needs-review PR is ready for code review and waiting on a reviewer labels Nov 17, 2026
@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test ba9f9a0

@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 17, 2026 02:05
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the feature New capabilities, enhancements, or enablement work label Nov 17, 2026

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP WITH CARE

I found two RISK-level regressions in existing --agent-type workflows. Model-only LangGraph swaps keep a required tool grant, and /run-only agent swaps lose their compatibility relay.

I reviewed all three changed files and traced the affected collation, session dispatch and grading paths. This was static inspection; I did not execute tests or reproduce the reported rollouts.


Inline comments (escaped v1):

  • nemo_gym/config/global_config.py line 1045: RISK: Disable tool grants for LangGraph swaps on the typed server too

    gym eval run --benchmark birdbench --agent-type langgraph_agent/orchestrator_agent --model-type vllm_model --split benchmark --limit 1 now fails during agent seeding. The previous BIRD deployment used single_agent_turn_legacy, so this branch cleared its grants. The new deployment uses single_agent_turn, so composition retargets the agent but leaves direct_http enabled. The environment makes that grant required, and LangGraph refuses required grants before calling the model. Benchmark swaps are an advertised workflow.

    Could you extend _retarget_environment_servers to cover both implementations? Suggested replacement for this condition, not executed:

    and server_type in {SINGLE_AGENT_TURN_LEGACY_SERVER_TYPE, "single_agent_turn"}

    Keep it inside the existing composed-agent reference check. The invariant is that model-only graph swaps receive no resource grants, while ordinary simple_agent and unrelated agents keep their configured grants.

    Proposed acceptance checks: resolve BIRD with the LangGraph flavor and assert the routed server binds birdbench_bird_sql_langgraph_agent with resources_tool_transports == []; seeding should succeed. Parameterize the existing unrelated-grants regression over both server implementations, retaining the unchanged independent environment and resources_server is None assertions. Keep the neighboring DeepAgents swap assertion that its grants become empty, and check that unswapped BIRD still grants direct_http to simple_agent.

  • nemo_gym/config/global_config.py line 1065: RISK: Preserve BIRD's supported /run-only agent swaps

    gym eval run --benchmark birdbench --agent-type non_executing_simple_agent --model-type vllm_model --split benchmark --limit 1 previously composed the agent and converted the old BIRD server to a legacy_agent relay. After the migration, _relay_agents_without_sessions finds no single_agent_turn_legacy entry, so the typed server calls /v1/agent_sessions instead. NonExecutingSimpleAgent has no session implementation, and the base endpoint rejects it. Every selected BIRD task fails before generation. This is separate from the LangGraph grant issue: clearing grants cannot add session support.

    Could you retain the flat-row BIRD pairing until these swaps have compatible typed dispatch, or add that compatibility before migrating? Simply including single_agent_turn in this lookup is incomplete: the relay forwards request bytes unchanged, but the new taskset sends an episode envelope and this agent requires a flat responses_create_params body. A typed compatibility adapter would need to translate both the request and reply while keeping episode identity, sampling controls and verifier fields intact. I cannot recommend a one-line patch for that contract change.

    Proposed acceptance check: run one minimal BIRD-shaped task through the non-executing swap with a stub policy returning fenced SQL. Expect one model call followed by bird_sql verification and a collected reward, not a session refusal. Retain the existing fallback tests: sessionless swaps still select the relay, explicit deadlines stay unchanged, and host-run swap templates still use their /run contract. The normal typed simple_agent pairing must still preserve its prompt, grading fields and cleanup.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@ffrujeri

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I rebased onto main and pushed 3c40e1e.

1. LangGraph/DeepAgents swaps keep a required grant: fixed. _retarget_environment_servers now clears the Resources tool grants of a model-only graph swap on both single_agent_turn and single_agent_turn_legacy (SINGLE_AGENT_TURN_SERVER_TYPES). Tests:

  • test_langgraph_flavor_on_birdbench_takes_no_resources_tool_grant: --benchmark birdbench --agent-type langgraph_agent/orchestrator_agent binds birdbench_bird_sql_langgraph_agent with resources_tool_transports == [], and plain BIRD still grants direct_http to simple_agent.
  • test_langgraph_swap_keeps_unrelated_session_tool_grants now runs on both server types. The independent environment and its resources_server: None stay as they were.

Both tests fail with the old condition. The DeepAgents and simple_agent grant assertions are unchanged and pass.

2. /run-only agent swaps: not fixed here, by design. The finding is correct. The legacy_agent relay works only for single_agent_turn_legacy, whose flat rows /run accepts. A typed taskset sends an episode envelope, so --agent-type non_executing_simple_agent (or another agent with no agent sessions) now fails at the seed on BIRD. Other benchmarks on typed single_agent_turn have the same limit today.

We do not plan a typed-to-/run adapter. Gym is moving agents from /run to agent sessions. An agent that runs on BIRD needs agent sessions, as simple_agent, the LangGraph flavors and the Auto Ontology agent (#6289) have, so the gap closes as the remaining agents migrate. The PR description lists this as a known limit.

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 3c40e1e

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 066fb36

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the risk:high Autobot PR risk: high label Nov 23, 2026
@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 2e812c0

@ffrujeri ffrujeri changed the title refactor(birdbench): run BIRD dev on single_agent_turn with a typed taskset refactor(birdbench): run BIRD dev on single_agent_turn, with one typed taskset per dialect Nov 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The advertised --top-p option is still forwarded as an unsupported task-row override, causing evaluation to fail before any rollout.

1 open issue
What changed in this PR

Migrates BIRD dev to typed tasksets on single_agent_turn, preparing the benchmark for session-based agent pairings while retaining bird_sql grading and existing episode limits.

Changes:

  • Gives SQLite, Spark, and PostgreSQL distinct benchmark IDs, configs, and tasksets.
  • Updates eval.sh to select dialect benchmarks and pin temperature and output-token limits on the policy model server.
  • Extends tool-grant clearing to typed single-turn environments when swapping to model-only agents, with regression tests.
File Description
tests/​unit_tests/​config/​test_global_config.py Tests tool-grant handling for both single-turn server types.
tests/​unit_tests/​cli/​test_cli_main.py Tests BIRD’s LangGraph swap without resources tool grants.
tests/​unit_tests/​benchmarks/​test_birdbench_dialects.py Checks dialect identities, preparation, and script arguments.
nemo_gym/​config/​global_config.py Clears unsupported grants on both single-turn server types.
benchmarks/​birdbench/​tests/​test_config.py Checks typed taskset routing and agent/verifier wiring.
benchmarks/​birdbench/​spark/​manifest.yaml Registers the Spark benchmark.
benchmarks/​birdbench/​spark.yaml Configures Spark preparation, grading, and taskset routing.
benchmarks/​birdbench/​README.md Documents dialect-specific benchmark IDs and configs.
benchmarks/​birdbench/​postgres/​manifest.yaml Registers the PostgreSQL benchmark.
benchmarks/​birdbench/​postgres.yaml Configures PostgreSQL preparation, grading, and taskset routing.
benchmarks/​birdbench/​eval.sh Selects dialect benchmarks and applies model-level sampling settings.
benchmarks/​birdbench/​config.yaml Moves SQLite BIRD tasks to typed single_agent_turn episodes.

Review effort: Balanced

Comment on lines +185 to +188
SAMPLING_ARGS=(
"++policy_model.responses_api_models.${MODEL_TYPE}.sampling_overrides.temperature=${TEMPERATURE}"
"++policy_model.responses_api_models.${MODEL_TYPE}.sampling_overrides.max_output_tokens=${MAX_OUTPUT_TOKENS}"
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 187480a. eval.sh now takes --top-p and pins it as sampling_overrides.top_p on the policy Model Server, as it pins --temperature and --max-output-tokens. Without --top-p, the endpoint keeps its own value. test_eval_sh_pins_top_p_on_the_policy_model_server covers it, and it fails with the previous eval.sh.

@ffrujeri
ffrujeri force-pushed the ffrujeri/birdbench-single-agent-turn branch from 2e812c0 to 187480a Compare November 24, 2026 23:52
@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 187480a

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test a573643

@ffrujeri
ffrujeri force-pushed the ffrujeri/birdbench-single-agent-turn branch from a573643 to 12bbfea Compare November 30, 2026 23:19
@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 12bbfea

@ffrujeri
ffrujeri force-pushed the ffrujeri/birdbench-single-agent-turn branch from 12bbfea to 31b11be Compare December 1, 2026 00:54
@ffrujeri

ffrujeri commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 31b11be

@adil-a

adil-a commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

/review reset=true 31b11be

Copy link
Copy Markdown
Contributor

Invalid /review command: arguments must use key=value syntax. Usage: /review [<sha>] [approve=<true|false>] [mode=<light|strict>] [model=<codex|claude>] [prompt="<value>"] [reset=<true|false>] [role=<automation|engineer>].

@adil-a

adil-a commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

/review 31b11be reset=true

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP WITH CARE

I found two RISKs and one non-blocking NOTE. The LangGraph/DeepAgents tool-grant fix works, but BIRD's previously supported sessionless agent swaps still fail. Equals-form sampling flags also bypass the new model-server pins and abort typed runs.

I reviewed all 12 changed files with three delegated topic reviewers and traced configuration, collation, agent dispatch, verification and sampling consumers.

Previous review: I verified both findings from review 5931636426. Tool-grant clearing is fixed; the /run-only swap regression is still reproducible and is re-reported below. The PR acknowledges that limitation, so keeping it is a deliberate compatibility decision. The baseline commit ba9f9a07267ff21d696860e1c3bf3659c48da566 was unavailable for comparison; I compared the admitted base and head instead.

CI evidence: On this head, Nemo_CICD_Test, Lint check, all four core shards and all eight server-suite shards succeeded. Session routing end-to-end, Changed server tests and the container build were skipped, not passed. The non-blocking miniswe_sandboxed conformance check failed to produce usable scenario results; that check also fails on the admitted base, though its reported evidence failure differs.

Local execution: Probes ran in 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:dd09637342d6e87f4067d47481a242f09ffcba60, the default-branch CI image because this head's image build was skipped. Six dialect/split collation cases preserved prompts, task identity and grading fields; six malformed-input cases were rejected. Twelve shell-to-CLI/config cases and 24 sampling-body transformations passed. A stub-agent episode using the real verifier and a tiny SQLite database earned reward 1.0 and cleaned up; the sessionless case reproduced the seed refusal. Equals-form sampling probes reproduced the collector rejection. I relied on CI for the existing suites rather than rerunning them. No live-model, Spark or PostgreSQL rollout ran locally; the PR supplies author-reported smoke evidence for those dialects.


Inline comments (escaped v1):

  • nemo_gym/config/global_config.py line 1189: RISK: BIRD's /run-only agent swaps still fail before generation.

    This lookup still covers only single_agent_turn_legacy, but BIRD now selects single_agent_turn. Resolving BIRD with --agent-type non_executing_simple_agent selects legacy_agent on the admitted base and keeps the typed server on this head. The latter seeds /v1/agent_sessions, which this agent rejects.

    The CPU episode probe typed-dispatch-1/episode_probe.py returned 422: This agent does not implement episode sessions, then cleaned up without activation or verification. Every selected task using this swap is affected. This is the unresolved /run-only swap finding from review 5931636426; the compatibility note documents it but does not restore the workflow.

    Could you keep the working flat-row path for these swaps until sessionless dispatch is supported, or add the typed request/reply compatibility adapter? Extending this lookup alone is insufficient: legacy_agent forwards bytes unchanged, while the agent expects flat responses_create_params, not an episode envelope.

    Acceptance: run one BIRD-shaped task through the non-executing swap with a stub policy and obtain a model call, verification and reward. Preserve task identity, prompt, verifier fields, sampling and cleanup, while keeping ordinary typed simple_agent execution working.

  • benchmarks/birdbench/eval.sh line 117: RISK: Equals-form sampling flags bypass the model-server pins.

    Could you also consume --top-p=0.9, --temperature=0.6 and --max-output-tokens=4096? These spellings fall into EXTRA_ARGS, so the real CLI resolves them to run-level responses_create_params rather than the new sampling_overrides. Since BIRD now produces typed tasks, the collector rejects them before any rollout.

    eval-sampling-1/equals_probe.py ran the shell with stub external commands, resolved the captured arguments through the real CLI/Hydra parser and exercised collector preprocessing. All three spellings were accepted for flat rows and failed for typed rows with responses_create_params overrides are not supported for materialized task rows. I independently reproduced the typed-row rejection. This affects every dialect and split when these previously accepted spellings are used.

    Normalize both spellings into the same shell variables, or add --top-p=*, --temperature=* and --max-output-tokens=* cases. Do not forward the original sampling token. Keep defaults, omitted top-p and the existing space-separated options unchanged.

    Acceptance: for both supported model types, equals-form and space-separated flags must resolve to identical model-server pins, leave no run-level responses_create_params override and allow a materialized BIRD row to preprocess. Add these cases beside the existing shell sampling tests.

  • benchmarks/birdbench/spark/manifest.yaml line 50: NOTE, non-blocking: Record the upstream split rather than the Gym dataset role.

    Could you set this field and the PostgreSQL manifest's matching field to dev?

    The manifest contract defines canonical_split as the upstream split being scored. Both configs inherit preparation split dev and load dev.json; benchmark is already represented by datasets[].type. The current declarations give catalog readers incorrect protocol metadata, though they do not change runtime scoring.

    canonical_split: dev
    

    Acceptance: load all three dialect manifests and confirm that each canonical split matches its default preparation split, dev. Keep dataset type: benchmark and the existing dialect-specific prompts and paths unchanged.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@ffrujeri
ffrujeri force-pushed the ffrujeri/birdbench-single-agent-turn branch from 31b11be to 3c5d801 Compare December 2, 2026 02:43
@ffrujeri

ffrujeri commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 3c5d801

@ffrujeri

ffrujeri commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I rebased onto main (0b7bcdc) and pushed 3c5d801. Main's #6711 added BIRD dev's dated versions and the schema-only prompt through eval.sh overrides on the SQLite config; the rebase keeps each dialect its own benchmark and lets --version and --prompt-format override the dialect's dataset, as --split train does. test_eval_sh_runs_a_dated_release_on_another_dialect_s_benchmark covers --dialect spark --version dev_20251106.

1. /run-only agent swaps: not changed, by design. As in my earlier reply: the typed taskset sends an episode envelope that /run does not accept, and we do not plan a typed-to-/run adapter, since Gym is moving agents to agent sessions. The PR body's known limits say so.

2. Equals-form sampling flags: fixed in ff40327. eval.sh reads --temperature=…, --max-output-tokens=… and --top-p=… into the same pins as the spaced form and does not pass them on. test_eval_sh_pins_equals_form_sampling_as_it_pins_the_spaced_form checks, for vllm_model and switchyard_model, that both spellings give the same call with the three pins and no run-level sampling flag; it fails without the change.

3. canonical_split: fixed in 3c5d801. The PostgreSQL and Spark manifests say dev, as the SQLite one does; type: benchmark and their prompts and paths are unchanged.

ffrujeri and others added 8 commits December 4, 2026 00:18
…askset

birdbench's dataset declares taskset: birdbench, and environment_server_routes
sends its tasks to birdbench's own single_agent_turn Environment Server, in
place of bird_sql's single_agent_turn_legacy flat-row server. The episode is
the same: the server seeds simple_agent's session with the task, activates it
once, closes it and has bird_sql grade the answer. It keeps the legacy
server's limits (21600 s episodes, 180 s cleanup). eval.sh's dataset override
carries the taskset too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
…nt_turn

A LangGraph or DeepAgents swap cleared the environment server's Resources tool grants only on
single_agent_turn_legacy. BIRD dev now runs on single_agent_turn with a direct_http grant, which
single_agent_turn marks required and langgraph_agent refuses, so `--agent-type langgraph_agent/...`
failed every BIRD task at the seed. Clear the grants on both server types.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
A dialect changes the prompt and the engine that runs the model's SQL, so its
scores are reported apart from the other dialects' scores. Each dialect now has
its own config, manifest and taskset under one ID: birdbench (SQLite),
birdbench/spark and birdbench/postgres. Before, every dialect ran as birdbench,
with eval.sh overriding config.yaml's dialect, prompt and dataset.

eval.sh now prepares and runs the dialect's benchmark. It still overrides the
train split and passes the PostgreSQL DSNs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
BIRD dev's rows are typed tasks since it runs on single_agent_turn, and
gym eval run refuses run-level sampling for typed task rows: "responses_create_params
overrides are not supported for materialized task rows". eval.sh always passed
--temperature and --max-output-tokens, so every eval.sh run failed before its
first rollout.

eval.sh now pins both on the policy Model Server with sampling_overrides, which
applies them to every call the policy model serves, as the run-level flags did.
Only vllm_model and switchyard_model have sampling_overrides; another model type
would ignore it, so eval.sh refuses it instead of sampling with other values.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
gym eval run's --top-p sets responses_create_params.top_p, which typed task rows refuse, as they refuse
--temperature and --max-output-tokens. eval.sh passed --top-p straight through, so a run with it failed before
its first rollout. eval.sh now pins top_p in the policy Model Server's sampling_overrides when --top-p is given,
and leaves the endpoint's own otherwise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
…Spark manifests

Main's check-manifest-selection-fields hook (#6234) requires them in every manifest. They follow the SQLite
manifest; PostgreSQL needs the server you provide (allowlist), Spark runs locally (no-network). Modality is a
list, as #6233 writes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
… Server too

`--top-p=0.9`, `--temperature=0.6` and `--max-output-tokens=4096` fell through to `gym eval run`, which
turns them into run-level responses_create_params; typed BIRD rows refuse that before any rollout. eval.sh now
reads both spellings into the same pins. A test checks that both spellings give the same call, and that a dated
release runs on another dialect's benchmark (main's --version with this PR's dialect benchmarks).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
… dev

canonical_split is the upstream split being scored, as the SQLite manifest says; benchmark is the dataset's type.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
@ffrujeri
ffrujeri force-pushed the ffrujeri/birdbench-single-agent-turn branch from 3c5d801 to 60e7f69 Compare December 4, 2026 00:34
@ffrujeri

ffrujeri commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 60e7f69

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer risk:high Autobot PR risk: high sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants