22 Aws Sagemaker

Chapter 22: AWS SageMaker Overview🔗

AWS SageMaker is Amazon's managed ML platform — the AWS equivalent of Vertex AI.


Key SageMaker Components🔗

┌──────────────────────────────────────────────────────────┐
│                  AWS SAGEMAKER SUITE                     │
│  Studio (IDE) + Notebooks + JumpStart (model hub)        │
│  Data Wrangler (feature eng) + Feature Store             │
│  Training Jobs + AutoPilot (AutoML) + Experiments        │
│  Pipelines (workflow orchestration)                      │
│  Model Registry + Deployment (Endpoints)                 │
│  Model Monitor (drift detection) + Clarify (fairness)    │
└──────────────────────────────────────────────────────────┘

SageMaker vs Vertex AI🔗

Aspect SageMaker (AWS) Vertex AI (GCP)
Notebooks SageMaker Studio Vertex Workbench
AutoML SageMaker Autopilot Vertex AI AutoML
Pipelines SageMaker Pipelines Vertex AI Pipelines (KFP)
Feature Store SageMaker Feature Store Vertex AI Feature Store
Serving SageMaker Endpoints Vertex AI Endpoints
Monitoring SageMaker Model Monitor Vertex AI Monitoring
Container Registry ECR Artifact Registry
K8s EKS GKE

Quick Start🔗

import sagemaker
from sagemaker.sklearn import SKLearn

session = sagemaker.Session()
role = sagemaker.get_execution_role()

estimator = SKLearn(
    entry_point="train.py",
    role=role,
    instance_type="ml.m5.large",
    framework_version="1.2-1",
    hyperparameters={"n-estimators": 200, "learning-rate": 0.05},
)

estimator.fit({"train": "s3://bucket/train.csv"})
predictor = estimator.deploy(instance_type="ml.t2.medium", initial_instance_count=1)

Next → Chapter 23: Azure ML