Repository navigation
feat(harbor): per-run summary and verbose tracing on the Harbor path (M26) - #4861
Conversation
|
/ok to test 9029f11 |
9029f11 to
c9cfb96
Compare
|
/ok to test c9cfb96 |
c9cfb96 to
272070d
Compare
|
/ok to test 272070d |
|
/ok to test 985a960 |
|
/ok to test aef0090 |
|
/ok to test 2fa9ac4 |
|
/ok to test cc77494 |
|
/ok to test 8e07306 |
|
/ok to test 8e8b284 |
ffrujeri
left a comment
There was a problem hiding this comment.
Thanks, the run summary is a clear improvement for checking a Harbor run after the fact. The fresh-start snapshot that sends an earlier run's files to stale_files instead of passing them off as this run's is a nice touch, and the tests cover resumed, fresh-fail and fresh-success runs through the real collector. The DEBUG traces look safe: they don't log the task env, solution env or credentials, and stay quiet below --verbose. I left one optional question about memory on very large rollouts files. Approving.
|
/ok to test 7674e28 |
|
/ok to test 2267d82 |
|
/ok to test 5234164 |
|
/ok to test aa7d8bd |
|
/ok to test f3b0fdd |
|
/ok to test 9e36b06 |
|
/ok to test 5529c2f |
|
/ok to test e045243 |
|
/ok to test a6740b2 |
yuhezhang-ai
left a comment
There was a problem hiding this comment.
Thanks for adding the run summary. I would address the three P2 summary-correctness issues before merging: the dataset label, the saved schedule used by resumed runs, and health-report ownership when startup fails. The remaining three comments are non-blocking inspection improvements.
|
/ok to test 1fc9b3f |
…(M26) Every `gym dataset validate` and `gym eval run <task target>` now writes one per-run summary beside its rollouts, `<rollouts stem>_run_summary.json` (`nemo_gym.tasks.harbor.run_summary`): the command, target, taskset and agent; the dataset's folder, source and digests; the `task_source` the run config declares for the taskset (known before dispatch) with the value the result rows carry as a cross-check (`rows_task_source`); the files of the run (rollouts and sidecars, the health check's reports, the rows with the data processor's `_prepare.jsonl` and `_metrics.json`, the collated collector input under `<stem>/preprocessed_datasets/`, run config, skipped.json, images.json, the verifier root), each null when the run did not write it: the aggregate metrics and the health reports, which follow a completed collection, are listed only when at least as new as the rollouts file, so an earlier run's file by the same name (the health reports keep one name per folder whatever the `--output` stem) is not passed off as this run's, and a fresh start (`resume_from_cache` off, the default) records what sits under its rollouts, failures and materialized-inputs names before it dispatches, since the collector clears them only once the servers are up, so a run that dies before that (servers that fail to start) reports those files as `stale_files`, not its own, with its tasks `missing`, while a resumed run's cached rows stay its own; and, per selected task and repeat, the outcome, the verifier's mode, wall time, network and return code, the relative paths of its verifier log folder, test-stdout.txt, trajectory.json, entrypoint-stdout.txt and collected artifacts/ (per turn for multi-step tasks), and the input the row carried (task and dataset digests, the responses_create_params metadata). Paths are relative to the summary's folder; a folder a row names that is gone is listed under `missing_paths`. The summary is written after collection whatever it did, and also when a validate finds no task with a solution/ and dispatches nothing (beside the `--output` the command asked for, resolved through the same parser as a dispatching run); a writer failure is logged without touching the run's outcome. A fresh `gym eval run` reads its selected rows for the summary only after the collector ran, inside that same guard; a resumed run still reads them first for the resume-conflict check, as before. `--verbose` is unchanged (main's `verbose` key reaches every spun-up server); the Harbor environment server and the oracle agent now trace the episode at DEBUG (seeded, test.sh exit and rewards with the log folder, final score; solve.sh budget, user or "the sandbox default user", and exit) and stay quiet below WARNING otherwise. No judge runs on the Harbor path outside the task's own test.sh, so there are no judge trajectories to put in the row; whatever a sandboxed judge writes under /logs/verifier is in the verifier log folder the summary names. Docs: harbor README outputs section, the Harbor Tasks page and the observability index. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
|
/ok to test ac7d19d |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40531740574 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40540765528 |
Summary
M26 (trust and inspection) on the Harbor task path, built as extensions of what main already ships rather than a parallel report: a per-run summary file beside the rollouts, the input each task ran echoed per task, and the Harbor environment server and oracle agent tracing their work under the existing
--verbose.What changes
gym dataset validateandgym eval run <task target>writes<rollouts stem>_run_summary.jsonnext to the rollouts (nemo_gym/tasks/harbor/run_summary.py,nemo_gym.path_utils.run_summary_path_for). It records the command, target, taskset and agent; the dataset's folder, source (manifest.toml's[dataset].source, newPreparedTaskset.dataset_source) and digests; thetask_sourcethe run config declares for the taskset (known before dispatch) and the value the result rows carry as a cross-check (rows_task_source); the files of the run (rollouts, failures, materialized inputs, aggregate metrics, the health check'squality_summary.jsonandrollout_verdicts.jsonl, the rows with the data processor's_prepare.jsonland_metrics.json, the collated collector input under<stem>/preprocessed_datasets/, run config,skipped.json,images.json, the verifier root;nullfor one the run did not write, and the aggregate metrics and health reports, which follow a completed collection, are listed only when at least as new as the rollouts file, so a stopped run does not pass off an earlier run's as its own; and a fresh start,resume_from_cache=false, the default, records what sits under its rollouts, failures and materialized-inputs names before it dispatches, since the collector clears those only once the servers are up, so a run that dies before that, such as on servers that fail to start, reports them understale_filesinstead, with its tasksmissingandrows_task_sourcenull, while a resumed run's cached rows stay its own); and, per selected task and repeat, its status (result/failed/missing), reward, mask andfailure_kind, the verifier's mode, wall time, network, return code and rewards, the paths of its verifier log folder,test-stdout.txt,trajectory.json,entrypoint-stdout.txtand collectedartifacts/(per turn for a multi-step task), and the input the row carried (task and dataset digests,responses_create_paramsmetadata). All paths are relative to the summary's folder; a folder a row names that is missing on disk is listed undermissing_paths. The file is written after collection whatever it did (try/finally), and also when a validate finds no task with asolution/and dispatches nothing (beside the requested--output, resolved through the same parser as a dispatching run); atomically, and a writer failure is logged without changing the run's outcome. A freshgym eval runreads its selected rows for the summary only after the collector ran, inside that guard; a resumed run reads them first for the resume-conflict check, as before.-v/--verbose(verbose) already reaches spun-up servers; the Harbor server now logs at DEBUG when an episode is seeded, whentest.shexits (code, seconds, rewards, log folder) and the final score, and the oracle logs itssolve.shbudget, user (orthe sandbox default user) and exit. Both stay quiet below WARNING without it.test.sh; whatever a sandboxed judge writes under/logs/verifieris in the verifier log folder the summary names. The README says so.data/harbor-tasks.mdx(Run summary and verbosity),observability/index.mdx.Test plan
tests/unit_tests/test_harbor_run_summary.py(new, 16 tests): relative paths that resolve, the fullfilesmap,schema_version,summary_dir, the skipped-task map,missing_pathson results and failures, superseded failures and counts, post-collection files listed only when newer than the rollouts (and named understale_filesotherwise), a fresh start through the real collector that dies before clearing an earlier run's rollouts/failures/materialized inputs (allnull,stale_filesnames them, the taskmissing, the files untouched) against the same failure on a resumed run (cached rows kept) and a fresh start that reaches the collector (files rewritten and owned), the same three cases throughgym eval run --agent hermes_agent(a model run,dispatchstubbed) so the model-run path's pre-dispatch snapshot is covered too, a validate that dispatches nothing beside an earlier run's rollouts, the collator files named after a+split=trainoverride, the empty-selection summary beside--outputfrom the flag, an override and a config overlay, input echo and the rows-file fallback,--outputoutside the results folder, thetask_sourcecross-check, multi-turn rows, the CLI writing the summary when collection raises, on the resumed run and when no task has a solution,gym eval runreading its rows only after dispatch and inside the summary guard, writer failure never hiding the run.environment_servers/harbor/tests/test_logging.py(new) and the oracle'stest_verbose_logging_traces_the_solve_run_at_debug_level_only: the traces are emitted at DEBUG only and absent at INFO.-k "not partial_eval and not buildah and not validate_ and not real_image"), oracle suite 23 passed.test_harbor_run_summary,test_harbor_validation,test_harbor_validation_report,test_harbor_tasks,test_cli_main): 602 passed.ruff check,ruff format --check,pre-commit run --files <changed>: clean.gym dataset validate <terminal-bench-2-1> --only-tasks kv-store-grpc,largest-eigenval,fix-git --sandbox opensandbox --output ... -von OpenSandbox: 3/3 oracle solved (reward 1.0, verify 13.1-17.7 s, exit 0); the summary names 25 paths, all exist from its folder, none absolute, the aggregate metrics and both health reports among them,stale_filesempty; DEBUG traces from the server and the oracle in the log. Then, beside a copy of those output files, a fresh start that dies inside the collector before the servers start: every one of the six filesnullunderfilesand named understale_files, all three tasksmissing,rows_task_sourcenull.🤖 Generated with Claude Code