Repository navigation
Conversation
adil-a
force-pushed
the
adasif/harbor-m4-hermes
branch
from
September 24, 2026 08:52
360f248 to
d87fd1b
Compare
adil-a
force-pushed
the
adasif/harbor-m5-poc
branch
2 times, most recently
from
September 24, 2026 09:00
d9b73b7 to
e0d5c8b
Compare
adil-a
force-pushed
the
adasif/harbor-m4-hermes
branch
2 times, most recently
from
September 24, 2026 09:15
ec2cb9b to
c4e41c6
Compare
adil-a
force-pushed
the
adasif/harbor-m5-poc
branch
from
September 24, 2026 09:15
e0d5c8b to
68ccdae
Compare
This was referenced Sep 24, 2026
adil-a
force-pushed
the
adasif/harbor-m4-hermes
branch
from
September 28, 2026 19:35
c4e41c6 to
f444bcc
Compare
adil-a
force-pushed
the
adasif/harbor-m5-poc
branch
from
September 28, 2026 19:35
68ccdae to
93c7d95
Compare
adil-a
force-pushed
the
adasif/harbor-m4-hermes
branch
from
September 28, 2026 20:10
f444bcc to
7c8a8d3
Compare
adil-a
force-pushed
the
adasif/harbor-m5-poc
branch
from
September 28, 2026 20:10
93c7d95 to
df930e1
Compare
adil-a
force-pushed
the
adasif/harbor-m4-hermes
branch
from
September 30, 2026 03:48
7c8a8d3 to
b025138
Compare
adil-a
force-pushed
the
adasif/harbor-m5-poc
branch
from
September 30, 2026 03:48
df930e1 to
0c583b6
Compare
adil-a
force-pushed
the
adasif/harbor-m5-poc
branch
from
October 4, 2026 23:19
0c583b6 to
af4bd64
Compare
adil-a
force-pushed
the
adasif/harbor-m4-hermes
branch
from
October 4, 2026 23:19
b025138 to
531e64d
Compare
adil-a
force-pushed
the
adasif/harbor-m5-poc
branch
from
October 15, 2026 04:51
e132625 to
5b9339e
Compare
linj-glitch
pushed a commit
to linj-glitch/Gym
that referenced
this pull request
Oct 15, 2026
…zed rows (NVIDIA-NeMo#3673) ## What does this PR do? M1 of the Harbor tasks RFC (GitLab MR 340): read Harbor's task format into NeMo Gym materialized rows. First PR of the stack, based directly on `main`. Rebased onto main 128eab4 (2026-10-04). The review fixes from that date are listed below. Adds `nemo_gym/tasks/harbor`: - Pydantic mirror of `task.toml` schema 1.4 with Harbor field names. Deprecated spellings (`version`, `image`, `memory`, `storage`, `allow_internet`) are read and normalized, never written. Keys the mirror does not know are ignored with a warning, as Harbor ignores them. `docker_image` is optional. - Discovery: a folder with `task.toml` is one task. Otherwise its direct children are the tasks. `task_id` is the folder name. A task folder that does not load is skipped with a warning and listed in `PreparedTaskset.skipped`, so the rest of the dataset still prepares. - Base-image-only Dockerfile detection (`FROM` plus `WORKDIR`/`ENV`/`USER`/`LABEL`). Such tasks run the base image directly. `task.toml` settings win over the Dockerfile. - Whole-folder digest in `task_data._ng_digest`, same record format as the Harbor package publisher, so a server can refuse a row whose folder changed. - `harbor:<dataset>[@Version]` resolves the Harbor registry, pins `HEAD` to a commit, and fetches task folders into the shared datasets folder (`$NEMO_GYM_DATASETS_DIR`, default `./datasets`, now gitignored) under `<dataset>-<version>/` with a `manifest.toml` of pins. Task folders already present keep the pins the manifest recorded for them. - Rows are `MaterializedTask[SingleAgentTurnTaskInput]`. The generated run config binds a `harbor` resources server instance, the selected agent and a `single_agent_turn` environment server, routed by taskset. - CLI: `gym eval run <folder | harbor:dataset> --agent <name> [--sandbox <provider>]` prepares the taskset under `results/harbor/<taskset>/` and runs end to end. ### Review fixes (2026-10-04) One commit, `166e09c0e fix(harbor): loader robustness for registry datasets`: - Version resolution is a total order: numeric versions first, by component, then the rest by text. An unpinned reference to a dataset whose versions do not order numerically is an error that asks for `@<version>`. - Registry dataset folders are named `<dataset>-<version>`, so two versions of one dataset never share a folder. - A rerun reuses the manifest pins of task folders already present and resolves `HEAD` once per repository. Completing a partial fetch no longer moves a pin. - Registry `git_url` values must be `https://`, `ssh://`, `git://` or `user@host:path`. Anything else (file paths, `ext::`, option-looking strings) is refused before it reaches a git command line, and `--` separates URLs from git options. - Unknown `task.toml` keys are ignored with a warning instead of failing the task. A task folder that fails to load (bad TOML, non-UTF-8 text, missing files) is skipped and reported instead of aborting the dataset. ## Validation - `pytest tests/unit_tests/test_harbor_tasks.py` (58 tests: models and unknown-key detection, Dockerfile detector, digest, discovery with skipped tasks, taskset mapping, hub version resolution and git URL validation, hub fetch against a local git repo including manifest reuse, row and run-config shapes, CLI wiring). - `pytest tests/unit_tests/test_cli_main.py` (existing `eval run` flags unchanged). - `pre-commit run --files <changed files>` clean. - Against the live Harbor registry (before the review fixes): `harbor:hello-world` pinned `HEAD` to `cdb76bae`, fetched `examples/tasks/hello-world`, detected `ubuntu:24.04` + `WORKDIR /app`, wrote rows and run config. The fixes only change where the folder lands (`<dataset>-<version>` when the registry entry has a version). ## Rollouts N/A for this PR alone (loader only). End-to-end runs are recorded in NVIDIA-NeMo#3677. ## Compatibility and benchmark impact Additive. `gym eval run` gains an optional positional target and `--sandbox`. Existing invocations are unchanged. `datasets/` is added to `.gitignore`. No benchmark results affected. ## Checklist - [x] I have read the [contributing guidelines](https://github.com/NVIDIA-NeMo/Gym/blob/main/CONTRIBUTING.md). - [x] The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs. - [x] Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable). - [x] Documentation added or updated, or N/A with justification. - [x] Pre-commit checks pass locally (`pre-commit run --all-files`) (so CI lint/format checks pass). - [x] New source files include the required Apache-2.0 SPDX header. - [x] All commits have DCO sign-off (`git commit -s`) (so the DCO check passes). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Adil Asif <[email protected]> Signed-off-by: Yuhe Zhang <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]> Co-authored-by: Yuhe Zhang <[email protected]>
Contributor
Author
|
/ok to test 5b9339e |
adil-a
force-pushed
the
adasif/harbor-m3-oracle-cli
branch
from
October 19, 2026 21:27
6fb20b2 to
8e52a6c
Compare
adil-a
force-pushed
the
adasif/harbor-m5-poc
branch
from
October 19, 2026 21:27
5b9339e to
50ef5b0
Compare
Contributor
Author
|
/ok to test 50ef5b0 |
adil-a
force-pushed
the
adasif/harbor-m3-oracle-cli
branch
from
October 20, 2026 00:20
8e52a6c to
d601888
Compare
adil-a
force-pushed
the
adasif/harbor-m5-poc
branch
from
October 20, 2026 00:20
50ef5b0 to
e72d5d8
Compare
Contributor
Author
|
/ok to test e72d5d8 |
Contributor
Author
|
/ok to test c595222 |
One environment server, `environment_servers/harbor`, runs Harbor task folders: its `/run` owns the whole episode. It checks the row's digest against the taskset mapping, snapshots the task once per digest, starts the task image through the configured sandbox provider, hands the harness a `SandboxAccess` through the agent session seed every sandboxed harness already accepts, posts the task's `responses_create_params`, closes the agent session, runs `tests/test.sh` in the same sandbox and reads the reward it wrote, then stops the sandbox. No resources server takes part; harnesses never see a sandbox handle. Failures are staged episode failures: `seed` (terminal when the task or row is at fault, retryable when the provider failed), `agent`, `cleanup` and `verification`, with the harness's observations and any usable response attached. A missing or invalid reward file is a measured zero with a namespaced `failure_kind`; only a Gym-side failure masks the sample. Verifier logs land in a fresh folder under the results root per verification. Carried from the resources-server review: snapshots under a temporary directory with the digest checked on the copy, sandbox ownership kept until a stop succeeds (retried by the episode's final cleanup and at shutdown), environment templates resolved at use and never written to rows or snapshots, episode-based sandbox TTL, root-first transfers with a default-user fallback, reward download before optional logs with unsafe members skipped, and verifier roots unlinked before preparation. The generated run config now holds an agent block (which declares the materialized rows as its validation dataset, where rollout collection looks for datasets) and a per-taskset `harbor` environment server block that names that agent. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
…bor tasks Adds `responses_api_agents/oracle_agent` (M3 of the Harbor tasks RFC). The oracle is an ordinary agent harness that runs a task's reference solution instead of a model: it borrows the sandbox the `harbor` environment server seeded, locates the task folder through that server's taskset mapping in the run config (the environment server that names this agent as its `agent_server`, or an explicit `environment_server` reference), checks the digest, uploads `solution/` and runs `solve.sh` in the task's working directory. Verification then scores the result like any rollout. Tasks without `solution/solve.sh` return a response tagged `oracle=unvalidated` and are never failed. `gym dataset validate <folder | harbor:dataset> [--sandbox <provider>]` prepares the taskset, runs it with the oracle through the normal end-to-end collection (with a placeholder policy model block, since the oracle calls no model), and prints one line per task with its reward or why there is none. It exits non-zero when a validated task scores below 1.0, is masked, or fails. The generated run config sets `use_absolute_ip` for harnesses that call the model server from inside the sandbox. Squashed from the previous oracle branch, review fixes included: every selected task and repeat is accounted for, validation artifacts stay apart from model evaluation, resumed validation is rejected when task digests or the selection changed, solution environment templates resolve at use, task loading stays off the request loop, the oracle serves sessions through the base agent hooks, `ray_enabled` is declared, custom provider execution compatibility is preserved, and validate reads rollouts in the collector's stored shape. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
Contributor
Author
|
/ok to test 8f7af71 |
Contributor
Author
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
M5 of the Harbor tasks RFC: the hello-world proof of concept, pulled straight from the Harbor hub, run end to end on OpenSandbox through the Episode Architecture stack. The diff is only the server-folder
.gitignore(results/, where the server downloads verifier logs). The milestone is the evidence below on top of #3673–#3676.Rebased onto
main128eab4 (2026-10-04). The diff is unchanged. The runs and counts below were gathered before that rebase.Validation
Every run below used the stack as pushed at the time. Unit tests then: 355 passed across the five PRs. Pre-commit clean.
Rollouts
Reference solution.
gym dataset validate harbor:hello-world(oracle agent, no model):Registry fetch (
HEADpinned tocdb76bae) → materialized row →harborresources server seedsubuntu:24.04on OpenSandbox withWORKDIR /app→single_agent_turn→ oracle runssolution/solve.shin the borrowed sandbox →tests/test.sh(apt, uv, pytest) → reward 1.0, sandbox closed.Model run.
gym eval run harbor:hello-world --agent hermes --model-type openai_model --model openai/openai/eccn-gpt-6-sol --model-url https://inference-api.nvidia.com/v1:Hermes borrowed the seeded sandbox, installed its runtime there (x86_64 uv via #3676), and finished in 3 terminal calls: two
python … write_text(...)attempts (nopythoninubuntu:24.04, thenpython3), thenprintf 'Hello, world!' > hello.txt. Both pytest checks passed. Observations: 4 records, 0 gaps. 3 min 10 s including server start-up.Chris's examples (#3653,
9d016d46), run unchanged withgym eval run <folder> --agent hermes …on OpenSandbox (their READMEs use OpenCode and Docker. Docker is M12):environments/hello_worldenvironments/hello_datasetWith the examples' original
test.shall three scored 0: Hermes writes the file without a trailing newline whiletest.shdoes a byte-exactcmpagainst the text plus\n. A newline-tolerant compare (posted on #3653) gives the rewards above. Running them also caught a loader bug, fixed in #3673: a single-task folder's mapping pointed one level too deep and the seed was refused with 422.Compatibility and benchmark impact
None beyond the stack. Three run-time notes. The OpenSandbox connection block needs
use_server_proxy: truewhen the agent host is outside the cluster. The generated Hermes block setschat_template_kwargs_enabled: falsebecause theopenai_modelchat schema forbids that vLLM-only field (override it when serving with vLLM). From M7 (#3729) onward--agent hermesis ambiguous becausehermes_sandboxed_agentalso matches, so the commands above need--agent hermes_agenton the later branches.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).🤖 Generated with Claude Code