fix: repair NGC persona downloads#720
Conversation
Remove the unsupported NGC --org argument from persona dataset downloads and require the default NGC CLI config before shelling out. Add coverage for the missing-config path and the updated command shape. Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Document ngc config set as the setup path for persona downloads so the docs match the CLI's default config requirement. Signed-off-by: Johnny Greco <jogreco@nvidia.com>
|
MkDocs preview: https://50603f85.dd-docs-preview.pages.dev Fern preview: https://nvidia-preview-pr-720.docs.buildwithfern.com/nemo/datadesigner
|
Greptile SummaryThis PR fixes NGC persona dataset downloads by removing the
|
| Filename | Overview |
|---|---|
| packages/data-designer/src/data_designer/cli/services/download_service.py | Removes --org nvidia flag from NGC command, adds NgcConfigError exception and ensure_ngc_config_exists() preflight; ngc_config_path injectable for testing. |
| packages/data-designer/src/data_designer/cli/controllers/download_controller.py | Config preflight (ensure_ngc_config_exists) correctly inserted before _determine_locales(), so the missing config error fires before the interactive locale-selection UI; NgcConfigError also caught in _download_locale for belt-and-suspenders coverage. |
| packages/data-designer/tests/cli/controllers/test_download_controller.py | New test_run_personas_ngc_config_not_available (with locales=None) proves config check fires before select_multiple_with_arrows; test_download_locale_ngc_config_error covers the _download_locale catch path. |
| packages/data-designer/tests/cli/services/test_download_service.py | Adds ngc_config_path fixture so all tests get a valid config by default; new test_download_persona_dataset_missing_ngc_config verifies subprocess is never called when config absent; expected command updated to drop --org nvidia. |
| docs/concepts/person_sampling.md | Replaces export NGC_API_KEY with ngc config set and updates step descriptions to match the new config-file-based flow. |
| fern/versions/latest/pages/concepts/person_sampling.mdx | Mirror of docs/concepts/person_sampling.md changes for the Fern-rendered docs; both files are in sync. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[run_personas called] --> B{dry_run?}
B -- yes --> D[_determine_locales]
B -- no --> C{NGC CLI available?\ncheck_ngc_cli_with_instructions}
C -- no --> Z1[print error & return]
C -- yes --> E{~/.ngc/config exists?\nensure_ngc_config_exists}
E -- no --> Z2[print NgcConfigError & return]
E -- yes --> D
D --> F{locales specified?}
F -- yes --> G[validate locales]
F -- no / interactive --> H[select_multiple_with_arrows]
G --> I[confirm & download loop]
H --> I
I --> J{_download_locale}
J --> K[service.download_persona_dataset]
K --> L{ensure_ngc_config_exists redundant guard}
L -- missing --> Z3[NgcConfigError → return False]
L -- ok --> M[ngc registry resource download-version]
M -- success --> N[move parquet files to managed-assets]
M -- CalledProcessError --> Z4[return False]
Reviews (2): Last reviewed commit: "fix persona download preflight order" | Re-trigger Greptile
Code Review: PR #720 — fix: repair NGC persona downloadsSummaryThis PR repairs the
Test coverage is added for the new command shape, the missing-config preflight, the controller-level error path, and the service-level error path. FindingsCorrectness
Design / UX
Tests
Documentation
Style / Conventions
Security
VerdictApprove with minor suggestions. The fix is correct, well-tested, and the docs are updated in both locations. Consider:
Neither is blocking. Ship it. |
Check for the default NGC config before interactive locale selection so users see setup guidance before choosing datasets. Signed-off-by: Johnny Greco <jogreco@nvidia.com>
|
Thanks @greptile-apps, good catch. Addressed in 88be724 by moving the NGC config preflight ahead of locale determination for non-dry-run flows, so the interactive selector is skipped when ~/.ngc/config is missing. I also updated the controller test to use the no-locale interactive path and assert the selector is not called.\n\nRe-ran:\n- |
|
The fix looks correct. One minor note: the LGTM, thanks for the quick turnaround on this. Tip: You can customize Greptile's behavior for this repo with |
3mei
left a comment
There was a problem hiding this comment.
@johnnygreco do you think we should add more guidance for which values to use when running ngc config set? In the past, I found the ngc setup a bit confusing. Otherwise, this looks good to me
📋 Summary
This PR fixes Nemotron-Persona dataset downloads with NGC CLI versions that reject the
--orgargument. It removes the unsupported flag, requires users to create the default NGC CLI config file, and keeps the setup docs aligned with the new behavior.🔗 Related Issue
Closes #708
cc @3mei
🔄 Changes
--org nvidiafrom thengc registry resource download-versioncommand.ngc config set.ngc config setsetup path.🧪 Testing
make testpassesFocused checks run:
✅ Checklist