Repository navigation
feat(rna_design): RNA design environment - #4931
Conversation
6a13c0b to
04defd4
Compare
Signed-off-by: Christian Munley <[email protected]>
04defd4 to
853f316
Compare
Each one cost a model a round, a campaign, or a wrong score, and each is reachable by following the prompt's own instructions. - A tool called without `target` fell back to one fixed campaign and scored designs against that campaign's structure. The campaign in progress is the default now, and `target` passed to a tool that has no such field is ignored rather than discarding the call -- report.rules was losing a whole ruleset to it. - A missing required argument raised the input dataclass's own TypeError, naming a class no model has heard of. It names the tool and the field. - score.fold_match refused engine="EternaFold", which is how the engine and the tool's own prose spell it. Matched case-insensitively. - code.call bind-mounted the toolbox into the sandbox and ran the script from there. When the harness is itself in a container that path does not exist on the host, so the mount is empty and every call to a saved tool fails. The script is staged into a work directory of its own, as code.run already does, which also stops a script reading the other tools in the box. - A gateway that answers its own database trouble with 401 ended the run: every 401 was fatal. That one is retried (a wrong key reads differently and still fails at once), with eight attempts, a 60 s cap and jitter so parallel runs do not retry in lockstep. Tests cover all five. Two tests in resources_servers/rna_design fail on this branch before and after this change (report_rules' out_dir is exposed over MCP, and an unreached-model rollout is not masked). Signed-off-by: Youhan Lee <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The detector reads `anthropic_api_key: unused` as a credential and the pinned RNAInvBench commit and the two SHA-256 digests as high-entropy secrets. All four are public constants: the key is the literal the Gym model server ignores, and the hashes are what make the downloaded data verifiable. Signed-off-by: Youhan Lee <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
The data table credited every set to RNAInvBench's MIT licence. RNAInvBench collates sets published separately, and ArchiveII states no licence at all, so the table now names each set's origin and terms and points at the Mathews lab site for that one. Nothing is redistributed here either way: the suites are built on first start from published files at a pinned commit, which the README now also says needs network access. Signed-off-by: Youhan Lee <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Both call EternaFold and neither carried @needs_eternafold, so they failed rather than skipped wherever arnie is absent -- which is any environment that has not run the server's requirements. Signed-off-by: Youhan Lee <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
|
/ok to test baac8f7 |
|
/review |
Signed-off-by: Christian Munley <[email protected]>
|
/ok to test a726fdc |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — the latest review’s concrete fixes remain intact; no eligible findings remain.
- Malformed model arguments: the parser still retains usage and carries malformed JSON into recoverable dispatch. The regression assertions require an unmasked zero, retained tokens and zero environment faults.
- Reflection allowance: the runner still snapshots the allowance before restoration. The regression retains the empty-pool and disallowed-choice assertions. Canonical-name enforcement, operator-field rejection and trusted-controller dispatch retain their existing branches.
Compared with reviewed head 5fd73071158ea3ffff4cd39d1ee23254117cc7ee. All 68 changed paths were accounted for and inspected across three non-overlapping topics, followed by cross-component validation. Discovery remained follow-up-scoped with the historical high-impact ceiling; no newly introduced finding above that ceiling was validated. The large rollout artifact received bounded inspection and a whole-file digest comparison, not exhaustive trajectory analysis.
Read-only static review; tests were not executed.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
max_turns 40 -> 1000, so the campaign's round budget, not the turn cap, ends a run. The Claude Code timeout goes from 2400 to 3600 s and rollout_timeout from 2700 to 3900 s, the same wall budget as the agent mode. Signed-off-by: Christian Munley <[email protected]>
… arguments - The resources server closes its tool workers when it stops and when a worker fails to open. session_ttl_s sits just above the harness's rollout_timeout. - Tools stop a minute short of the server's call limit (RDS_TOOL_TIMEOUT_S), so a late reply cannot answer the next call. - grnade rejects an unknown mode or filter_metric, and a structure path that does not exist, as the model's error. Scratch directories go under the run directory. - code.call runs only names code.run can save under, and target_specific also checks the ruleset notes. - Tests for each. The process-exit checks read the ps state, so a zombie counts as gone. Signed-off-by: Christian Munley <[email protected]>
On a CPU-only node gRNAde's wall time still counts against gpu_seconds, so one call on a long target can spend most of the budget and end the campaign. State it in the README and fix the runner comment, which said the time is charged to the axis it was spent on. Signed-off-by: Christian Munley <[email protected]>
- n and batch_size below 1, and temperatures outside 0 < min <= max, are the model's error, not an environment fault that masks the campaign. - mode='3d' on a target that supplies no backbone is the model's error too. A backbone the operator should have provided stays an environment fault. - Run-level test for the goal and hidden objective views: the campaign runs under an alias and the suite's protocol still judges the pool. - README: on CPU, Claude Code also needs a higher call_timeout_s and MCP tool timeouts, not only rollout_timeout_s. - ruff format on the resources server tests. Signed-off-by: Christian Munley <[email protected]>
… child - grnade refuses non-integer n, batch_size, n_pass and seed, and a seed outside [0, 2**32), as the model's error instead of an environment fault. - A backbone the task or the model names means 3d, so a missing one fails (environment fault for the operator's, model error for the model's) instead of quietly running 2d. - Under a goal or hidden objective, MCP campaigns show the harness an alias as benchmark.run_one does, and an empty @top selection no longer names the ranking metric. Tests check the view, the agent prompt and the alias. - Closing a tool worker kills its process group even when the worker already exited, so a gRNAde child it left behind goes too. Signed-off-by: Christian Munley <[email protected]>
…e_session The seed reply now names its session (resources_session_id), and close_resources_session closes that session's tool worker by that id. A harness that gives up on a rollout can release its worker at once instead of leaving it to session_ttl_s. Closing an unknown or closed session succeeds, and ResourcesSessionFence keeps a late seed from reopening a closed one. Seed and close hold the fence's per-session lock, so a close cannot slip in while a seed is still opening its worker. Signed-off-by: Christian Munley <[email protected]>
Resolve harness_agent tests: keep both the MCP forwarding tests and main's task-workdir test. Signed-off-by: Christian Munley <[email protected]>
|
/ok to test e32819c |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — the latest review’s concrete fixes remain intact; no eligible findings remain.
- Malformed model arguments: the parser retains usage and carries malformed JSON into recoverable dispatch. The regression assertions retain one failed call, zero environment faults, unmasked reward zero and retained tokens.
- Reflection allowance: the runner still snapshots the allowance before restoration. The regression retains the empty-pool and disallowed-choice assertions. Canonical-name enforcement, operator-field rejection and trusted fixed-controller dispatch remain intact.
Compared with reviewed head adec338990101463594080a5a25efdc2c6f3ed6d. All 68 changed paths were accounted for and inspected across three non-overlapping topics, followed by cross-component validation. Discovery remained follow-up-scoped with the historical high-impact ceiling; no newly introduced finding above that ceiling was validated. The large rollout artifact received bounded inspection and a whole-file digest comparison, not exhaustive trajectory analysis.
Read-only static review; tests were not executed.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
…prints off the reply stream - gRNAde takes at most n=5000 and batch_size=512 per call, and a run that outlasts its time limit is the model's failed call, so an oversized request cannot turn a loss into a masked sample. - A final scoring call that times out or finds the worker dead returns a masked sample instead of an HTTP 500. - The tool worker sends replies on a private copy of stdout and points fd 1 at stderr, so a tool's own prints cannot break a reply. - harness_agent refuses forward_mcp_tools together with agent_kwargs.mcp_config instead of silently dropping the user's servers. Signed-off-by: Christian Munley <[email protected]>
@cmunley1, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test e9f7808 |
|
/review |
What does this PR do?
Adds RNA inverse folding as both a benchmark and a training environment: given a target secondary structure, design sequences that fold into it. Each rollout is one design campaign with a fixed budget of tool calls on a published generator (gRNAde), a folding engine (EternaFold) and the suite's scorers. When the budget is spent the whole pool is re-scored with the suite's own metric and gates, and the reward is 1.0 if the campaign solved the target.
environments/rna_design: the manifest-backed catalog entry, with the run instructions and one config per mode.config.yaml(the catalog workload) is Claude Code in a sandbox calling the tools over MCP.config_agent.yamlputs the model in the loop with no sandbox, andconfig_fixed,config_fixed_deepandconfig_generatorare model-free baselines on the same budget.responses_api_agents/rna_design_agent: the campaign loop and tools (rds/, Apache-2.0). Each campaign runs in its own worker process.resources_servers/rna_design: the same tools over MCP, one worker per rollout, withverifyre-scoring the pool. It exports aVERIFIER_FIXTUREwhose cases run through the server's own routes.harness_agentgains an opt-inforward_mcp_toolsflag (default off) that hands the resources server's MCP tools to Claude Code inside the box.Data: eight suites, 1,694 targets, built on first start from the published RNAInvBench files (MIT) at a pinned commit, each file checked against its SHA-256 before it is loaded. Only five Eterna100 v1 example rows are in the repository. Each set's own terms are listed in
LICENSE-third-party. EternaFold (BSD-3) is cloned and built on first start. gRNAde and its public checkpoints are set up withprepare.py --setup. ViennaRNA is not used, because its licence restricts redistribution.No issue: this is a new environment, contained in its own directories plus one opt-in
harness_agentflag.Validation
gym env validate rna_design,gym env test rna_design(3 verifier cases: an exact fold scores 1.0, a design with no pairs 0.0, a request with no target is rejected) andgym env publish rna_design: all pass.gym env test +entrypoint=resources_servers/rna_design +should_validate_data=true: passes, example data validated.gym env test +entrypoint=responses_api_agents/rna_design_agent: passes (5 tests skip without torch).pytestover both components andresponses_api_agents/harness_agent, with currentmainmerged in: 89 passed, 5 skipped.pre-commit run --all-files: clean.Rollouts
Every run below follows the README from a fresh clone of the branch, with the steps that need internet (gRNAde setup, the suites, the EternaFold source) done once on a login node. The model is DeepSeek-V4.1-Flash, self-hosted on vLLM behind the Gym
vllm_modelserver (reasoning_field=reasoning, which this endpoint needs).Claude Code (
--environment rna_design) on the five example rows:eterna100_v1_57eterna100_v1_50eterna100_v1_72eterna100_v1_75eterna100_v1_121No rollout was masked. The run uses only the README's two commands, with no addresses or ports: the config sets
use_absolute_ip, and since #4795 the harness routes the sandbox's model calls through the Gym model server by default. The example rollouts are inresources_servers/rna_design/data/example_rollouts.jsonl, with the node address and the per-rollout MCP session token redacted. Their only tool errors are two rulesetsreport_rulesrefused for naming the target, which is that check working.The agent mode (
--environment rna_design/config_agent) was run on 20 Eterna100 v2 rows built byprepare.py. The campaigns are slow on CPU, and the partial results so far show no masked rollouts. Read one by one, the unsolved ones are the model's own: one stopped early at a best F1 of 0.92, another used all 12 rounds and reached 0.73.Reading earlier rollouts on this branch found faults that are fixed here: operator-only fields in the MCP schemas (the model passed
out_dir: /work/rules), endpoint errors scored as 0 instead of masked, tool workers left running when a rollout died before/verify, temp run directories never removed, and two servers racing to build EternaFold in one fresh checkout.Compatibility and benchmark impact
harness_agent:forward_mcp_toolsdefaults to false, so existing configs are unaffected.agent_runner.pyalso substitutes__WORK_DIR__in the agent config, which is a no-op unless a config uses it.arnie,pandas(to read the RNAInvBench files) andhuggingface_hub(agent only).git,makeand a C++ compiler. On nodes without internet, runprepare.pyonce where there is.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).