sagemaker-mlops1.3.0
Published
SageMaker MLOps package for workflow orchestration and model building
pip install sagemaker-mlops
Package Downloads
Authors
Requires Python
>=3.9
SageMaker MLOps Package
The sagemaker-mlops package provides high-level orchestration capabilities for Amazon SageMaker workflows, including pipeline definitions, step implementations, and model building utilities.
Purpose
This package sits at the top of the SageMaker SDK dependency hierarchy and orchestrates components from the Core, Train, and Serve packages. It resolves architectural violations by providing a dedicated home for workflow orchestration logic that needs to import from multiple lower-level packages.
Architecture
The SageMaker SDK follows a clean 4-package architecture:
┌─────────────────────────────────────────────────────────────┐
│ Package Architecture │
└─────────────────────────────────────────────────────────────┘
MLOps (orchestration)
↙ ↓ ↘
Train Core Serve
↘ ↓ ↙
Core
Dependency Rules:
✓ Core → nothing (foundation layer)
✓ Train → Core only
✓ Serve → Core only
✓ MLOps → Train, Serve, Core (orchestration layer)
Package Responsibilities
- sagemaker-core: Foundation primitives (entities, parameters, functions, conditions, properties)
- sagemaker-train: Training functionality (estimators, processors, tuners)
- sagemaker-serve: Serving functionality (models, predictors, endpoints)
- sagemaker-mlops: Workflow orchestration (pipelines, steps, model building)
What's in This Package
Workflow Orchestration (from Core)
The following files were moved from sagemaker-core/src/sagemaker/core/workflow/ to establish clean architectural boundaries:
Core Orchestration (2 files):
pipeline.py- Pipeline class for workflow definitionsteps.py- Base Step class and common step logic
Step Implementations (13 files):
automl_step.py- AutoML training stepsmodel_step.py- Model creation and registration stepscallback_step.py- Callback steps for custom logicclarify_check_step.py- Model bias and explainability checkscondition_step.py- Conditional execution stepsemr_step.py- EMR cluster stepsfail_step.py- Explicit failure stepsfunction_step.py- Lambda function stepslambda_step.py- AWS Lambda invocation stepsmonitor_batch_transform_step.py- Batch transform monitoringnotebook_job_step.py- Notebook execution stepsquality_check_step.py- Model quality checksstep_collections.py- Step collection utilitiesstep_outputs.py- Step output handling
Utilities (6 files):
_utils.py- Internal utilities_steps_compiler.py- Step compilation logic_repack_model.py- Model repackaging utilities_event_bridge_client_helper.py- EventBridge integrationtriggers.py- Pipeline triggersutilities.py- Public utility functions
Configuration (6 files):
check_job_config.py- Quality check configurationparallelism_config.py- Parallel execution configurationpipeline_definition_config.py- Pipeline definition settingspipeline_experiment_config.py- Experiment tracking configurationretry.py- Retry policiesselective_execution_config.py- Selective execution settings
Model Building
ModelBuilder is now located in the sagemaker-serve package but is re-exported from MLOps for convenience.
What Stayed in Core
The following primitive files remain in sagemaker-core/src/sagemaker/core/workflow/:
entities.py- Base Entity and PipelineVariable classesparameters.py- Parameter type definitionsfunctions.py- Pipeline functions (Join, JsonGet)execution_variables.py- ExecutionVariableconditions.py- Condition primitivesproperties.py- Property definitionspipeline_context.py- PipelineSession (refactored to remove Train/Serve imports)__init__.py- Package initialization
Installation
Install the package in editable mode for development:
pip install -e sagemaker-mlops
Or install all SageMaker packages together:
pip install -e sagemaker-core
pip install -e sagemaker-train
pip install -e sagemaker-serve
pip install -e sagemaker-mlops