Skip to content

fix(data): isolate prepared datasets within each run - #5997

Merged
Kipok merged 8 commits into
NVIDIA-NeMo:mainfrom
Kipok:codex/public-internal-9
Nov 17, 2026
Merged

Kipok merged 8 commits into
NVIDIA-NeMo:mainfrom
Kipok:codex/public-internal-9

Conversation

@Kipok

@Kipok Kipok commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Concurrent evaluations sharing source JSONL files can overwrite each other's preparation intermediates and routing stamps. An observed SQL evaluation silently omitted an entire 1,534-row subset. Write intermediates under each run's output directory (prepared/<type>/) instead of beside the source dataset.

Preserve the per-declaration collision handling and task-source routing from #2717. Source datasets remain untouched and may be read-only. Public preparation configuration is unchanged; internal collation callers now supply the output directory.

Validation: 571 dataset-preparation, materialization, task-data and Harbor tests passed. The regression interleaves two runs sharing one source and verifies each retains its own prepared rows and routing stamp. All-file pre-commit passed. All 85 benchmark discovery tests also passed (656 tests total).

Model rollout: N/A; this changes preparation artifact placement, not model or verifier behavior. No fresh production SQL recovery is claimed. No separate issue is needed for this reproduced shared-input race. DCO sign-off included.

Local review follow-up: update Harbor summaries and BIRD documentation for run-owned intermediates, and migrate OfficeQA and DeepSWE test callers. All 62 affected Harbor/OfficeQA/DeepSWE cases passed (two unrelated OfficeQA OpenCode return-shape assertions also fail on main and were excluded from this targeted pass).

Local three-pass review: SHIP at 59571967ae903d80fcf59594b2d3b05f1be7999c, using the protected-main Gym rubric. All-file pre-commit passed. This is local review evidence, not hosted approval.

Current-main refresh (2026-11-16): includes main fc109f3f845e4f25526b20e01cc785a02e84f5ad. Validated head 47cc57cf7d910abf8ec2fe61f17c90100056fe6a: 2 failed, 3077 passed, 8 skipped, 6 warnings. All-file pre-commit, whitespace and DCO checks passed. Three independent local review passes: SHIP using the protected-main rubric; this is not hosted approval. Updated both new collation test helpers from main to pass the run-owned output directory. The only two failures are the OfficeQA _session_input unpacking tests, reproduced identically on unchanged main at the revision above. Native adapter and preparation coverage passes. Hosted CI and maintainer review for this head remain independent.

CI follow-up (2026-11-16), head d19cb35e8da3ab631209301fbb578847f4c90728: update the math trajectory and private Agentic IF integration tests for run-owned prepared files. Assertions retain source-data preservation, private metrics placement, and final output contents. The three previously failing CI cases and related suites pass locally: 58 passed. All-file pre-commit, whitespace, DCO, and three independent local review passes passed (SHIP). Hosted CI is being rerun for this head.

@Kipok Kipok added bug Something isn't working area:data Datasets, preparation, task formats, and materialization needs-review PR is ready for code review and waiting on a reviewer labels Nov 11, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@adil-a

adil-a commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

/ok to test e3e4897

@adil-a

adil-a commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

/review

@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 11, 2026 07:20
@yaoyu-33
yaoyu-33 requested a review from wprazuch November 11, 2026 07:31
@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Nov 12, 2026
@Kipok

Kipok commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 47cc57c

@Kipok

Kipok commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test d19cb35

@Kipok

Kipok commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/review mode=strict reset=true

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM. No qualifying findings after reviewing all 14 changed files and tracing the affected callers and artifact consumers.

Collation isolates prepared files by output directory while keeping per-declaration collision handling and routing behavior. The Harbor summary lookup matches the new artifact location.

This was static review. I did not execute tests or independently verify the reported validation results.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@Kipok
Kipok enabled auto-merge November 17, 2026 00:17
@Kipok
Kipok added this pull request to the merge queue Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43988235243

Merged via the queue into NVIDIA-NeMo:main with commit 4e3f503 Nov 17, 2026
78 checks passed
@Kipok
Kipok deleted the codex/public-internal-9 branch November 17, 2026 00:46
osoblanco added a commit to osoblanco/Gym that referenced this pull request Nov 17, 2026
Main's NVIDIA-NeMo#5997 makes output_dir a required keyword-only argument of
TrainDataProcessor._collate_samples_single_type. The agentic recipe
test calls it directly, so it now passes tmp_path / "prepared", as
main's own tests do.

Signed-off-by: Erik Arakelyan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
khazic pushed a commit to khazic/Gym-lao that referenced this pull request Nov 18, 2026
…nd opt-in Stirrup overflow recovery (NVIDIA-NeMo#5226)

* feat(critpt): add offline agentic execution and finish submissions

Signed-off-by: Erik Arakelyan <[email protected]>

* docs(critpt): clarify output-budget behavior and parity limits

Signed-off-by: Erik Arakelyan <[email protected]>

* feat(critpt): support sandboxed semantic answer validators

Signed-off-by: Erik Arakelyan <[email protected]>

* fix(critpt): score token-limit exhaustion without regeneration

Integrate the fix and error regression coverage from NVIDIA-NeMo#5383:
31b36e3 and
b4dd15e.

Apply the scored-zero outcome to output_text responses and preserve the
agentic finish-tool precedence for infrastructure and invalid evidence.
Add regressions for finish-tool handling and malformed request metadata.

Co-authored-by: Igor Gitman <[email protected]>
Signed-off-by: Igor Gitman <[email protected]>
Signed-off-by: Erik Arakelyan <[email protected]>

* fix(critpt): fit model budgets and parse mixed code fences

Signed-off-by: Erik Arakelyan <[email protected]>

* fix(stirrup): recover from explicit context-limit rejections

Signed-off-by: Erik Arakelyan <[email protected]>

* fix(stirrup): preserve compaction failures and diagnostics

Signed-off-by: Erik Arakelyan <[email protected]>

* Pass output_dir in the agentic recipe test

Main's NVIDIA-NeMo#5997 makes output_dir a required keyword-only argument of
TrainDataProcessor._collate_samples_single_type. The agentic recipe
test calls it directly, so it now passes tmp_path / "prepared", as
main's own tests do.

Signed-off-by: Erik Arakelyan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Signed-off-by: Erik Arakelyan <[email protected]>
Signed-off-by: Igor Gitman <[email protected]>
Co-authored-by: Igor Gitman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
qiaochuz-nv added a commit that referenced this pull request Nov 19, 2026
…be the shadow after #5997

#5997 made output_dir a required keyword of _collate_samples_single_type and
moved the prepared file into the run's output directory, so collate no longer
creates <cwd>/<base_folder>/<server>/data/ itself. The two external-cwd tests
now pass output_dir like their siblings, and the resolver's docstring and the
test docstrings say where such a directory still comes from: an earlier
collate run, or a dataset kept under resources_servers/<server>/data/.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: qiaochuz <[email protected]>
akshaver pushed a commit to akshaver/Gym that referenced this pull request Nov 19, 2026
…no longer shadows the server dir (NVIDIA-NeMo#5325)

* fix(data): collate validates task_data from any cwd; a data-only dir no longer shadows the server dir

`gym dataset collate` writes the per-dataset sidecar and prepared file next
to the cwd-relative `jsonl_fpath`, creating `<cwd>/resources_servers/<server>/data/`
before it looks the server's `task_data.py` up. `find_server_dir` resolved with a
bare `Path.is_dir` and searches the cwd before the install root, so from any cwd
outside the checkout that output-only directory won, no schema was found there,
and validation was skipped silently: a schema-violating row collated with exit 0
even in `example_validation` mode, the repo's PR gate (NVBug 6900465, defect 2;
defect 1, the owner lookup over the filtered instance list, was fixed by NVIDIA-NeMo#3674).

`find_server_dir` now accepts a candidate only when it holds a server source
marker (`requirements.txt`, `pyproject.toml`, the same rule as the CLI's
`_resolve_server_dir`) or the module being looked up (`task_data.py`,
`dataset_metrics.py`), and the two lookups in `TrainDataProcessor` warn when a
schema home resolves to no directory at all instead of skipping silently.

Tests: a shadow data dir under the cwd resolves to the install-root server dir
(resources server and agent), a schema-only plugin dir still resolves, an
unresolvable schema home warns, and a processor-path collate from an external
cwd rejects a schema-violating row in `error` mode.

Signed-off-by: Qiaochu Zhu <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: qiaochuz <[email protected]>

* docs(data): prepare-validate says collate stamps task_source, not agent_ref

The page still said collate "adds the agent_ref field to each row". Since NVIDIA-NeMo#2717 collate
stamps task_source (the declaring server instance), strips a legacy agent_ref with a
warning, and resolves the agent at rollout time; it also validates rows against the
owning server's task_data.py schema when it ships one.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: qiaochuz <[email protected]>

* fix(data): collate skip warnings name the implementation; pin every server-dir marker

The "no server directory" warning told users to check the resources_server
reference, which cannot be the cause when it fires: a dangling reference never
reaches it (_schema_home_for returns None first). The validator and the
metrics-hook warnings now share one hint that names the implementation the
instance resolves to and the search-root remedy.

prepare-validate.mdx no longer promises a warning when a deprecated agent_ref
is stripped (it is a DeprecationWarning, hidden by Python's default filters),
and step 5 says rows are stamped with task_source rather than agent references.

Tests: a cwd directory holding only one marker resolves, for each of the four
markers spelled out; a marker that is a directory does not count; a found
server without task_data.py is skipped without any warning.

Found in review of NVIDIA-NeMo#5325 by yaoyu-33.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: qiaochuz <[email protected]>

* test(data): pass output_dir to the external-cwd collate tests; describe the shadow after NVIDIA-NeMo#5997

NVIDIA-NeMo#5997 made output_dir a required keyword of _collate_samples_single_type and
moved the prepared file into the run's output directory, so collate no longer
creates <cwd>/<base_folder>/<server>/data/ itself. The two external-cwd tests
now pass output_dir like their siblings, and the resolver's docstring and the
test docstrings say where such a directory still comes from: an earlier
collate run, or a dataset kept under resources_servers/<server>/data/.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: qiaochuz <[email protected]>

---------

Signed-off-by: Qiaochu Zhu <[email protected]>
Signed-off-by: qiaochuz <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: Abhishree Thittenamane <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:data Datasets, preparation, task formats, and materialization bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants