How aws/sagemaker-python-sdk works
SageMaker Python SDK V3 is a modular client library for creating, running, and operating machine-learning workloads on SageMaker. The principal user journey is to configure and submit training, use the resulting model for deployment, then invoke an inference endpoint. The repository also includes pipeline authoring and execution, Feature Store ingestion, and local execution. The README documents the main training and inference APIs; source excerpts and the index show selected implementation links. Several capability branches are represented from documented scope and the file tree, with unverified links dashed.
Main entry points: local/pipeline.py Local pipeline runner · workflow/pipeline.py Pipeline API · serve ModelBuilder · model_server Inference servers
Components 30
Model training
- ModelTrainer
sagemaker-train/src/sagemaker/train/model_trainer.py - Training runtime
sagemaker-core/src/sagemaker/core/training
Model serving
- ModelBuilder
sagemaker-serve/src/sagemaker/serve - Inference servers
sagemaker-serve/src/sagemaker/serve/model_server
Workflow orchestration
- Pipeline API
sagemaker-mlops/src/sagemaker/mlops/workflow/pipeline.py - Pipeline context
sagemaker-core/src/sagemaker/core/workflow/pipeline_context.py - Pipeline variables
sagemaker-core/src/sagemaker/core/helper/pipeline_variable.py - Remote variables
sagemaker-core/src/sagemaker/core/remote_function/core/pipeline_variables.py - Local pipelines
sagemaker-mlops/src/sagemaker/mlops/local/local_pipeline_session.py - Local pipeline runner
sagemaker-mlops/src/sagemaker/mlops/local/pipeline.py
MLOps capabilities
- Feature Store
sagemaker-mlops/src/sagemaker/mlops/feature_store - Pandas ingestion
sagemaker-mlops/src/sagemaker/mlops/feature_store/ingestion_manager_pandas.py - Experiments
sagemaker-core/src/sagemaker/core/experiments - Model registry
sagemaker-core/src/sagemaker/core/model_registry.py - Lineage tracking
sagemaker-core/src/sagemaker/core/lineage
Shared runtime
- Session helpers
sagemaker-core/src/sagemaker/core/helper/session_helper.py - Configuration
sagemaker-core/src/sagemaker/core/config/config_schema.py - Local execution
sagemaker-core/src/sagemaker/core/local/local_session.py - Common utilities
sagemaker-core/src/sagemaker/core/common_utils.py - Framework utilities
sagemaker-core/src/sagemaker/core/fw_utils.py - S3 utilities
sagemaker-core/src/sagemaker/core/s3 - API shapes
sagemaker-core/src/sagemaker/core/shapes/shapes.py - Telemetry
sagemaker-core/src/sagemaker/core/telemetry/telemetry_logging.py - Execution variables
sagemaker-core/src/sagemaker/core/workflow/execution_variables.py - Workflow parameters
sagemaker-core/src/sagemaker/core/workflow/parameters.py - Step properties
sagemaker-core/src/sagemaker/core/workflow/properties.py - Pipeline capture
sagemaker-core/src/sagemaker/core/workflow/pipeline_capture.py
Other components
- SDK user
- SageMaker service
- Inference endpoint
Connections 32
- SDK user → ModelTrainer: configures training
- ModelTrainer → Training runtime: submits training
- Training runtime → SageMaker service: creates jobs
- SDK user → ModelBuilder: configures deployment
- ModelBuilder → Inference servers: selects server
sagemaker-serve/src/sagemaker/serve/model_server/in_process_model_server/app.py - ModelBuilder → Inference endpoint: builds endpoint
- SDK user → Inference endpoint: invokes model
- Pipeline API → Pipeline context: captures steps
- Pipeline context → Session helpers: uses session
sagemaker-core/src/sagemaker/core/workflow/pipeline_context.py - Pipeline variables → Pipeline context: supports expressions
- Remote variables → Pipeline variables: uses variables
sagemaker-core/src/sagemaker/core/remote_function/core/pipeline_variables.py - Pipeline API → S3 utilities: uses storage
sagemaker-mlops/src/sagemaker/mlops/workflow/pipeline.py - Local pipelines → Local pipeline runner: executes locally
sagemaker-mlops/src/sagemaker/mlops/local/local_pipeline_session.py - Local pipeline runner → Pipeline variables: uses variables
sagemaker-mlops/src/sagemaker/mlops/local/pipeline.py - Local pipeline runner → Workflow parameters: uses parameters
sagemaker-mlops/src/sagemaker/mlops/local/pipeline.py - Local pipeline runner → Execution variables: uses variables
sagemaker-mlops/src/sagemaker/mlops/local/pipeline.py - Local pipeline runner → Step properties: uses properties
sagemaker-mlops/src/sagemaker/mlops/local/pipeline.py - Feature Store → Pandas ingestion: supports ingestion
- Pandas ingestion → API shapes: uses shapes
sagemaker-mlops/src/sagemaker/mlops/feature_store/ingestion_manager_pandas.py - Pandas ingestion → Common utilities: uses utilities
sagemaker-mlops/src/sagemaker/mlops/feature_store/ingestion_manager_pandas.py - Experiments → SageMaker service: manages runs
- Model registry → SageMaker service: manages models
- Lineage tracking → SageMaker service: tracks artifacts
- Session helpers → S3 utilities: transfers data
- Pipeline capture → API shapes: uses shapes
sagemaker-core/src/sagemaker/core/workflow/pipeline_capture.py - Pipeline API → Configuration: reads configuration
sagemaker-mlops/src/sagemaker/mlops/workflow/pipeline.py - Pipeline API → Common utilities: uses utilities
sagemaker-mlops/src/sagemaker/mlops/workflow/pipeline.py - Inference servers → Framework utilities: uses utilities
sagemaker-serve/src/sagemaker/serve/model_server/tgi/server.py - Inference servers → Session helpers: uses session
sagemaker-serve/src/sagemaker/serve/model_server/tgi/server.py - Local execution → SageMaker service: emulates service
- Local execution → Common utilities: uses utilities
sagemaker-core/src/sagemaker/core/local/local_session.py - Telemetry → SageMaker service: reports usage