Repository navigation
feat(tasks): load Harbor task folders and hub datasets into materialized rows - #3673
Conversation
755d9c0 to
93375d5
Compare
93375d5 to
37a422a
Compare
yuhezhang-ai
left a comment
There was a problem hiding this comment.
Rechecked 24d8597. The previously reported findings and follow-up suggestions are addressed, including the long-override regression. No remaining blocking findings in the Harbor loader changes.
Validation: 608 focused Harbor, CLI and global-config tests passed locally. CI core/sandbox tests, all eight server-test shards, and the required Nemo_CICD_Test, lint and DCO checks passed.
The separate Harness conformance checks remain red for existing agent recording/checker issues outside this PR's changes. They are not required checks and are excluded from the Nemo_CICD_Test gate. Main already contains partial fixes (#4048 and #4251), the base-commit CI run also reports conformance failures; these do not block approval of this loader-only PR. Model execution is N/A for this milestone.
24d8597 to
c855ead
Compare
…zed rows Adds `nemo_gym/tasks/harbor`, the loader for Harbor's task format (M1 of the Harbor tasks RFC): - 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. - Discovery: a folder with `task.toml` is one task, otherwise its direct children are the tasks. `task_id` is the folder name. - Base-image-only Dockerfile detection (FROM plus WORKDIR/ENV/USER/LABEL) so such tasks run the base image directly; `task.toml` settings win. - Whole-folder digest in `task_data._ng_digest`, same record format as the Harbor package publisher. - `harbor:<dataset>[@Version]` resolves the Harbor registry, pins `HEAD` to a commit, and fetches task folders into Gym's shared datasets folder (`$NEMO_GYM_DATASETS_DIR`, default `./datasets`) with a `manifest.toml`. - Rows are `MaterializedTask[SingleAgentTurnTaskInput]`; the generated run config binds a `harbor` resources server, the selected agent and a `single_agent_turn` environment server, routed by taskset. - `gym eval run <folder | harbor:dataset> --agent <name> [--sandbox <provider>]` prepares the taskset and runs end to end. Signed-off-by: Adil Asif <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
- total-order version resolution, error on ambiguous alphabetic versions - registry folders named by dataset and version - reuse manifest pins for present folders, resolve HEAD once per repo - validate git_url schemes and pass -- to git - ignore unknown task.toml keys with a warning, isolate per-task load errors Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
The generated run config now sets the harbor server's artifacts_dir to an absolute <results>/<taskset>/verifier folder. Without it the server's relative default resolved against the server process's own working directory, so the verifier_logs_dir recorded in every row pointed at a path that did not exist from where the run was launched. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
Contain registry task sources and destinations, preserve safe symlinks, and publish truthful source pins after each task. Refuse existing unpinned folders rather than silently relabeling their contents. Bring the M9 version-qualified taskset fix (2bdcada) and M15 config precedence fix (1ce0d01) into M1. Restore mixed CLI config merging, conservatively reject unsupported Dockerfile syntax, and ignore Dockerfile settings for prebuilt images. Reject unenforced network policies, Windows and TPU tasks; align legacy resource fields with Harbor. Record per-task preparation failures and require --skip-unloadable before evaluating a partial taskset. Validation: 554 Harbor, CLI and global-config tests passed; pre-commit run --all-files passed; live harbor:hello-world fetch/materialization and pin reuse passed at dc933be707feafbb9efcdf092cb8a0e391332617. Model rollouts N/A for the loader-only M1 layer. Signed-off-by: Yuhe Zhang <[email protected]>
Include the resources-server domain in generated configs and validate complete runs through Gym's configuration parser. Encode generated instance names with collision-free byte escapes so versioned tasksets remain addressable by Hydra overrides while their dataset identities stay unchanged. Restore equals-free Hydra deletion overrides to target-free eval routing. Keep validated pins for missing task folders across interrupted cache repairs. Reject symlinked child task folders and duplicate task IDs before writing rows. Report expected Harbor CLI errors concisely and reject invalid agent/sandbox selectors before registry preparation or downloads. Validation: 574 Harbor, CLI-routing and global-configuration tests passed; pre-commit run --all-files passed. A fresh harbor:hello-world fetch at dc933be707feafbb9efcdf092cb8a0e391332617 materialized one task with zero skips, passed full run/server config validation, and accepted a generated-agent override. Model and sandbox rollouts are N/A for this loader-only layer. Signed-off-by: Yuhe Zhang <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
Prefer explicit paths and existing directories over configuration overrides, quote generated paths, and preserve valid Hydra deletion syntax. Validate registry data before atomic cache publication and report actionable cache errors. Validation: 606 Harbor, CLI, and configuration tests passed; fresh hello-world registry fetch and full configuration validation passed; all-files pre-commit and CI-equivalent secret scan passed. Loader-only changes require no model rollout. Signed-off-by: Yuhe Zhang <[email protected]>
Keep valid long configuration values intact when the optional folder probe raises OSError. Add routing and Hydra parsing regressions with a 300-character dummy key for both eval run modes. Validation: both regression cases failed before the fix; 608 Harbor, CLI and configuration tests passed after it. All-files pre-commit and CI-equivalent secret scan passed. Signed-off-by: Yuhe Zhang <[email protected]>
c855ead to
e27d6e0
Compare
|
/ok to test e27d6e0 |
|
One remaining correctness finding after checking the later stack: [P2] Directory symlinks are omitted from task integrity validation. In content_hash, Reproduced with both I checked all 16 later PRs through #4566 ( Could we validate directory symlinks before filtering to regular files, reject escaping links for local tasks too, and either include supported link targets in task identity or explicitly refuse unsupported directory links? Regression coverage for an escaping directory link and retargeting an internal link would protect these cases. This is distinct from the already-fixed registry copying and linked child-task identity findings. |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/38682357324 |
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:task.tomlschema 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_imageis optional.task.tomlis one task. Otherwise its direct children are the tasks.task_idis the folder name. A task folder that does not load is skipped with a warning and listed inPreparedTaskset.skipped, so the rest of the dataset still prepares.FROMplusWORKDIR/ENV/USER/LABEL). Such tasks run the base image directly.task.tomlsettings win over the Dockerfile.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, pinsHEADto a commit, and fetches task folders into the shared datasets folder ($NEMO_GYM_DATASETS_DIR, default./datasets, now gitignored) under<dataset>-<version>/with amanifest.tomlof pins. Task folders already present keep the pins the manifest recorded for them.MaterializedTask[SingleAgentTurnTaskInput]. The generated run config binds aharborresources server instance, the selected agent and asingle_agent_turnenvironment server, routed by taskset.gym eval run <folder | harbor:dataset> --agent <name> [--sandbox <provider>]prepares the taskset underresults/harbor/<taskset>/and runs end to end.Review fixes (2026-10-04)
One commit,
166e09c0e fix(harbor): loader robustness for registry datasets:@<version>.<dataset>-<version>, so two versions of one dataset never share a folder.HEADonce per repository. Completing a partial fetch no longer moves a pin.git_urlvalues must behttps://,ssh://,git://oruser@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.task.tomlkeys 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(existingeval runflags unchanged).pre-commit run --files <changed files>clean.harbor:hello-worldpinnedHEADtocdb76bae, fetchedexamples/tasks/hello-world, detectedubuntu: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 #3677.
Compatibility and benchmark impact
Additive.
gym eval rungains an optional positional target and--sandbox. Existing invocations are unchanged.datasets/is added to.gitignore. No benchmark results affected.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).🤖 Generated with Claude Code