Mental model
SDK V3 package map
Prevents confusion between lifecycle concepts and Python package boundaries.
lifecycle requirement / configuration
configured SageMaker object or managed resource
I organize SageMaker V3 by lifecycle first, then map each stage to the SDK package and object I need.
Mental model
What this means before worrying about syntax.
Think of SageMaker in two dimensions: lifecycle stage and SDK package. The package tells you where an object lives; the lifecycle tells you why you are using it.
- Lifecycle tells you why; package tells you where; object tells you what to instantiate or call.
- Use a few anchor objects instead of memorizing the full import tree.
- core can contain training- or endpoint-related resource/configuration shapes without replacing train or serve.
core = foundations | train = training | serve = inference/deployment | mlops = lifecycle/governance
Implementation anatomy
The sequence you would actually build or configure.
- 1
Start from the lifecycle action.
- 2
Map training work to sagemaker-train, serving to sagemaker-serve, shared resources/config to sagemaker-core, and lifecycle/governance to sagemaker-mlops.
- 3
Verify exact import/signature against the installed V3 SDK because examples evolve.
Concrete example
A real model-development or production flow.
Complaint CSV in S3
ModelTrainer runs scikit-learn training
Metrics decide whether the candidate passes
Registry stores the approved version
ModelBuilder creates the serving model
Endpoint serves predictions
Monitoring/retraining closes the loop
Implementation lab
Concrete code, data manipulation and configuration for this lifecycle step.
See where the V3 anchor objects come from
The point is not to memorize imports. Notice the separation: core provides shared/session plumbing; train launches training; serve builds/deploys inference.
from sagemaker.core.helper.session_helper import Session, get_execution_role
from sagemaker.train import ModelTrainer
from sagemaker.train.configs import InputData, SourceCode
from sagemaker.serve.model_builder import ModelBuilder
session = Session()
role = get_execution_role()
print("region:", session.boto_region_name)
print("default bucket:", session.default_bucket())
Design decisions that matter
- Memorize responsibilities, not every class name.
- Distinguish SDK package organization from the SageMaker service lifecycle.
Common failure modes
- A training-related class can live under core.
- Older V2 Estimator examples are still common and should be translated by responsibility, not copied blindly.
Production readiness check
Items to close before treating this step as production-ready.