refactor(plugins): re-route nmp.common job imports (ASTD-166)#43
Merged
marcusds merged 1 commit intoMay 26, 2026
Conversation
Contributor
|
…async_sdk (ASTD-166)
Phase A of slimming nmp-common in plugin installs.
- Swap nmp.common.jobs.{constants,exceptions} imports to direct
nemo_platform_plugin.jobs.{constants,exceptions} imports. nmp.common
re-exports these unchanged; routing through it is dead indirection.
- Tighten NemoJob.to_spec / NemoJob.compile signatures: async_sdk
changes from `object` to `AsyncNeMoPlatform`. Resolves Liskov
override violations every concrete subclass was previously hitting
(subclasses tighten to AsyncNeMoPlatform). nemo-platform-plugin
already depends on nemo-platform-sdk so the import has no cycle.
- Cast async_sdk=None in test_scheduler.py's NotImplementedError guard
test (base raises before reading the arg).
No install-footprint change — plugins still depend on nmp-common for
image.get_qualified_image + sdk_factory.get_platform_sdk. Phase B/C
will move those.
Signed-off-by: mschwab <mschwab@nvidia.com>
70e5bd6 to
42a1c79
Compare
maxdubrinsky
approved these changes
May 26, 2026
mckornfield
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase A of slimming
nmp-commonin plugin installs (ASTD-166, follow-up to ASTD-165).nmp.common.jobs.{constants,exceptions}imports to directnemo_platform_plugin.jobs.{constants,exceptions}imports.nmp.commonre-exports these unchanged — routing through it is dead indirection.NemoJob.to_spec/NemoJob.compilebase signatures:async_sdk: object→async_sdk: AsyncNeMoPlatform. Resolves Liskov override violations every concrete subclass previously hit.nemo-platform-pluginalready depends onnemo-platform-sdkso the new import has no cycle.async_sdk=Noneintest_scheduler.py'sNotImplementedErrorguard test (base raises before reading the arg).No install-footprint change — plugins still depend on
nmp-commonforimage.get_qualified_image+sdk_factory.get_platform_sdk. Phase B (moveget_qualified_imageintonemo_platform_plugin.jobs.image) and Phase C (add slimget_platform_sdktonemo_platform_plugin) will move those + drop the dep entirely. Estimated 50-70 MB per plugin install once complete.Test plan
uv run --frozen ty check <touched files>— All checks passedty checkcount: 183 → 181 (net -2, no new errors elsewhere)uv run --frozen pytest packages/nemo_platform_plugin/tests plugins/nemo-anonymizer/tests plugins/nemo-data-designer/tests— 772 passed, 1 skipped