Skip to content

fix(customizer): fix 500 on validation failure for automodel, busybox default - #922

Merged
soluwalana merged 12 commits into
mainfrom
solu/500-on-validation
Jul 27, 2026
Merged

fix(customizer): fix 500 on validation failure for automodel, busybox default#922
soluwalana merged 12 commits into
mainfrom
solu/500-on-validation

Conversation

@soluwalana

@soluwalana soluwalana commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Fully qualified so cri-o / containerd short-name enforcement does not fail with "busybox:latest returns ambiguous list".

Summary by CodeRabbit

  • Bug Fixes
    • Improved job compilation error handling by mapping training validation failures to clearer compilation errors for both automodel and RL jobs.
  • New Features
    • Added automatic NCCL InfiniBand HCA configuration for applicable multi-node customization training backends.
  • Refactor
    • Pinned the storage volume-permissions image to BusyBox stable across service defaults, Helm/Kubernetes, OpenAPI schema defaults, and E2E/install settings.
  • Tests
    • Added coverage for compilation error mapping and NCCL HCA/phantom detection behavior.
  • Documentation
    • Updated Jobs configuration reference and Helm/values defaults to reflect busybox:stable.

…viable busybox default for short name restricted clusters

Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
@soluwalana
soluwalana requested review from a team as code owners July 27, 2026 19:53
@github-actions github-actions Bot added the fix label Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

This PR pins volume-permission BusyBox references to docker.io/library/busybox:stable, maps Automodel and RL validation failures to PlatformJobCompilationError, and configures NCCL HCA environment overrides for Automodel and NeMo RL training.

BusyBox image pinning

Layer / File(s) Summary
Default image references
packages/nemo_platform_plugin/..., services/core/jobs/..., k8s/helm/..., openapi/..., docs/set-up/...
Runtime defaults, schemas, Helm values, and documentation use the tagged BusyBox image.
E2E and cluster setup references
.github/actions/..., e2e/k8s/values/*, e2e/k8s/scripts/*
Kind, Minikube, Helm, and authentication E2E configurations use the fully qualified stable BusyBox image.

Compilation validation errors

Layer / File(s) Summary
Automodel compilation error mapping
plugins/nemo-automodel/src/..., plugins/nemo-automodel/tests/...
Automodel validation failures are converted to PlatformJobCompilationError, with tests covering batch and model-parallel topology errors.
RL compilation error mapping
plugins/nemo-rl/src/...
RL training validation ValueError instances are converted to PlatformJobCompilationError.

NCCL HCA setup

Layer / File(s) Summary
NCCL HCA detection and validation
packages/nmp_customization_common/src/..., packages/nmp_customization_common/tests/...
The shared helper detects usable Mellanox HCAs through InfiniBand sysfs and returns NCCL environment overrides.
Training backend integration
services/automodel/..., services/rl/...
Automodel and NeMo RL invoke NCCL setup and pass the resulting overrides to training execution.

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
Loading

Possibly related PRs

Suggested labels: fix

Suggested reviewers: crookedstorm, albcui, a2bondar

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the two main changes: automodel validation error handling and the BusyBox default image update.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch solu/500-on-validation

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (2)
plugins/nemo-automodel/tests/test_jobs.py (1)

39-48: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the concrete compile result type instead of Any.

AutomodelJob.compile returns PlatformJobSpec; annotate _compile with 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 win

Add an RL regression test for this error mapping.

The supplied tests cover only AutomodelJob.compile; add or verify a test that makes RlJobOutput.validate_for_training() raise ValueError and asserts PlatformJobCompilationError, 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

📥 Commits

Reviewing files that changed from the base of the PR and between ee4dfd8 and 62eb289.

📒 Files selected for processing (14)
  • .github/actions/setup-kind-cluster/action.yaml
  • e2e/k8s/values/default.yaml
  • e2e/k8s/values/kind.yaml
  • e2e/k8s/values/minikube-auth-portforward.yaml
  • e2e/k8s/values/minikube-auth.yaml
  • e2e/k8s/values/minikube.yaml
  • k8s/helm/README.md
  • k8s/helm/values.yaml
  • packages/nemo_platform_plugin/src/nemo_platform_plugin/jobs/execution_profiles.py
  • plugins/nemo-automodel/src/nemo_automodel_plugin/jobs/jobs.py
  • plugins/nemo-automodel/tests/test_jobs.py
  • plugins/nemo-rl/src/nemo_rl_plugin/jobs/jobs.py
  • services/core/jobs/src/nmp/core/jobs/app/constants.py
  • services/core/jobs/src/nmp/core/jobs/controllers/backends/docker.py

Comment thread services/core/jobs/src/nmp/core/jobs/controllers/backends/docker.py
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 27295/35040 77.9% 62.2%
Integration Tests 16023/33752 47.5% 19.9%

Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
@soluwalana
soluwalana enabled auto-merge July 27, 2026 20:15

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 62eb289 and c64115f.

⛔ Files ignored due to path filters (1)
  • sdk/python/nemo-platform/.nmpcontext/openapi.yaml is excluded by !sdk/**
📒 Files selected for processing (5)
  • docs/set-up/config-reference.mdx
  • openapi/ga/individual/platform.openapi.yaml
  • openapi/ga/openapi.yaml
  • openapi/openapi.yaml
  • services/core/jobs/src/nmp/core/jobs/controllers/backends/docker.py

Comment thread docs/set-up/config-reference.mdx
Comment thread .github/actions/setup-kind-cluster/action.yaml

@crookedstorm crookedstorm 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. Definitely need the stuff other than the tag and the tag is probably a good idea.

Comment thread .github/actions/setup-kind-cluster/action.yaml
Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between c64115f and 38b8a80.

📒 Files selected for processing (6)
  • e2e/k8s/scripts/install_helm_e2e.sh
  • e2e/k8s/scripts/install_nmp_auth_e2e.sh
  • packages/nmp_customization_common/src/nmp/customization_common/training/nccl.py
  • packages/nmp_customization_common/tests/training/test_nccl.py
  • services/automodel/src/nmp/automodel/tasks/training/backends/backend.py
  • services/rl/src/nmp/rl/tasks/training/backends/nemo_rl/backend.py

Comment thread packages/nmp_customization_common/src/nmp/customization_common/training/nccl.py Outdated
Comment thread packages/nmp_customization_common/src/nmp/customization_common/training/nccl.py Outdated
Comment thread packages/nmp_customization_common/src/nmp/customization_common/training/nccl.py Outdated
Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between e21bc92 and 6731310.

📒 Files selected for processing (4)
  • packages/nmp_customization_common/src/nmp/customization_common/training/nccl.py
  • packages/nmp_customization_common/tests/test_nccl.py
  • services/automodel/src/nmp/automodel/tasks/training/backends/backend.py
  • services/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

@soluwalana
soluwalana added this pull request to the merge queue Jul 27, 2026
Merged via the queue into main with commit 7368ddd Jul 27, 2026
60 checks passed
@soluwalana
soluwalana deleted the solu/500-on-validation branch July 27, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants