Command Reference¶
Complete reference for all easy_sm CLI commands.
Command Structure¶
Cloud commands are at the top level for simplicity. Local operations are under the local sub-command.
Global Options¶
| Option | Description | Default |
|---|---|---|
--docker-tag, -t | Docker image tag | latest |
--help | Show help message | - |
--version | Show version | - |
Commands by Category¶
Initialization¶
| Command | Description |
|---|---|
init | Initialize new easy_sm project with template files |
Build & Push¶
| Command | Description |
|---|---|
build | Build Docker image locally |
push | Push Docker image to AWS ECR |
update-scripts | Update shell scripts with latest secure versions |
Local Operations¶
| Command | Description |
|---|---|
local train | Train model locally in Docker |
local deploy | Deploy model locally on port 8080 |
local process | Run processing job locally |
local stop | Stop local deployment |
Cloud Training¶
| Command | Description |
|---|---|
train | Train model on AWS SageMaker |
Cloud Deployment¶
| Command | Description |
|---|---|
deploy | Deploy to provisioned SageMaker endpoint |
deploy-serverless | Deploy to serverless SageMaker endpoint |
Cloud Processing¶
| Command | Description |
|---|---|
process | Run processing job on SageMaker |
batch-transform | Run batch predictions |
Management¶
| Command | Description |
|---|---|
list-endpoints | List all SageMaker endpoints |
list-training-jobs | List recent training jobs |
get-model-artifacts | Get S3 model path from training job |
delete-endpoint | Delete a SageMaker endpoint |
upload-data | Upload data to S3 |
Common Options¶
Many commands share common options:
App Name¶
Auto-detected from *.json config file in current directory. Override when multiple configs exist.
IAM Role¶
Required for cloud operations. Set via environment variable or flag:
Instance Configuration¶
Common instance types:
- Training:
ml.m5.large,ml.m5.xlarge,ml.p3.2xlarge(GPU) - Inference:
ml.t2.medium,ml.m5.large,ml.c5.xlarge
See AWS SageMaker Pricing for full list.
S3 Paths¶
--input-data, -i TEXT S3 input path (s3://bucket/path)
--output-path, -o TEXT S3 output path (s3://bucket/path)
S3 paths must use the s3:// protocol.
Usage Patterns¶
Auto-Detection¶
Most commands work without specifying app name or IAM role:
# App name auto-detected from *.json file
# IAM role from SAGEMAKER_ROLE env var
easy_sm build
easy_sm train -n job-name -e ml.m5.large -i s3://... -o s3://...
Explicit Configuration¶
Override auto-detection when needed:
Docker Tags¶
Use versioned Docker tags:
Piped Workflows¶
Combine commands with Unix pipes:
# Get latest training job model and deploy
easy_sm deploy -n my-endpoint -e ml.m5.large \
-m $(easy_sm get-model-artifacts -j $(easy_sm list-training-jobs -n -m 1))
See Piped Workflows for more examples.
Command Details¶
Click on any command for detailed documentation:
- init - Initialize projects
- build - Build Docker images
- push - Push to ECR
- local - Local operations
- train - Train on SageMaker
- deploy - Deploy endpoints
- process - Processing jobs
- batch-transform - Batch predictions
- endpoints - Manage endpoints
- update-scripts - Update shell scripts