Repository navigation
fix(arc_agi): fix README dataset cd sequence and fail on missing ARC sources - #4548
Conversation
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]>
yaoyu-33
left a comment
There was a problem hiding this comment.
LGTM. Both source splits are checked before writing outputs, and the README directory sequence is corrected. All 10 focused tests passed.
|
/ok to test cca9361 |
@qiaochuz-nv, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test cbbf2f1 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/38339850872 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/38340495566 |
What does this PR do?
Fixes the "Create datasets" block in
resources_servers/arc_agi/README.mdso 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_agitwice: lines 35 and 40, both added in #634. The secondcdruns from insideresources_servers/arc_agi, so its target does not exist. As a result:git clone .../ARC-AGI-2lands inresources_servers/arc_agi/ARC-AGI-2.create_dataset.py --version 2reads../../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_*.jsonlfiles, prints "Created example dataset with 5 tasks", and exits 0. Run underset -e, the block stops at the secondcdinstead.Fix
README (docs,
cca93615c). The block now follows the order thatenvironments/arc_agi/README.mdalready uses:resources_servers/arc_agionce and run both versions;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.Script (
cbbf2f1f2).resources_servers/arc_agi/create_dataset.pyand the byte-identicalenvironments/arc_agi/prepare.pynow raiseFileNotFoundErrorbefore 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.create_dataset(). Both files are only run as CLI scripts.Before the fix
Gym
7f16ec541. The QA testcasearc_agiruns the README's "Create datasets" block verbatim underset -e, starting from the directory that holdsGym/:NEMO_GYM_QA_CASE="canonical resource README directory sequence" python testcases/environments/arc_agi.pyThe same block pasted into a shell without
set -eexits 0, but the ARC-AGI-2 outputs are empty:After the fix
Gym
cbbf2f1f2(this branch), same QA command:The fixed block in a plain shell under
set -ebuilds every split and ends in the Gym root:The old README block run against the hardened script now stops with an actionable error. It no longer writes empty ARC-AGI-2 files:
Validation
New
tests/unit_tests/test_arc_agi_create_dataset.pyruns both scripts as the README does, as a subprocess from their own directory inside a Gym-shaped tree. It covers three cases:Results: 10 failed on
cca93615c, 10 passed oncbbf2f1f2.QA testcase
arc_agi:resource_readme_directory_sequence(this README): FAIL before, PASS after.readme_creates_both_datasets(theenvironments/arc_agiREADME, which runsprepare.py): PASS on this branch.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