Repository navigation
feat(agentvista): add original and OpenCode evaluation pipelines - #5772
Conversation
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
…endings Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
yfw
left a comment
There was a problem hiding this comment.
HOLD. Four setup and CI breaks block merge. The scoring comments explain what to change after that. The design comment recommends a larger change that does not block merge.
AgentVista is a useful benchmark to have in Gym. The work is careful: pinned upstream sources, hash-bound task data, separate failure kinds and sanitized evidence.
Design: Gym's direction is environments that any session harness can run. The OpenCode half of this PR duplicates opencode_agent with a second launcher on the deprecated /run relay. The comment on benchmarks/agentvista/config.yaml:39 says what to change, and how a coding agent can do it with the add-harness skill. Our Harness-Ready Environments runbook walks through this move step by step. The move does not block merge, and the choice is yours. We recommend it in this PR.
Evidence: the live runs in the description used earlier commits and private infrastructure, so reviewers cannot repeat them. The last commit also breaks server setup.
Process: CI ran only the DCO and lock-freshness jobs, and both pass. The other workflows wait for a maintainer to approve this head. The PR has no merge conflict with main. Local runs at this head: pre-commit passes. The full core unit suite has 3 failures that this PR causes, at requirements.txt:1, test_requests.py:123 and slurm_script.py:234. The CI server suite also fails on the missing agent README, noted at app.py:9. gym env test for the agent stops at setup until requirements.txt is removed.
Generated by Claude Code
…tories Signed-off-by: Pritam Biswas <[email protected]>
…ion protocol Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
|
Synced current main |
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
|
/ok to test 17b23b7 |
Signed-off-by: Pritam Biswas <[email protected]>
|
/ok to test 382bd12 |
Signed-off-by: Pritam Biswas <[email protected]>
|
/ok to test f034c03 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43825877505 |
Signed-off-by: Pritam Biswas <[email protected]>
|
/ok to test 59aeee1 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43925909654 |
Approved-PR conflict resolution
Merged current
main(a349aa68) with a signed merge commit, retaining the reviewed AgentVista harness/verifier unchanged. Resolved three conflicts in telemetry/Slurm tests and rendered fixtures: keep upstream's node-local collector/copy-out lifecycle and retain explicit Slurm account propagation. No rebase, force-push, review dismissal or branch-rule change.Approval status: GitHub automatically dismissed the prior approvals from yfw and chtruong814 when this merge commit was pushed (review IDs 5913673361 and 5914337237; timeline dismissal commit matches this head). The earlier API-visible rule inspection did not predict this behavior. The approvals were not preserved, and fresh reviewer approval is required; no review or branch-protection bypass was attempted. All 365 telemetry/Slurm tests and 105 native AgentVista/resource/core tests passed on the merged tree. Full pre-commit and secret scanning passed; the optional private guardword catalog was unavailable locally. New model smoke: N/A for fixture conflict resolution; AgentVista adapter files match the previously approved/live-tested head.
CI passed on
59aeee16baca63ca945bfe28866bf047694acbb2: main CI, wheel build/validation. All four core shards, all eight server shards, sandbox tests, AgentVista/CrewAI compliance and selected harness conformance passed. Combined core coverage is 95.03%, above the unchanged 95% threshold. All 85 check runs completed with no failure/pending state. Approval preservation failed: the original approvals were automatically dismissed on this push; current review decision isREVIEW_REQUIRED.AgentVista provides two evaluation-only protocols through NeMo Gym: the original greedy harness and OpenCode CLI 1.17.11 with the original four tools over MCP. Both route policy traffic through Gym and use the original answer judge. Preparation, source checks, runtime builders and benchmark code live in Gym. No separate issue is needed for these CI integration repairs to the benchmark introduced by this PR.
Latest reviewer fixes
0 < output_tokens < context_tokensas maskedagentvista:setupfailures before source loading or inference, matching OpenCode. Invalid settings no longer reach upstream's empty-answer scoring path.JudgeErrorreaches Gym's standard/verifyfailsafe asjudge_failed, preserving the exact saved answer for a later verification. Measured zero/one verdicts remain reusable across retries and restarts; concurrent duplicates share one judge subprocess. No automatic retries or manifest-reverification support are added.top_p=0.95; the first attempts at the benchmark default1.0were rejected and masked. Reruns use an explicit per-row provider override, leaving benchmark defaults unchanged. The receipt reports actual outcomes and execution-health limits; it is not a benchmark accuracy estimate.Upstream
mainat76116d5dis merged so GitHub can construct a testable merge revision. The one CrewAI timeout-test conflict retains upstream's deterministic deadline trigger and the exact request-count assertion; both affected CrewAI tests passed. The merged AgentVista/native/core suite passed 105 tests. AgentVista and VLLM adapter files are byte-for-byte unchanged from the live-smoke commit. Previous-head CI passed onf034c038cc45eb85fcaf4a6ef4d00a455b8263f2: main CI, wheel build and validation. All four core shards, all eight server shards, sandbox tests, AgentVista/CrewAI compliance and the selected harness probes passed. Combined core coverage is 95.04%, above the unchanged 95% gate. Secrets, lint, copyright, DCO, guardwords and Linux/macOS lock checks passed.CI failures addressed
Register
agentvista_agentinAGENT_SESSION_AGENT_TYPES; configuration composition now recognizes the session hooks.Add the verifier's required
task_data.pywith hash-bound task identity and legacyverifier_metadataplacement. Bind the agent's dataset to the Resources Server so collation selects that schema.Correct the manifest to name the
agentvistaimplementation rather than theagentvista_resourcesruntime instance. Use the verifier profile and four offline fixtures (positive, negative, missing reference, unparseable provider). CI validates the production judge adapter with only the external provider/source module replaced; no fabricated example rollouts or metrics are committed.Give runtime paths documented container defaults so manifest/fixture validation resolves without cluster-only environment variables. Source and worker defaults match the runtime image; datasets remain external and every real run checks source/task hashes.
Repair shared timing-sensitive tests: real HTTP retry-budget correctness is asserted by one actual request and exact fake-clock tests, without a scheduler-dependent 150ms ceiling. CrewAI deadline fixtures allow cold imports, require partial output/readiness, and retain deadline, cancellation, usage and sandbox-cleanup assertions. Product timeouts/retry policies are unchanged.
Remove CrewAI's redundant rejection-only
run()override. It now inherits Gym's standard terminal 422 refusal (previously 409); its normal agent-session execution is unchanged. The refusal regression and the actual CrewAI compliance probe both pass with no findings.Add core verifier-boundary regressions for measured-zero preservation, concurrent retry sharing, durable receipts, actor-score rejection, missing evidence, aggregate metrics, incomplete receipts and failed judge subprocesses. The previous complete CI passed all four core and eight server shards plus both compliance probes; its combined coverage was 94.94%. Replaying its five coverage artifacts with these new tests reaches 95.03%, above the unchanged 95% gate. Core tests import types from their defining modules; the exact repository import-boundary check and all three manifest/verifier tests pass together.
Episode and scoring ownership
Gym's
single_agent_turn_legacyEnvironment Server owns seed → activate → close → verify. Its name refers to the flat-row adapter; it does not relay to a custom agent/run. The agent implements real session hooks and defines neitherrun()noraggregate_metrics().The dedicated Resources Server owns the original judge and score aggregation. Gym strips
VERIFIER_*credentials from actor workers; the native loop's terminal score callback records its original assistant-response list. Only the verifier establishes measured rewards, rechecks task/image identity, and persists completed verdicts so HTTP retries do not invoke the judge again. Provider/parse/binding/process failures stay masked; a measured wrong answer stays an unmasked zero. Verifier deadlines/cancellation kill its process. Unsupported borrowed sandboxes and required external tool grants are refused with 422; close cancels an active worker and returns cleanup confirmation plus an explicit observation gap.Harness 5.0.0 needs freshly prepared rows with agent seed context and fresh outputs. Both benchmark config names and Factory's
--agent agentvista_agentselector remain unchanged. Training, checkpoint continuation, arbitrary pairings, typed tool/model joins and complete usage are unsupported. Admission/retry bindings support one server worker. Stockopencode_agentgeneralization remains separate work.Code-tool isolation
Both harnesses run the original
code_interpreterin a mandatory Bubblewrap sandbox. Gym'sAsyncSandboxsupervises the fixed launcher; the local process provider itself is not the isolation boundary. Bubblewrap unshares the filesystem/process/network namespaces, clears the environment and drops capabilities. There is no host fallback.bwrapand a host/container policy allowing nested user namespaces are required. Both image builders provision Bubblewrap; rebuild older worker images. Namespaces share the host kernel and do not provide VM isolation. Runtime prefixes must be trusted code/library trees, and resource admission remains the deployment's responsibility.Validation
gym env test +entrypoint=resources_servers/agentvista +should_validate_data=true, including all ten server tests and the four offline verifier cases. The manifest's implementation binding and dataset schema have dedicated regression tests.pre-commit run --all-files,git diff --check, and the exact secrets-detector hook passed. The optional private guardword catalog was unavailable locally; no CI exclusions were added. New commits carry DCO sign-off. Main76116d5dis merged.Two fresh bounded Kimi K3 API smokes loaded the actual benchmark YAML includes, validated prepared rows with the Resources schema, and exercised Environment Server → agent sessions → Resources Server → original judge. Both retained valid measured zeros. OpenCode made two tool calls with no native/tool errors and reached its 240-second actor deadline with retained output, scored under the existing policy; this is not healthy-execution qualification or a benchmark accuracy estimate. Receipt: review-v5-ci-wiring-api.json.
No full-dataset evaluation or new runtime image build is claimed. Previous-head trusted CI passed on
17b23b7dea401f353c96a132db4ee5e46dc4227c: main CI, wheel build/validation. All four core shards, all eight server shards, sandbox tests, both AgentVista/CrewAI compliance probes and all selected harness conformance probes passed. Combined core coverage is 95.03%, clearing the unchanged 95% gate. Secrets, copyright, DCO, lint, guardwords and Linux/macOS lock checks passed. The earlier 94.94% coverage failure and subsequent test-import boundary failure are resolved on this exact head.Benchmark questions, answers, prompts and judge rules are unchanged. Existing frozen cluster campaigns are untouched. Shared Slurm/account and bound-directory changes remain split into #6116 and included in this branch; #6015 has not been rebuilt on that dependency here.
Public dependencies and licensing
The unmodified original implementation is a runtime dependency pinned to hkust-nlp/AgentVista a3385d51d0c3dd0c8501350a08d52065e3e94ab4, not vendored or relicensed into Gym. Runtime source hashes are recorded in
responses_api_agents/agentvista_agent/runtime/source-pin.json. The public Warrieryes/AgentVista dataset is pinned to release revision61de767ad8c72e258ac71a0aef952b89ca920a16and licensed CC-BY-4.0. Gym-owned integration files retain NVIDIA SPDX notices; external data/source/assets are provisioned separately.Secrets-detector baseline
The earlier fix contains 51 exact reviewed non-secret provenance-digest/revision fingerprints, including 26 source digests verified against pinned upstream Git objects. Existing baseline entries, detector plugins and exclusions were preserved; a fresh synthetic entropy control remained detected. This CI repair adds no detector exclusions or suppressions.