Repository navigation
Conversation
Port the Fabric 0.5.0 upgrade and output conversion from Christian Munley's unmerged PR #5057 (63d4ed9), then add a sandboxed Evaluation session bridge. Resources and Environment Servers retain ownership of task setup, verification, and sandbox lifetime. Signed-off-by: yaoyu-33 <[email protected]>
…ssions Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
…ssions Signed-off-by: yaoyu-33 <[email protected]>
… in-sandbox import Fixes from the team review of #5538 (Linear GYMINT-145): - Seed: refuse token-ID capture, a loopback model URL on a remote sandbox provider, and deterministic sandbox configuration errors (bad sandbox_config, undefined provider, unsupported platform) with a final 422 instead of a retried 500. An agent-owned sandbox gets a finite ttl_s. - Activation: an adapter "timeout" result is an incomplete rollout that is verified, not a 500. Fabric stops Claude and Codex ten seconds before Gym's deadline and they report that error. Reject an empty input. - Import cached_download lazily, so harness_agent's in-sandbox bundle (nemo_gym plus this package) still imports app.py. - Install nemo-gym[dev,sandbox] on the host, as the other session agents do. - Hash the Python archive once off the event loop; build the health check from FABRIC_VERSION; keep a malformed Relay ATIF file from stopping the worker. - Docs: state what the runtime checksums cover, the install tools and egress, the preset and host-path behavior changes, and show timeout and max_turns overrides in the SWE-bench Pro example. - Tests: lifecycle, release, timeout, validation and runtime-install cases, and a guard that fails if the import needs another agent package. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test eec420e |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test ce46731 |
Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test ff9e727 |
There was a problem hiding this comment.
I would keep this as a draft for now. The adapter has no outcome typing: app.py has no classify_outcome, never calls report_outcome, and the diff imports no failure_kinds, so model-side endings and harness faults are indistinguishable to the outcome policy. Details inline.
Mergeable once model-side endings are typed, the deadline contract is explicit and tested, and the cross-adapter version bump is split out or comes with a comparison.
| details = {k: v for k, v in error_mapping.items() if k != "message" and v not in (None, {}, [])} | ||
| if details: | ||
| error = f"{error} ({json.dumps(details, default=str, sort_keys=True)})" | ||
| raise RuntimeError(f"NeMo Fabric invocation failed: {error}") |
There was a problem hiding this comment.
Blocking: _response_from_result raises RuntimeError("NeMo Fabric invocation failed") for every failed Fabric result outside the three-item _MODEL_STOPS set. Context limits, model request errors and transport errors become a retryable 500, indistinguishable from a harness crash, and a resumed run resamples them. Type them (model_context_limit, model_request_error, model_transport_error) and end them as the model's zero or a final typed outcome; infrastructure faults stay raised.
| cleanup = state.session.cleanup | ||
| timed_out = bool(cleanup and cleanup["timed_out"]) | ||
| # The adapter stopped itself at its own deadline: an incomplete rollout to verify, like a supervisor timeout. | ||
| adapter_timeout = failure is None and _mapping(_mapping(result).get("error")).get("code") == "timeout" |
There was a problem hiding this comment.
Blocking: adapter_timeout trusts the adapter's own "timeout" code and returns incomplete. Fabric stops ten seconds before Gym, so this is the normal path, and it cannot tell "model never answered" from an agent timeout. The deadline contract needs one explicit answer with a test for the no-reply case.
| "nemo-gym[dev]", | ||
| "nemo-fabric[claude,codex,deepagents,hermes-agent,mini-swe-agent]==0.2.0", | ||
| "nemo-gym[dev,sandbox]", | ||
| "nemo-fabric[claude,codex,deepagents,hermes-agent,mini-swe-agent,nooa,openclaw,openhands,relay]==0.5.0", |
There was a problem hiding this comment.
Blocking: the 0.2.0 to 0.5.0 bump also changes anyswe_agent, anyterminal_agent and the harness_agent presets. Split the bump into its own PR or add a before/after comparison for them; the host /run change that scores turn limits belongs in the same split.
| _MODEL_API_KEY_ENV = "NEMO_GYM_FABRIC_MODEL_API_KEY" # pragma: allowlist secret | ||
| # Adapter failures that are the model's own outcome, as (error code, metadata subtype): the model ran out of turns or | ||
| # its step budget, so the rollout is verified and scored. | ||
| _MODEL_STOPS = frozenset( |
There was a problem hiding this comment.
Non-blocking: the _MODEL_STOPS incompletes carry no kind (same gap as #5654; follow-up for all).
| if cleanup: | ||
| access = state.request.sandbox_access | ||
| state.observations.records.append( | ||
| SandboxObservation( |
There was a problem hiding this comment.
Non-blocking: SandboxObservation has no sandbox_id; list what each unobserved health check was missing.
| tar -xzf "$scratch/source.tar.gz" -C "$generation/source" | ||
| # Installed console scripts reference this permanent path, so never rename the generation. | ||
| # The installer alone owns the lock; an orphaned pip process cannot retain it after a kill. | ||
| "$generation/python/bin/python3" -I -B -m pip --isolated install --no-cache-dir \ |
There was a problem hiding this comment.
Non-blocking: no network_access for owned sandboxes; the in-sandbox pip install is unpinned beyond the Python archive, so the runtime is not reproducible across a resume.
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 1df46ff |
Signed-off-by: yaoyu-33 <[email protected]>
Fabric can now run through the agent-session interface inside the task sandbox supplied by Resources. Environment Server owns seed, activation, close, and verification; Fabric supplies only the agent. This updates the integration to NeMo Fabric 0.6.1, following #5057 at
15ad05a47d0e09170973f4e7fad30f660f83cfbe.This is an experimental Evaluation integration. Keep it draft for architectural review. It does not expand benchmark allowlists or qualify training, full SWE/Terminal-Bench runs, or parity with native harnesses. No separate issue is needed for this bounded follow-up to #5057.
Changes:
SandboxSessionsupervisor, a private runtime, one idempotent activation, confirmed termination before verification, and explicit observation gaps. Required remote grants, static MCP/skills, task-specific users, continuation, unsupported request controls, and token-ID capture are refused.b200f5bc60e31588ba2cb60e288029c4a54ba5fa) runs in an isolated Python 3.14 environment with Relay 0.11.1 and its own dependency overrides. The existing Anthropic preset also installs Hermes' Anthropic extra. Sandbox Python is checksum-pinned to 3.14.9. The optional host path installs its Python 3.14 worker on first use, shares concurrent installation, surfaces failures, and permits retry.fabric_config.models.default.settings.cost_tracking: disabledwith a positiveruntime.max_turns. Fabric 0.6.1 ignores the oldMSWEA_COST_TRACKINGvariable; custom configurations using it must migrate. OpenClaw's documented CLI requirement is updated to 2026.9.34.Compatibility and limits:
sandbox_provider. Host/runremains available with an explicitresources_serverbinding andlegacy_agentenvironment. Custom host Hermes configs must setadapter_project: hermes_env.HOME; its effects on SWE home-directory behavior remain unqualified.not_fulfilled. No native harness, Resources Server, Environment Server, task data, or verifier is modified relative to main.Current repair at
bb0b0386c11ce88133b5409274e48b8ac9f28553(November 6), merging main9135278961525a4529f9369dc066a2f121a8e01a:/runand AnySWE callers retain exceptions for non-verifiable outcomes, so retries cannot become graded samples.Validation ran on the Linux workstation with Python 3.13.14 and locked component dependencies. All-files
pre-commit run --all-files, whitespace checks, and DCO passed; the workstation source tree matches this commit.gym env test +entrypoint=responses_api_agents/nemo_fabric_agent +should_validate_data=true ++skip_venv_if_present=true: 209 passed. The earlier component + typed-outcome + dependency-policy run passed 222 tests, before the three additional host compatibility regressions. Original-source reproduction fails 17 of 18 selected new cases. The merged component lock resolves cleanly and remains unchanged.One Reasoning Gym sages/fools task used an agent-owned
debian:bookworm-slimsandbox, NIMnvidia/nemotron-3.5-super-vl-120b-a12b, temperature 0, top_p 1, max_tokens 4096, thinking disabled, a 240-second budget, and the unchanged verifier. Fabric 0.6.1 mini-SWE completed with original reward 1; health/profile commands passed. Strict evidence remains not_fulfilled: invocation/turn/tool ownership and sandbox identity are unavailable, and the legacy result omitsevaluation_completed. Usage is explicitly unknown. This smoke exercised the repaired session/usage path before the final host-only failure guard; that guard is covered by the final component regressions. Servers and sandbox were cleaned up. This is not full conformance or benchmark qualification.Historical validation for
1df46ff97c01d6335f8284334a5c92f844be034a, based on main3a19fead7:uv sync --lockedanduv lock --check: passed.gym env test +entrypoint=responses_api_agents/nemo_fabric_agent +should_validate_data=true ++skip_venv_if_present=true: 180 passed.pytest tests/unit_tests/tooling/test_component_dependencies.py responses_api_agents/harness_agent/tests -q -o addopts= -o log_cli=false: 69 passed.pre-commit run --all-files, whitespace checks, and DCO: passed. Fernnpm run check: 0 errors, 1 warning.4546c47d703858f14aff0d01b801f57d658047fd.Real-model smoke on 2026-11-05 used the same Reasoning Gym task, Nemotron model, sampling settings, Docker image, budgets, and unchanged verifier. Version-specific adapter prompts and dependencies differ, and the baseline has an older Gym base; this is a compatibility smoke, not a causal performance comparison.
/run, Relay onHermes outputs included additional prose; the 0.6.1 session with Relay also gave the wrong final assignment. The session without Relay and the host with Relay ended at the correct assignment after initially stating the wrong one. The unchanged scorer gave 0 for all Hermes cases. All three final session cases closed before verification, and all eight final-version model calls returned HTTP 200. Host Relay retained one ATIF trajectory. The three session health verdicts are unobserved, and strict evidence inspection is not_fulfilled, consistent with the Evaluation limitation. No task-owned server or sandbox remains.
The initial failed attempts are retained: mini-SWE failed price lookup with the obsolete environment flag, Hermes lacked its optional Anthropic SDK, and the host uv version could not select Python 3.14.9. The final runs above use the corresponding configuration/dependency fixes. Earlier Claude, TB, and cluster smoke receipts predate this upgrade and do not qualify 0.6.1.
Historical full CI for
1df46ff97c01d6335f8284334a5c92f844be034a: run 42257147997 completed with a failure in Core tests shard 3; it is not a passing result for the new head. Full CI for the new head has not been triggered through a trust comment.