Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SageMaker SDK v3 Skill

SageMaker Python SDK v3 — Claude Code Skill

A Claude Code skill that guarantees correct SageMaker Python SDK v3 code every time.

SDK v3.8.0 Python <= 3.13 Claude Code Skill

A Claude Code skill that guarantees correct SageMaker Python SDK v3 code every time. Covers classical ML (XGBoost, SKLearn, PyTorch), LLM inference (DJL/vLLM), LLM fine-tuning (QLoRA/LoRA/Trainium), HyperPod inference, Model Monitor, and SageMaker Pipelines.

Verified against SDK v3.8.0 source code using CodeGraph analysis.


What This Skill Does

  • Generates correct ModelTrainer-based launchers (never v2 estimators)
  • Writes training scripts with proper paths, argparse types, and metric logging
  • Produces inference hooks (model_fn, input_fn, predict_fn, output_fn)
  • Scaffolds full training projects with README and run commands
  • Provides SageMaker Pipelines patterns for multi-step workflows
  • Deploys LLMs with DJL LMI / vLLM using the Core API pattern
  • Deploys models on HyperPod clusters (JumpStart, custom, autoscaling)
  • Sets up Model Monitor (Data Quality, Model Quality, Bias, Explainability)
  • Fine-tunes LLMs with QLoRA, LoRA, and AWS training recipes (GPU + Trainium)

Guardrails it enforces on every output:

  • ModelTrainer only — never v2 estimators
  • output_data_config=OutputDataConfig(s3_output_path=...) — never output_path=
  • entry_script= — never entry_point=
  • logs=True (boolean) — never logs='All'
  • Model saved to /opt/ml/model/ always
  • LLM deployments use Core API — NOT ModelBuilder with DJL/vLLM
  • All imports use v3 paths — never sagemaker.model, sagemaker.workflow, sagemaker.processing

Installation

Global (all projects)

ln -s /path/to/sagemaker-python-sdk-v3-skill ~/.claude/skills/sagemaker-sdk-v3

Project-local

mkdir -p .claude/skills
ln -s /path/to/sagemaker-python-sdk-v3-skill .claude/skills/sagemaker-sdk-v3

Usage

Invoke with /sagemaker-sdk-v3 in Claude Code, optionally with arguments:

/sagemaker-sdk-v3 xgboost train
/sagemaker-sdk-v3 sklearn deploy
/sagemaker-sdk-v3 pytorch scaffold
/sagemaker-sdk-v3 pipeline
/sagemaker-sdk-v3 llm deploy
/sagemaker-sdk-v3 llm train
/sagemaker-sdk-v3 hyperpod
/sagemaker-sdk-v3 monitor

Or just describe what you need:

  • "Write a SageMaker training job launcher for XGBoost"
  • "Deploy Llama 3.1 8B on SageMaker with vLLM"
  • "Build a SageMaker Pipeline with preprocessing and training steps"
  • "Fine-tune Llama with QLoRA on SageMaker"
  • "Set up Model Monitor for my endpoint"

Requirements

  • Python <= 3.13 (SDK v3 is not compatible with Python 3.14+)
  • AWS credentials configured (aws configure or IAM role)
pip install sagemaker boto3

For HyperPod:

pip install sagemaker-hyperpod

File Structure

sagemaker-python-sdk-v3-skill/
├── SKILL.md                              # Main skill: guardrails, routing, architecture
├── README.md                             # This file
├── references/
│   ├── api-reference.md                  # SDK v3 imports, class signatures, gotchas
│   ├── training-patterns.md              # Framework-specific launcher patterns
│   ├── inference-patterns.md             # model_fn/input_fn/predict_fn patterns
│   ├── pipeline-patterns.md              # SageMaker Pipelines patterns
│   ├── llm-inference-patterns.md         # LLM deployment: DJL/vLLM, Core API, CUDA compat
│   ├── llm-training-patterns.md          # LLM fine-tuning: QLoRA, LoRA, Trainium, recipes
│   ├── hyperpod-inference-patterns.md    # HyperPod: JumpStart, custom models, autoscaling
│   └── model-monitor-patterns.md         # All 4 monitor types, baselines, schedules, bugs
└── templates/
    ├── launcher.py                       # Canonical SDK v3 launcher
    ├── train_xgboost.py                  # XGBoost training script
    ├── train_sklearn.py                  # SKLearn training script
    ├── train_pytorch.py                  # PyTorch training script
    └── inference.py                      # Multi-framework inference script

About

Claude Code skill for Amazon SageMaker Python SDK v3 — classical ML, LLM inference, HyperPod, Model Monitor, training recipes

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages