Skip to content

feat(benchmarks): add the BIRD-Interact Lite and Full benchmark recipe - #5475

Merged
ffrujeri merged 6 commits into
ffrujeri/bird-interact-postgresfrom
ffrujeri/bird-interact-benchmark
Nov 23, 2026
Merged

ffrujeri merged 6 commits into
ffrujeri/bird-interact-postgresfrom
ffrujeri/bird-interact-benchmark

Conversation

@ffrujeri

@ffrujeri ffrujeri commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #5473 (PostgreSQL on the bird_interact server), in the BIRD-Interact stack: #5465 → #5409 → #5473 → this PR → #5478 (parity with the BIRD-Interact ADK). This PR's diff against #5473 is benchmarks/bird_interact, its prepare tests in tests/unit_tests/benchmarks/, and the static validation of nemo_gym/environment/validation.py.

What changed

benchmarks/bird_interact runs BIRD-Interact's Lite and Full releases on the bird_interact Environment Server, with PostgreSQL. One recipe holds both releases and both modes; the server, and its five-task SQLite example, stay in environment_servers/bird_interact.

Config Release Mode Tasks
config.yaml Lite: 18 databases c-Interact Up to 195 of 300
a_interact.yaml Lite a-Interact Up to 195 of 300
full.yaml Full: 22 databases c-Interact Up to 410 of 600
full_a_interact.yaml Full a-Interact Up to 410 of 600
  • Dockerfile builds the episode sandbox image from BIRD-Interact's official one (digest-pinned), which holds the dumps and the scripts that restore them. The restore runs at build time, into a data directory outside the base image's declared volume, so each episode starts PostgreSQL with the databases already in place. It creates the root database that the restore scripts connect to, as the base image's entrypoint would, and adds python3 and psycopg2 for the server's runner. The build fails when a restore script prints an import error or a dump folder did not become a database. Full is a build argument.
  • prepare.py downloads the release from Hugging Face: its rows, and the schema, column meanings and knowledge base of each database, which become the servers' database_dir. It merges the ground truth that the authors send on request into each task and its follow-up, by instance_id, and writes the tasks the server can grade: those with ground truth and without custom test cases (the management tasks). feat(bird_interact): match the BIRD-Interact ADK's c-Interact, simulator and grading #5478 narrows this to BIRD-Interact's rule: a query is graded by its result even when it has test cases. It reads the ground truth from data/ by default (bird_interact_gt_kg_testcases_1008.jsonl for Lite, bird_interact_full_gt_kg_testcases_08022.jsonl for Full), which data/.gitignore keeps out of the repository; +prepare_script_args.ground_truth_jsonl names another file. It refuses a file that matches none of the release's tasks, and prints how many tasks it kept and why it left the others out.
  • The authors' Lite file writes 263 of its 300 follow-up solutions as one string, not a list of statements, which the server refuses. prepare.py turns such a string into a list of that one statement. With it, all 300 prepared Lite rows pass the server's task schema; the Full file always writes lists.
  • Configs. Each release and mode has its own dataset, file and metrics. Each variant chains config.yaml and writes its dataset out; the release sets the servers' database_engine: postgresql, database_dir and image (bird_interact_image, benchmarks/bird_interact:<release> by default).
  • manifest.yaml mirrors the Lite c-Interact config, with prompt_source: prepared: the server writes each prompt from the task.

Why

The image, the data and the run configuration belong to a benchmark release, not to the server, which runs any release on any image that holds its databases as <db>_template. Lite and Full differ only in the base image and the Hugging Face dataset, so one recipe holds both. No public issue: the PRs of the BIRD-Interact stack track the work.

Validation

Command Result
pytest tests/unit_tests/benchmarks/test_bird_interact_prepare.py (moved from benchmarks/bird_interact/tests/, which no CI job collected) 16 passed at the 2026-11-19 head, 6 before: the ground truth of the task and its follow-up merged in; tasks without ground truth, with custom test cases for the task or its follow-up, or with a follow-up without ground truth, left out with their reasons; prepare writing data/<release>/<mode>.jsonl and its counts; a bad release, a bad mode and a missing ground truth refused
gym eval prepare --benchmark bird_interact Refused with the ground-truth message, before any download
gym eval prepare --benchmark bird_interact +prepare_script_args.ground_truth_jsonl=<empty file> Downloaded the public Lite release; data/lite/databases/<db>/ holds the schema, column meanings and knowledge files the server reads; "kept 0 of 300 tasks; left out: 300 with no ground truth"
gym env resolve on each of the four configs Each has one dataset, with its release, mode, file and taskset, and both servers on postgresql with the release's database_dir, image and prepare arguments
Manifest checks The manifest loads, and its mirrored fields match the resolved Lite c-Interact composition (resolved with the simulator settings set, which manifest-backed commands do not accept)
pytest tests/unit_tests/environment/test_benchmarks.py 84 passed, 1 failed (85 passed later): test_every_repo_benchmark_appears_in_listing, which fails the same way on main on this machine (its hostname resolves to 127.0.1.1, so nine sandbox configs of other benchmarks do not resolve). gym list benchmarks lists bird_interact and its three variants
docker build --platform linux/amd64 --tag benchmarks/bird_interact:lite benchmarks/bird_interact Built in 20 seconds once the base image was pulled; 1.1 GB; "Restored 18 of 18 databases", 175 tables imported, no import error. The first version of the build hung: the restore script waits until psql -U root connects, which needs a database named root
grading.py in a container from the image setup starts PostgreSQL in 0.2 s; execute and grade run on alien_template; a write inside a query is rolled back; a slow query times out; an error is reported
pre-commit run --files on the recipe Passed

Not validated yet:

Rollout evidence

N/A for this PR: no task runs without the ground truth. #5478, which changes the server, has Lite runs through this recipe on the image built here, with a stand-in ground truth for three tasks.

Compatibility

New recipe. validation.py's static wiring now fills a vllm_model block's endpoint, key and model, and a top-level ??? setting a model leaf names, for every manifest; only bird_interact's validation result changes (checked on all 266 manifests). Runtime parsing is unchanged.

The same patterns also serve catalog lookup for configs without a manifest. With POLICY_API_KEY unset, swe_together's config.yaml, opencode.yaml and smoke.yaml now resolve their agent, so gym list benchmarks shows opencode_agent for them, where it showed none.

Team review fixes (2026-11-19)

From a team review, in eef4ee3:

  • prepare left out only tasks with test cases, so Full kept 17 management tasks (427, not 410), 7 of which this server cannot grade. It keeps the tasks whose two phases are both Query: 195 in Lite, 410 in Full.
  • The Hugging Face download is pinned to the revision the ground truth files belong to.
  • The prepare tests move to tests/unit_tests/benchmarks/, with tests for the category rule, a row the server could not read, and each release reading its own download.
  • The README asks for env.yaml before step 3, which reads the config, and says that run outputs carry the ground truth; the docs row says what grades the kept tasks; validation.py's comment says what its patterns fill, with a test that a supplied setting stays.

Rollout evidence: the real ground truth is now in hand, and the stack's top has run Lite and Full through this recipe (Auto Ontology parity runs); this PR alone runs no rollout.

Not changed: the default image tag benchmarks/bird_interact:<release> resolves to a third party's Docker Hub org if the image was never built (a convention 4 other benchmarks share): worth an issue on the convention.

Review fixes (2026-11-19, second round)

From the second review, in 169374b:

  • prepare reads the ground truth file before the download. A missing file, a line that is not JSON, or an entry with no instance_id raises a ValueError that names the file and the line; a null ground truth field becomes an empty list.
  • An empty ground truth file only downloads the release: prepare prints that it wrote no rows and keeps an earlier file.
  • A test checks that each release's download is pinned to its revision; the revisions carry the secrets-detector allowlist pragma.
  • The README states the management-task exclusion by category and drops the internal tracker key ("None published yet"); a failed database restore prints its whole log (not rebuilt for this change: the line runs only when a restore fails).

pytest tests/unit_tests/benchmarks/test_bird_interact_prepare.py: 22 passed. Each new test fails with its change reverted. detect-secrets scan on prepare.py reports nothing.

@ffrujeri ffrujeri added feature New capabilities, enhancements, or enablement work area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers labels Nov 3, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 3, 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 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 0bf5d30

@ffrujeri

ffrujeri commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test a394e9c

@ffrujeri

ffrujeri commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 32bd186

@ffrujeri

ffrujeri commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 4670f7a

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 126be53

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 186aa92

@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 failures in manifest validation, a RISK-level validation gap, and one documentation NOTE. I inspected all 12 changed files and traced preparation through task materialization, routing, and the PostgreSQL runner. I did not execute tests or builds. The external image contents and withheld ground truth were unavailable for inspection.

RISK: Provide representative rollouts through this recipe

The supplied validation covers preparation, config resolution, and standalone database commands, but not a model rollout through the new PostgreSQL recipe. The Results section also records no results. This leaves the release rows, simulator, agent sessions, and grading unvalidated together. The protected quality bar requires representative real model rollouts; claims about a later stacked PR do not validate this head.

Could you run a small prepared Lite sample in both modes against the image built here and attach the commands, model/simulator settings, rollout artifacts, and inspected outcomes? A clearly labeled stand-in ground truth can validate plumbing, but must not be reported as a benchmark score or as validation of the withheld solutions. Keep the query-only exclusions and the documented simulator-parity limitation.

Acceptance: inspect a simulator interaction and a successful phase transition through each mode, confirm the recorded rewards match the configured phase rewards, and confirm the database sandbox is cleaned up. Report infrastructure failures separately from incorrect SQL, and keep Full and real-ground-truth coverage explicitly unvalidated unless exercised. This is a request for missing evidence, not a claim that these runtime paths fail.

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

Comment thread benchmarks/bird_interact/manifest.yaml Resolved
Comment thread benchmarks/bird_interact/prepare.py Resolved
Comment thread benchmarks/bird_interact/README.md Resolved
@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 8ca347d

@ffrujeri

Copy link
Copy Markdown
Contributor Author

Answer to the review summary's request for rollouts through the recipe. Fixes for the three threads are in 8ca347d6.

All runs on Docker sandboxes, with simple_agent, policy azure/openai/eccn-gpt-6.1-sol and simulator openai/openai/eccn-gpt-6-luna, on the current head of the stack (2026-11-17):

  • The server's five example tasks (SQLite), both modes, 10 episodes: 10 completed, none masked. c-Interact mean 0.78 (5 of 5 solved, including two two-phase tasks and a debug turn), a-Interact mean 0.82. No model call after any submission. No sandbox left running.
  • Lite through the recipe (PostgreSQL, the benchmarks/bird_interact:lite image), 3 tasks in both modes, 6 episodes: two management tasks (alien_M_2, alien_M_3) and a query task with a follow-up (crypto_2), on a stand-in ground truth written from their clear questions, because the real ground truth is not in hand. 6 completed, none masked, no failures; every phase passed on its first attempt, and simulator questions and BIRD-COIN charges are in the results. No sandbox left running. These rewards check the image, the protocol and the grading; they are not benchmark results.

How the Lite run was started: the recipe's config.yaml with a Docker sandbox provider for both servers, gym env start, then gym eval run --no-serve on the prepared rows (materialized by the new prepare.py) in both modes. Full and real-ground-truth runs remain unvalidated (GYMINT-592, GYMINT-680).

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 4f130a2

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 6e3a92f

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 771427a

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test eef4ee3

Comment thread benchmarks/bird_interact/prepare.py Resolved
Comment thread benchmarks/bird_interact/README.md Resolved
Comment thread benchmarks/bird_interact/README.md Resolved
Comment thread benchmarks/bird_interact/prepare.py Resolved
Comment thread benchmarks/bird_interact/prepare.py Resolved
Comment thread benchmarks/bird_interact/prepare.py Resolved
Comment thread nemo_gym/environment/validation.py Resolved
Comment thread benchmarks/bird_interact/Dockerfile Resolved
@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 169374b

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 6156974

ananthsub
ananthsub previously approved these changes Nov 20, 2026
@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 0accfdd

ananthsub
ananthsub previously approved these changes Nov 20, 2026
@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 646572e

@ffrujeri

Copy link
Copy Markdown
Contributor Author

/ok to test 5ed74e1

ffrujeri and others added 6 commits November 23, 2026 03:28
benchmarks/bird_interact runs BIRD-Interact's Lite and Full releases on
the bird_interact Environment Server, with PostgreSQL. One recipe holds
both releases and both modes: config.yaml (Lite, c-Interact),
a_interact.yaml, full.yaml and full_a_interact.yaml.

- Dockerfile builds the episode sandbox image from BIRD-Interact's
  official one (digest-pinned), with every database of the release
  restored at build time; Full is a build argument.
- prepare.py downloads the release from Hugging Face (its rows, and the
  schema, column meanings and knowledge base of each database), merges
  the ground truth that the authors send on request into the task and
  its follow-up, and writes the tasks the server can grade: those with
  ground truth and without custom test cases.
- Each release and mode has its own dataset, file and metrics; the
  manifest mirrors the Lite c-Interact config.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
… image's scripts expect

The restore script waits until `psql -U root` connects, and with no database
named after its user it never did, so the build hung. Create the `root`
database the base image's entrypoint would, and fail the build when the
script prints an import error or a dump folder did not become a database,
instead of only when none did.

Built for Lite: 18 of 18 databases, 175 tables, in 20 seconds; grading.py's
setup, execute and grade run against them in a container from the image.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
…he recipe in the docs

- prepare.py writes each task materialized for the mode's taskset, so manifest
  validation reads it as the Environment Server's task input.
- Static validation fills a vllm_model's endpoint (base_url, api_key, model),
  and the top-level settings it names, as deployment values, as it already
  does for an openai_model. gym env validate bird_interact no longer needs the
  user simulator's credentials; runtime parsing still requires them.
- The Fern environment list links the recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
…cept a solution written as one string

prepare.py reads the file the authors send from benchmarks/bird_interact/data/ by
default (bird_interact_gt_kg_testcases_1008.jsonl for Lite,
bird_interact_full_gt_kg_testcases_08022.jsonl for Full), which data/.gitignore
keeps out of the repository; ground_truth_jsonl still names another file. A file
that matches none of the release's tasks is refused.

The authors' Lite file writes 263 of its 300 follow-up solutions as one string, not
a list of statements, and the server refuses such a row. The merge turns a string
into a list of that one statement.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
…n the prepare tests in CI

From the team review of the stack:

- prepare left out a task only when it had test cases, so Full kept 17
  management tasks (427, not 410), 7 of which this server cannot grade. It
  now keeps the tasks whose two phases are both Query (a phase without a
  category is one, as in the ADK): 195 in Lite and 410 in Full.
- The Hugging Face download is pinned to the revision the ground truth files
  belong to.
- The prepare tests sat where no CI job collects them; they move to
  tests/unit_tests/benchmarks/, with tests for the category rule, a row the
  server could not read, and each release reading its own download.
- The README asks for env.yaml before preparing, which reads the config, and
  says that run outputs carry the ground truth. The docs row says what grades
  the tasks this recipe keeps. validation.py's comment says what its patterns
  fill, and a test checks that a supplied model setting stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
…ownload, and keep rows on an empty one

- `prepare` reads the ground truth file before the download, and refuses a missing file, a line that is not JSON or
  an entry with no `instance_id` with a ValueError that names the file and the line. A `null` ground truth field
  becomes an empty list.
- An empty ground truth file only downloads the release; it no longer replaces the rows already written.
- A test checks that each release's download is pinned to its revision; the revisions carry the secrets-detector
  allowlist pragma.
- The README states the management-task exclusion by category and drops the internal tracker key; a failed database
  restore prints its whole log.

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

Copy link
Copy Markdown
Contributor Author

/ok to test ce9e47a

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/45125295764

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.

4 participants