### Deploy and invoke models with ModelBuilder Source: https://sagemaker.readthedocs.io Build, deploy, and invoke models using the simplified ModelBuilder interface. ```python from sagemaker.serve import ModelBuilder model_builder = ModelBuilder( model="your-model", model_path="s3://your-bucket/model-artifacts" ) model = model_builder.build(model_name="my-model") endpoint = model_builder.deploy( endpoint_name="my-endpoint", instance_type="ml.m5.xlarge", initial_instance_count=1 ) result = endpoint.invoke( body={"inputs": "your-input-data"}, content_type="application/json" ) ``` -------------------------------- ### Manage ML workflows with Pipeline Source: https://sagemaker.readthedocs.io Define and manage machine learning pipelines using the sagemaker.mlops module. ```python from sagemaker.mlops import Pipeline, TrainingStep, ModelStep pipeline = Pipeline(name="production-ml-pipeline") training_step = TrainingStep( name="train-model", training_config=TrainingConfig( algorithm_specification={ "training_image": "your-training-image" } ) ) pipeline.add_step(training_step) ``` -------------------------------- ### Train models with ModelTrainer Source: https://sagemaker.readthedocs.io Use the unified ModelTrainer interface to configure and execute training jobs with specific input data channels. ```python from sagemaker.train import ModelTrainer from sagemaker.train.configs import InputData trainer = ModelTrainer( training_image="your-training-image", role="your-sagemaker-role" ) train_data = InputData( channel_name="training", data_source="s3://your-bucket/train-data" ) training_job = trainer.train(input_data_config=[train_data]) ``` -------------------------------- ### Access resources with SageMaker Core Source: https://sagemaker.readthedocs.io Perform low-level, object-oriented resource management using the sagemaker.core module. ```python from sagemaker.core.resources import TrainingJob training_job = TrainingJob.create( training_job_name="my-training-job", role_arn="arn:aws:iam::123456789012:role/SageMakerRole", input_data_config=[{ "channel_name": "training", "data_source": "s3://my-bucket/train" }] ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.