Skip to content

fix: include sagemaker.mlops subpackages in sagemaker-mlops wheel (Fixes #5612)#5647

Open
junagent wants to merge 1 commit intoaws:masterfrom
junagent:junagent/fix/sagemaker-mlops-missing-packages
Open

fix: include sagemaker.mlops subpackages in sagemaker-mlops wheel (Fixes #5612)#5647
junagent wants to merge 1 commit intoaws:masterfrom
junagent:junagent/fix/sagemaker-mlops-missing-packages

Conversation

@junagent
Copy link

Summary

Set namespaces=false in [tool.setuptools.packages.find] to ensure subpackages sagemaker.mlops, sagemaker.mlops.feature_store, and sagemaker.mlops.feature_store.feature_processor are included in the wheel distribution.

Root Cause

The sagemaker-mlops wheel was missing the mlops subpackage tree because namespaces=true (PEP 420 namespace package mode) caused setuptools to exclude subdirectories from the wheel.

Fix

Changed in sagemaker-mlops/pyproject.toml:

[tool.setuptools.packages.find]
where = ["src"]
include = ["sagemaker*"]
- namespaces = true
+ namespaces = false

With namespaces=false, setuptools treats sagemaker as a regular package and correctly includes all discovered subpackages: mlops, mlops.feature_store, mlops.feature_store.feature_processor.

Testing

After this fix, the wheel should include:

  • sagemaker_mlops-*/sagemaker/__init__.py
  • sagemaker_mlops-*/sagemaker/mlops/__init__.py
  • sagemaker_mlops-*/sagemaker/mlops/feature_store/__init__.py
  • sagemaker_mlops-*/sagemaker/mlops/feature_store/feature_processor/__init__.py
  • All corresponding .py modules

Fixes #5612

@junagent junagent force-pushed the junagent/fix/sagemaker-mlops-missing-packages branch from 94d5465 to c12dfd0 Compare March 19, 2026 02:28
 aws#5612)

Set namespaces=false to ensure subpackages sagemaker.mlops,
sagemaker.mlops.feature_store, and
sagemaker.mlops.feature_store.feature_processor are included in the
wheel distribution. Previously, namespaces=true caused setuptools to
treat sagemaker as a PEP 420 namespace package, excluding all
subdirectories from the wheel.

Fixes aws#5612
@junagent
Copy link
Author

Bug Label Request

This fix addresses a critical distribution regression (Issue #5612) where namespaces = true caused setuptools to treat sagemaker as a PEP 420 namespace package, silently excluding all subdirectories (sagemaker.mlops, sagemaker.mlops.feature_store, sagemaker.mlops.feature_store.feature_processor) from the sagemaker-mlops wheel.

Impact: Users who install sagemaker-mlops from PyPI cannot use any feature processor, feature store, or MLOps workflow APIs. The installation succeeds, but all submodules are missing at runtime.

Root cause: namespaces = true in [tool.setuptools.packages.find] is incompatible with this package structure where src/sagemaker/__init__.py contains actual code. This causes setuptools to only include the root namespace marker, not the full package tree.

Fix verification:

  • Before: wheel contains only sagemaker/__init__.py (namespace marker, no submodules)
  • After: wheel contains full sagemaker/, sagemaker/mlops/, sagemaker/mlops/feature_store/, sagemaker/mlops/feature_store/feature_processor/ and all .py modules

Requesting a bug label for proper triage and bounty categorization.

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.

Feature Processor subpackage missing from sagemaker-mlops wheel

1 participant