fix(customizer): fix 500 on validation failure for automodel, busybox default - #922
Conversation
…viable busybox default for short name restricted clusters Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
📝 WalkthroughWalkthroughChangesThis PR pins volume-permission BusyBox references to BusyBox image pinning
Compilation validation errors
NCCL HCA setup
Sequence Diagram(s)sequenceDiagram
participant TrainingBackend
participant NCCLHelper
participant InfiniBandSysfs
participant TrainingProcess
TrainingBackend->>NCCLHelper: request NCCL IB environment
NCCLHelper->>InfiniBandSysfs: inspect HCA and net-device entries
InfiniBandSysfs-->>NCCLHelper: return HCA classifications
NCCLHelper-->>TrainingBackend: return NCCL overrides
TrainingBackend->>TrainingProcess: launch with environment
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
plugins/nemo-automodel/tests/test_jobs.py (1)
39-48: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the concrete compile result type instead of
Any.
AutomodelJob.compilereturnsPlatformJobSpec; annotate_compilewith that type so test code retains static type checking.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plugins/nemo-automodel/tests/test_jobs.py` around lines 39 - 48, Update the `_compile` helper’s return annotation from `Any` to the concrete `PlatformJobSpec` type returned by `AutomodelJob.compile`, adding or reusing the appropriate import. Keep the compile invocation and test behavior unchanged.Source: Coding guidelines
plugins/nemo-rl/src/nemo_rl_plugin/jobs/jobs.py (1)
67-70: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd an RL regression test for this error mapping.
The supplied tests cover only
AutomodelJob.compile; add or verify a test that makesRlJobOutput.validate_for_training()raiseValueErrorand assertsPlatformJobCompilationError, including exception chaining if that is part of the contract.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plugins/nemo-rl/src/nemo_rl_plugin/jobs/jobs.py` around lines 67 - 70, Add an RL regression test covering RlJobOutput.validate_for_training: force it to raise ValueError, invoke the relevant RL job compilation path, and assert that PlatformJobCompilationError is raised with the original ValueError preserved as its cause. Keep existing AutomodelJob.compile coverage unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@plugins/nemo-automodel/tests/test_jobs.py`:
- Around line 39-48: Update the `_compile` helper’s return annotation from `Any`
to the concrete `PlatformJobSpec` type returned by `AutomodelJob.compile`,
adding or reusing the appropriate import. Keep the compile invocation and test
behavior unchanged.
In `@plugins/nemo-rl/src/nemo_rl_plugin/jobs/jobs.py`:
- Around line 67-70: Add an RL regression test covering
RlJobOutput.validate_for_training: force it to raise ValueError, invoke the
relevant RL job compilation path, and assert that PlatformJobCompilationError is
raised with the original ValueError preserved as its cause. Keep existing
AutomodelJob.compile coverage unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: ca5103ed-4cd4-41e8-946d-d3b16afcf429
📒 Files selected for processing (14)
.github/actions/setup-kind-cluster/action.yamle2e/k8s/values/default.yamle2e/k8s/values/kind.yamle2e/k8s/values/minikube-auth-portforward.yamle2e/k8s/values/minikube-auth.yamle2e/k8s/values/minikube.yamlk8s/helm/README.mdk8s/helm/values.yamlpackages/nemo_platform_plugin/src/nemo_platform_plugin/jobs/execution_profiles.pyplugins/nemo-automodel/src/nemo_automodel_plugin/jobs/jobs.pyplugins/nemo-automodel/tests/test_jobs.pyplugins/nemo-rl/src/nemo_rl_plugin/jobs/jobs.pyservices/core/jobs/src/nmp/core/jobs/app/constants.pyservices/core/jobs/src/nmp/core/jobs/controllers/backends/docker.py
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/set-up/config-reference.mdx`:
- Around line 271-272: Update the upstream configuration default for
volume_permissions_image rather than editing the generated config reference
directly, then run make generate-config-reference-docs to regenerate all
affected entries, including the corresponding sections referenced by the review.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 04e12726-5c0e-4e41-82ef-c8fd25aa836c
⛔ Files ignored due to path filters (1)
sdk/python/nemo-platform/.nmpcontext/openapi.yamlis excluded by!sdk/**
📒 Files selected for processing (5)
docs/set-up/config-reference.mdxopenapi/ga/individual/platform.openapi.yamlopenapi/ga/openapi.yamlopenapi/openapi.yamlservices/core/jobs/src/nmp/core/jobs/controllers/backends/docker.py
crookedstorm
left a comment
There was a problem hiding this comment.
LGTM. Definitely need the stuff other than the tag and the tag is probably a good idea.
Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@packages/nmp_customization_common/src/nmp/customization_common/training/nccl.py`:
- Around line 40-41: Update the NCCL HCA setup logic around the `if not usable
or not phantom` guard so an empty `usable` list still configures an exclusion
list or disables InfiniBand instead of returning without setting `NCCL_IB_HCA`.
Preserve the existing behavior for hosts with usable HCAs, and add a test
covering the all-phantom HCA case.
- Line 43: Update the NCCL_IB_HCA assignment to prefix every usable HCA name
with “=” so NCCL interprets each entry as an exact name rather than a prefix;
add a test covering similarly prefixed names such as mlx5_1 and mlx5_10 to
verify they do not collide.
- Around line 43-44: Prevent NCCL_IB_HCA from leaking between reused worker
jobs: update maybe_set_nccl_ib_hca() in
packages/nmp_customization_common/src/nmp/customization_common/training/nccl.py
to return the derived value instead of relying only on process-global mutation,
then pass that value through each subprocess environment in
AutomodelBackend.execute_training() at
services/automodel/src/nmp/automodel/tasks/training/backends/backend.py:74 and
NemoRLBackend.execute_training() at
services/rl/src/nmp/rl/tasks/training/backends/nemo_rl/backend.py:130;
alternatively, ensure NemoRLBackend restores NCCL_IB_HCA alongside its other
environment variables.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 60fa36cd-c073-4113-8124-a60b79556a9e
📒 Files selected for processing (6)
e2e/k8s/scripts/install_helm_e2e.she2e/k8s/scripts/install_nmp_auth_e2e.shpackages/nmp_customization_common/src/nmp/customization_common/training/nccl.pypackages/nmp_customization_common/tests/training/test_nccl.pyservices/automodel/src/nmp/automodel/tasks/training/backends/backend.pyservices/rl/src/nmp/rl/tasks/training/backends/nemo_rl/backend.py
Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@services/automodel/src/nmp/automodel/tasks/training/backends/backend.py`:
- Line 28: Remove the stale maybe_set_nccl_ib_hca() call from
execute_training(). Keep the existing training_env.update(get_nccl_ib_env())
flow, which supplies the per-process NCCL override before torchrun starts.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 4515842a-8f63-4ec8-aa2a-6eadc25d1018
📒 Files selected for processing (4)
packages/nmp_customization_common/src/nmp/customization_common/training/nccl.pypackages/nmp_customization_common/tests/test_nccl.pyservices/automodel/src/nmp/automodel/tasks/training/backends/backend.pyservices/rl/src/nmp/rl/tasks/training/backends/nemo_rl/backend.py
🚧 Files skipped from review as they are similar to previous changes (1)
- services/rl/src/nmp/rl/tasks/training/backends/nemo_rl/backend.py
Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
Fully qualified so cri-o / containerd short-name enforcement does not fail with "busybox:latest returns ambiguous list".
Summary by CodeRabbit
stableacross service defaults, Helm/Kubernetes, OpenAPI schema defaults, and E2E/install settings.busybox:stable.