Skip to content

fix(arc_agi): fix README dataset cd sequence and fail on missing ARC sources - #4548

Merged
yaoyu-33 merged 2 commits into
mainfrom
qiaochuz/nvb-6847498-arc-agi-readme-cd-sequence
Oct 13, 2026
Merged

yaoyu-33 merged 2 commits into
mainfrom
qiaochuz/nvb-6847498-arc-agi-readme-cd-sequence

Conversation

@qiaochuz-nv

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the "Create datasets" block in resources_servers/arc_agi/README.md so that it builds both ARC-AGI-1 and ARC-AGI-2.

It also makes the ARC dataset script fail with a clear error when its source data is missing. Before this change the script wrote empty datasets and exited 0.

Fixes NVBug 6847498.
Closes #4492.

Cause

The README runs cd resources_servers/arc_agi twice: lines 35 and 40, both added in #634. The second cd runs from inside resources_servers/arc_agi, so its target does not exist. As a result:

  • git clone .../ARC-AGI-2 lands in resources_servers/arc_agi/ARC-AGI-2.
  • create_dataset.py --version 2 reads ../../ARC-AGI-2 (the Gym root). Nothing is there.

The script never checked that its source directories exist. When the block is pasted as written, it globs an empty directory, writes 0-row arc_agi_2_*.jsonl files, prints "Created example dataset with 5 tasks", and exits 0. Run under set -e, the block stops at the second cd instead.

Fix

  1. README (docs, cca93615c). The block now follows the order that environments/arc_agi/README.md already uses:

    • clone both repositories from the Gym root;
    • enter resources_servers/arc_agi once and run both versions;
    • return to the Gym root with cd ../...

    The "Install Gym" block therefore no longer needs its own cd Gym/, so that line is removed. No other doc contains the broken line.

  2. Script (cbbf2f1f2). resources_servers/arc_agi/create_dataset.py and the byte-identical environments/arc_agi/prepare.py now raise FileNotFoundError before writing anything if the training or evaluation split has no task files. The error names the missing directory and the repository to clone. The example-count message now reports the real count.

    • Output for a complete clone is unchanged: the real ARC-AGI and ARC-AGI-2 outputs are byte-identical before and after this change.
    • Nothing imports create_dataset(). Both files are only run as CLI scripts.

Before the fix

Gym 7f16ec541. The QA testcase arc_agi runs the README's "Create datasets" block verbatim under set -e, starting from the directory that holds Gym/:

NEMO_GYM_QA_CASE="canonical resource README directory sequence" python testcases/environments/arc_agi.py
▸ the canonical resource README directory sequence prepares both original ARC datasets
  FAIL (3.1s): resource README 'Create datasets' block (stderr tail: Cloning into 'ARC-AGI'... | Cloning into 'ARC-AGI-2'... | bash: line 6: cd: resources_servers/arc_agi: No such file or directory): expected 0, got 1
arc_agi: 0/1 passed in 3.1s

The same block pasted into a shell without set -e exits 0, but the ARC-AGI-2 outputs are empty:

bash: line 9: cd: resources_servers/arc_agi: No such file or directory
Created training dataset with 0 tasks at data/arc_agi_2_training.jsonl
Created evaluation dataset with 0 tasks at data/arc_agi_2_evaluation.jsonl
Created example dataset with 5 tasks at data/example_2.jsonl
exit=0
       0 Gym/resources_servers/arc_agi/data/arc_agi_2_evaluation.jsonl
       0 Gym/resources_servers/arc_agi/data/arc_agi_2_training.jsonl
       0 Gym/resources_servers/arc_agi/data/example_2.jsonl

After the fix

Gym cbbf2f1f2 (this branch), same QA command:

▸ the canonical resource README directory sequence prepares both original ARC datasets
  PASS (8.6s)
arc_agi: 1/1 passed in 8.6s

The fixed block in a plain shell under set -e builds every split and ends in the Gym root:

exit=0
     400 Gym/resources_servers/arc_agi/data/arc_agi_1_evaluation.jsonl
     400 Gym/resources_servers/arc_agi/data/arc_agi_1_training.jsonl
     120 Gym/resources_servers/arc_agi/data/arc_agi_2_evaluation.jsonl
    1000 Gym/resources_servers/arc_agi/data/arc_agi_2_training.jsonl
       5 Gym/resources_servers/arc_agi/data/example_1.jsonl
       5 Gym/resources_servers/arc_agi/data/example_2.jsonl

The old README block run against the hardened script now stops with an actionable error. It no longer writes empty ARC-AGI-2 files:

FileNotFoundError: No ARC-AGI-2 tasks in <ws>/Gym/ARC-AGI-2/data/training. Clone https://github.com/arcprize/ARC-AGI-2 into the Gym root and run this script from its own directory.
exit=1

Validation

  • New tests/unit_tests/test_arc_agi_create_dataset.py runs both scripts as the README does, as a subprocess from their own directory inside a Gym-shaped tree. It covers three cases:

    • a clone in the Gym root builds every split with the right example count, for each version;
    • a clone next to the script (the old README layout) fails and writes nothing;
    • an empty split fails and writes nothing.

    Results: 10 failed on cca93615c, 10 passed on cbbf2f1f2.

  • QA testcase arc_agi:

    • Case resource_readme_directory_sequence (this README): FAIL before, PASS after.
    • Case readme_creates_both_datasets (the environments/arc_agi README, which runs prepare.py): PASS on this branch.
    • The third case (vLLM evaluation on GPU) does not use either script and was not run.
  • pytest resources_servers/arc_agi/tests: 2 passed. tests/unit_tests/test_fern_docs_links.py: 18 passed.

  • pre-commit run --all-files: all hooks pass.

  • Rollout evidence: N/A. The change is limited to an offline dataset-preparation script and its README. The server, agent and verifier are unchanged, and successful output is byte-identical.

Compatibility

The scripts now exit non-zero, instead of writing empty datasets with exit 0, when the ARC source data is not in the Gym root. Valid setups behave exactly as before.

🤖 Generated with Claude Code

qiaochuz-nv and others added 2 commits October 12, 2026 15:31
The "Create datasets" block in resources_servers/arc_agi/README.md ran
`cd resources_servers/arc_agi` twice. The second cd runs from inside that
directory and fails, so ARC-AGI-2 is cloned into the component directory
and `create_dataset.py --version 2`, which reads ../../ARC-AGI-2, writes
empty ARC-AGI-2 datasets with exit 0 (or the block stops under set -e).

Clone both repositories from the Gym root, enter the component once, run
both versions, and return to the Gym root, as environments/arc_agi/README.md
already does. Drop the now-redundant `cd Gym/` from "Install Gym".

Fixes NVBug 6847498.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: qiaochuz <[email protected]>
create_dataset.py (and the identical environments/arc_agi/prepare.py)
read ../../ARC-AGI{,-2}/data/{training,evaluation} and never checked that
they exist. With the clone in the wrong place, as the old resources README
did for ARC-AGI-2, the script wrote empty training/evaluation datasets,
printed "Created example dataset with 5 tasks", and exited 0.

Raise FileNotFoundError, naming the missing directory and the repository
to clone into the Gym root, before writing anything. Report the real
example count. Output for a complete clone is unchanged (byte-identical on
the real ARC-AGI and ARC-AGI-2 data).

Fixes NVBug 6847498.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: qiaochuz <[email protected]>
@qiaochuz-nv qiaochuz-nv added bug Something isn't working QA_fix Fix implemented by a QA team member docs Documentation-only updates or documentation debt area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers needs-review PR is ready for code review and waiting on a reviewer complexity:low Localized change in one scope with a small, straightforward review surface labels Oct 12, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 12, 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.

@yaoyu-33 yaoyu-33 removed the docs Documentation-only updates or documentation debt label Oct 12, 2026

@yaoyu-33 yaoyu-33 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.

LGTM. Both source splits are checked before writing outputs, and the README directory sequence is corrected. All 10 focused tests passed.

@yaoyu-33
yaoyu-33 enabled auto-merge October 13, 2026 02:27
@qiaochuz-nv

Copy link
Copy Markdown
Contributor Author

/ok to test cca9361

@copy-pr-bot

copy-pr-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

/ok to test cca9361

@qiaochuz-nv, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@yaoyu-33

Copy link
Copy Markdown
Contributor

/ok to test cbbf2f1

@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/38339850872

@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/38340495566

Merged via the queue into main with commit c2fec7d Oct 13, 2026
55 of 57 checks passed
@yaoyu-33
yaoyu-33 deleted the qiaochuz/nvb-6847498-arc-agi-readme-cd-sequence branch October 13, 2026 03:26

This branch was previously deployed

1 inactive deployment
public — cbbf2f1f Deployed Oct 13, 2026 by copy-pr-bot[bot] via release / finalize / notify #5138
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers bug Something isn't working complexity:low Localized change in one scope with a small, straightforward review surface needs-review PR is ready for code review and waiting on a reviewer QA_fix Fix implemented by a QA team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NVBug 6847498] Fix ARC-AGI resources README dataset cd sequence

2 participants