Repository navigation
build: exclude pulled Harbor datasets from package discovery - #5056
Conversation
`gym dataset pull` lands Harbor datasets under environments/harbor/<entry>/ (gitignored on the Harbor stack, #4827/#4872). `[tool.setuptools.packages.find]` discovers namespace packages, so a wheel built from a checkout holding a pulled dataset picked up the pulled tasks' Python (tests/test_outputs.py, a dataset-level task_data.py) as packages of this distribution. Exclude `environments.harbor.*`: the pulled trees are never discovered, while `environments.harbor` itself stays a package so the committed entry files (README, dataset.toml, YAML) still ship as its package data, as before. Checked by building a wheel from a checkout with a planted pulled task: without the exclude the wheel carried environments/harbor/terminal_bench_4/task_data.py and environments/harbor/terminal_bench_4/pulled_task/tests/test_outputs.py; with it only the three committed files ship (two READMEs and harbor_sandbox.yaml). Found by Yu He's review of #4827. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
|
/ok to test bfe0d81 |
marcromeyn
left a comment
There was a problem hiding this comment.
LGTM. Excluding environments.harbor.* keeps pulled task Python out of the wheel while the committed entry files still ship as environments.harbor package data.
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40310450844 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40318064299 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40325718618 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40354879026 |
What does this PR do?
One
excludeentry in[tool.setuptools.packages.find]:environments.harbor.*.gym dataset pull(Harbor stack, #4827 and #4872) lands Harbor datasets underenvironments/harbor/<entry>/, gitignored. Package discovery in this repo is namespace-based, so a wheel built from a checkout that holds a pulled dataset picked up the pulled tasks' Python files (tests/test_outputs.py, a dataset-leveltask_data.py) as packages of the distribution. With the exclude the pulled trees are never discovered, whileenvironments.harboritself stays a package so the committed entry files (README, dataset.toml, YAML) ship as its package data exactly as today.This is the fix for Yu He's thread on #4827 ("Exclude fetched task code from package discovery"); it lives in
pyproject.toml, which the automation team owns, hence a separate PR.Validation
Wheel built from a checkout with a planted pulled task under
environments/harbor/terminal_bench_4/:environments/harbor/in the wheelterminal_bench_2_1/README.md,terminal_bench_4/README.md,terminal_bench_4/harbor_sandbox.yaml,terminal_bench_4/task_data.py,terminal_bench_4/pulled_task/tests/test_outputs.pyterminal_bench_2_1/README.md,terminal_bench_4/README.md,terminal_bench_4/harbor_sandbox.yamlfind_namespace_packageswith the repo's include and exclude lists:environmentsandenvironments.harborkept, nothing underenvironments.harbor.*.No runtime change; only what a wheel can contain.
🤖 Generated with Claude Code