Skip to content

fix(customizer): change entrypoint of side car to avoid API spin up for LoRA and unwritable dirs - #1185

Merged
soluwalana merged 3 commits into
mainfrom
nvbug6573168/solu
Aug 7, 2026
Merged

fix(customizer): change entrypoint of side car to avoid API spin up for LoRA and unwritable dirs#1185
soluwalana merged 3 commits into
mainfrom
nvbug6573168/solu

Conversation

@soluwalana

@soluwalana soluwalana commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Related Issue

Changes

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with documentation updates
  • Documentation only
  • Contributor tooling or automation
  • CI, build, or test infrastructure

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Documentation updated for user-visible behavior
  • Documentation not applicable — justification:

Verification

  • Pull request title follows the repository's Conventional Commit format
  • Every commit includes an appropriate Signed-off-by: trailer
  • uv run pre-commit run -a passes, or any blocked checks are identified below
  • Targeted tests pass, or tests are marked not applicable above
  • No secrets, API keys, or credentials are included

Targeted validation:

Summary by CodeRabbit

  • New Features

    • LoRA adapter sidecars now launch directly through the Python adapters module during model deployments.
    • Added configuration support for customizing the LoRA sidecar launch command.
    • Sidecar state, data, and configuration files now use the writable scratch volume for improved deployment compatibility.
    • Updated deployment defaults and validation to use the new launch method.
  • Documentation

    • Updated the configuration reference with the new default sidecar command.

@github-actions github-actions Bot added the fix label Aug 7, 2026
@soluwalana
soluwalana marked this pull request as ready for review August 7, 2026 21:17
@soluwalana
soluwalana requested review from a team as code owners August 7, 2026 21:17
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@soluwalana soluwalana changed the title fix(customizer): change entrypoint of side car to avoid API spin up for LoRA and unwritable directories fix(customizer): change entrypoint of side car to avoid API spin up for LoRA and unwritable dirs Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 50b91e4c-51cc-4b06-ae09-594d972326db

📥 Commits

Reviewing files that changed from the base of the PR and between 502a651 and b50edec.

📒 Files selected for processing (2)
  • services/core/models/src/nmp/core/models/controllers/backends/deployments_plugin/compiler.py
  • services/core/models/tests/unit/controllers/backends/deployments_plugin/test_compiler.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • services/core/models/tests/unit/controllers/backends/deployments_plugin/test_compiler.py

📝 Walkthrough

Walkthrough

The LoRA adapters sidecar now launches through direct Python module execution. Deployment configuration, Helm values, Docker helpers, compiler tests, compiler environment setup, and setup documentation use the updated command and writable scratch-backed XDG directories.

Changes

LoRA sidecar command

Layer / File(s) Summary
Command contract and deployment configuration
services/core/models/src/.../deployments_plugin/config.py, k8s/helm/values.yaml, plugins/nemo-deployments/tests/unit/.../docker_helpers.py, docs/set-up/config-reference.mdx
The default, Helm values, Docker helper, and configuration reference use python -m nmp.core.models.sidecars.adapters.main.
Scratch-backed XDG directories
services/core/models/src/.../deployments_plugin/compiler.py
The LoRA sidecar redirects XDG state, data, and config paths to the writable scratch volume.
Sidecar validation
services/core/models/tests/unit/.../test_compiler.py
The compiler test checks the direct module command and validates all three scratch-backed XDG environment variables.

Possibly related PRs

Suggested reviewers: tylersbray, mckornfield

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the entrypoint change and the fixes for API startup and unwritable directories.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nvbug6573168/solu

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 (1)
services/core/models/tests/unit/controllers/backends/deployments_plugin/test_compiler.py (1)

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

Assert the Docker command too.

The test compiles both runtimes, but Line 362 checks only the Kubernetes sidecar. Add an assertion for docker.server_config.containers[1].command.

Proposed assertion
     assert sidecar.command == ["python", "-m", "nmp.core.models.sidecars.adapters.main"]
+    assert docker.server_config.containers[1].command == [
+        "python",
+        "-m",
+        "nmp.core.models.sidecars.adapters.main",
+    ]
🤖 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
`@services/core/models/tests/unit/controllers/backends/deployments_plugin/test_compiler.py`
at line 362, Add an assertion alongside the existing Kubernetes sidecar check in
the test covering both compiled runtimes, validating that
docker.server_config.containers[1].command matches the expected Python module
command.
🤖 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
`@services/core/models/tests/unit/controllers/backends/deployments_plugin/test_compiler.py`:
- Line 362: Add an assertion alongside the existing Kubernetes sidecar check in
the test covering both compiled runtimes, validating that
docker.server_config.containers[1].command matches the expected Python module
command.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: aca0f37a-751b-4f8f-895e-43110ea55e99

📥 Commits

Reviewing files that changed from the base of the PR and between 6ed5aa1 and 95b690f.

📒 Files selected for processing (5)
  • docs/set-up/config-reference.mdx
  • k8s/helm/values.yaml
  • plugins/nemo-deployments/tests/unit/backends/docker/docker_helpers.py
  • services/core/models/src/nmp/core/models/controllers/backends/deployments_plugin/config.py
  • services/core/models/tests/unit/controllers/backends/deployments_plugin/test_compiler.py

@albcui albcui 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.

I think for good measure, let's just add "XDG_CONFIG_HOME": _LORA_SIDECAR_XDG_HOME to services/core/models/src/nmp/core/models/controllers/backends/deployments_plugin/compiler.py as well?

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 31633/40251 78.6% 63.2%
Integration Tests 18379/38186 48.1% 20.8%

…or LoRA and unwritable directories

Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
>
Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
>
Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
@soluwalana
soluwalana enabled auto-merge August 7, 2026 21:43
@soluwalana

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

@albcui
albcui self-requested a review August 7, 2026 21:49
@soluwalana
soluwalana added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit c2e2578 Aug 7, 2026
59 of 60 checks passed
@soluwalana
soluwalana deleted the nvbug6573168/solu branch August 7, 2026 22:15
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.

2 participants