Skip to content

chore(plugin): move image helpers to plugin package - #211

Merged
SandyChapman merged 1 commit into
mainfrom
image-helper-to-plugin/schapman
Jun 8, 2026
Merged

chore(plugin): move image helpers to plugin package#211
SandyChapman merged 1 commit into
mainfrom
image-helper-to-plugin/schapman

Conversation

@SandyChapman

@SandyChapman SandyChapman commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • move job image helper utilities into nemo-platform-plugin
  • update repo callers to import from nemo_platform_plugin.jobs.image
  • remove the old nmp-common image helper module

Notes

This keeps image resolution on the public plugin contract side for independently packaged plugins.

Summary by CodeRabbit

  • New Features

    • Added Docker image name qualification utilities to the NeMo Platform plugin.
  • Refactor

    • Consolidated image utility functions into the NeMo Platform plugin and updated codebase references to use the new location.
  • Tests

    • Added tests validating image qualification behavior and override handling.

@SandyChapman
SandyChapman requested review from a team as code owners June 8, 2026 17:00
Signed-off-by: Sandy Chapman <schapman@nvidia.com>
@SandyChapman
SandyChapman force-pushed the image-helper-to-plugin/schapman branch from 8e4bda4 to d37ef19 Compare June 8, 2026 17:04
@coderabbitai

coderabbitai Bot commented Jun 8, 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: a0185b5c-1d5b-499f-9efb-616e47886830

📥 Commits

Reviewing files that changed from the base of the PR and between 8e4bda4 and d37ef19.

📒 Files selected for processing (21)
  • packages/nemo_platform_plugin/src/nemo_platform_plugin/jobs/image.py
  • packages/nemo_platform_plugin/tests/test_jobs_image.py
  • packages/nmp_common/src/nmp/common/jobs/image.py
  • packages/nmp_testing/src/nmp/testing/e2e/base.py
  • plugins/nemo-anonymizer/src/nemo_anonymizer_plugin/jobs/run.py
  • plugins/nemo-data-designer/src/nemo_data_designer_plugin/jobs/create.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/compiler.py
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/api/v2/jobs/endpoints.py
  • services/core/inference-gateway/tests/integration/conftest.py
  • services/core/models/src/nmp/core/models/api/v2/models.py
  • services/core/models/src/nmp/core/models/controllers/backends/docker/creation_reconciler.py
  • services/core/models/tests/integration/test_models_controller.py
  • services/customizer/src/nmp/customizer/app/jobs/compiler.py
  • services/customizer/src/nmp/customizer/app/jobs/training/compiler.py
  • services/customizer/tests/test_compiler.py
  • services/evaluator/src/nmp/evaluator/app/jobs/benchmarks.py
  • services/evaluator/src/nmp/evaluator/app/jobs/fileset.py
  • services/evaluator/src/nmp/evaluator/app/jobs/metrics.py
  • services/evaluator/tests/nmp/evaluator/api/v2/benchmarks/test_benchmark_jobs.py
  • services/evaluator/tests/nmp/evaluator/api/v2/metrics/test_v2_metrics_endpoints.py
  • services/hello-world/src/nmp/hello_world/api/v2/jobs/endpoints.py
💤 Files with no reviewable changes (1)
  • packages/nmp_common/src/nmp/common/jobs/image.py
✅ Files skipped from review due to trivial changes (6)
  • plugins/nemo-data-designer/src/nemo_data_designer_plugin/jobs/create.py
  • services/core/models/tests/integration/test_models_controller.py
  • plugins/nemo-anonymizer/src/nemo_anonymizer_plugin/jobs/run.py
  • services/customizer/src/nmp/customizer/app/jobs/compiler.py
  • services/evaluator/src/nmp/evaluator/app/jobs/fileset.py
  • plugins/nemo-evaluator/src/nemo_evaluator/jobs/compiler.py
🚧 Files skipped from review as they are similar to previous changes (9)
  • services/hello-world/src/nmp/hello_world/api/v2/jobs/endpoints.py
  • packages/nmp_testing/src/nmp/testing/e2e/base.py
  • services/evaluator/tests/nmp/evaluator/api/v2/metrics/test_v2_metrics_endpoints.py
  • services/evaluator/tests/nmp/evaluator/api/v2/benchmarks/test_benchmark_jobs.py
  • services/core/inference-gateway/tests/integration/conftest.py
  • services/customizer/src/nmp/customizer/app/jobs/training/compiler.py
  • services/evaluator/src/nmp/evaluator/app/jobs/benchmarks.py
  • services/core/models/src/nmp/core/models/api/v2/models.py
  • services/evaluator/src/nmp/evaluator/app/jobs/metrics.py

📝 Walkthrough

Walkthrough

Image-qualification helpers (get_qualified_image, image_builder) are implemented in nemo_platform_plugin.jobs.image with platform-config fallbacks and unit tests. All previous imports from nmp.common.jobs.image were updated across plugins, services, and tests.

Changes

Image Helpers Module Relocation

Layer / File(s) Summary
Image helpers implementation in platform plugin
packages/nemo_platform_plugin/src/nemo_platform_plugin/jobs/image.py, packages/nemo_platform_plugin/tests/test_jobs_image.py
New module exports get_qualified_image and image_builder that format {registry}/{name}:{tag} using provided overrides or get_platform_config() defaults; tests validate defaults and overrides.
Import updates across plugins and services
packages/nmp_testing/src/nmp/testing/e2e/base.py, plugins/nemo-anonymizer/src/nemo_anonymizer_plugin/jobs/run.py, plugins/nemo-data-designer/src/nemo_data_designer_plugin/jobs/create.py, plugins/nemo-evaluator/src/nemo_evaluator/jobs/compiler.py, plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/api/v2/jobs/endpoints.py, services/core/inference-gateway/tests/integration/conftest.py, services/core/models/src/nmp/core/models/api/v2/models.py, services/core/models/src/nmp/core/models/controllers/backends/docker/creation_reconciler.py, services/core/models/tests/integration/test_models_controller.py, services/customizer/src/nmp/customizer/app/jobs/compiler.py, services/customizer/src/nmp/customizer/app/jobs/training/compiler.py, services/customizer/tests/test_compiler.py, services/evaluator/src/nmp/evaluator/app/jobs/benchmarks.py, services/evaluator/src/nmp/evaluator/app/jobs/fileset.py, services/evaluator/src/nmp/evaluator/app/jobs/metrics.py, services/evaluator/tests/nmp/evaluator/api/v2/benchmarks/test_benchmark_jobs.py, services/evaluator/tests/nmp/evaluator/api/v2/metrics/test_v2_metrics_endpoints.py, services/hello-world/src/nmp/hello_world/api/v2/jobs/endpoints.py
All consumers now import the helpers from nemo_platform_plugin.jobs.image instead of the removed nmp.common.jobs.image; import ordering was adjusted in some files.

Possibly related PRs

Suggested Reviewers

  • matthewgrossman
  • gabwow
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.36% 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 Title accurately describes the main change: moving image helper functions from nmp-common to nemo-platform-plugin package.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 image-helper-to-plugin/schapman

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

Comment thread packages/nemo_platform_plugin/tests/test_jobs_image.py Dismissed
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 18726/24770 75.6% 62.0%
Integration Tests 12001/23534 51.0% 26.2%

@matthewgrossman matthewgrossman 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

@SandyChapman
SandyChapman enabled auto-merge June 8, 2026 17:24
@SandyChapman
SandyChapman added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit c2112bb Jun 8, 2026
33 checks passed
matthewgrossman added a commit that referenced this pull request Jun 8, 2026
…mgrossman

Resolve conflicts from Sandy's PR #211 (get_qualified_image move).
All plugins keep importing from nemo_platform_plugin.config (this PR's
canonical location); nmp/common/jobs/image.py accepted as deleted since
nothing imports from it.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@SandyChapman
SandyChapman deleted the image-helper-to-plugin/schapman branch June 9, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants