CLI and TUI for submitting and monitoring Amazon SageMaker Processing Jobs and Pipelines.
Project description
SageMaker Ops CLI
smops is a command-line tool for operating Amazon SageMaker Processing Jobs and SageMaker Pipelines.
It can:
- Submit SageMaker Processing Jobs
- Start SageMaker Pipeline executions
- Show running Processing Jobs in an interactive TUI
- Show running and recently completed Pipeline executions in an interactive TUI
- Inspect Pipeline step status and failed step CloudWatch logs
- Work with one, many, or all configured AWS profiles
Installation
Install from PyPI:
pip install sagemaker-ops-cli
The installed command is:
smops --help
Install from GitHub:
pip install git+https://github.com/southpolemonkey/smops.git
Install from a local wheel:
pip install dist/sagemaker_ops_cli-0.1.1-py3-none-any.whl
Install with Homebrew:
brew tap southpolemonkey/smops https://github.com/southpolemonkey/smops
brew install sagemaker-ops-cli
If the formula is later moved into a dedicated southpolemonkey/homebrew-smops tap repository, users can use the shorter command:
brew tap southpolemonkey/smops
brew install sagemaker-ops-cli
For local development:
python -m venv .venv
source .venv/bin/activate
pip install -e .
To enable YAML config files:
pip install -e '.[yaml]'
Build The Python Package
pip install -e '.[dev]'
python -m build
Build artifacts are written to dist/:
sagemaker_ops_cli-0.1.1-py3-none-any.whlsagemaker_ops_cli-0.1.1.tar.gz
Submit A Processing Job
The config file uses the same parameter structure as boto3 create_processing_job.
smops processing submit \
--profile dev \
--region us-east-1 \
--config examples/processing-job.json
Validate the request without submitting it:
smops processing submit --config examples/processing-job.json --dry-run
Start A Pipeline Execution
smops pipeline start \
--profile dev \
--region us-east-1 \
--name my-pipeline \
--display-name manual-run-001 \
--parameter InputDate=2026-06-30 \
--parameter Mode=prod
Processing Jobs TUI
smops tui processing --profile dev --region us-east-1
Multiple profiles:
smops tui processing --profile dev --profile prod --region us-east-1
All profiles:
smops tui processing --all-profiles
Keyboard shortcuts:
Up/DownorLeft/Right: switch jobsr: refreshq: quit
Pipelines TUI
smops tui pipelines --profile dev --region us-east-1
Filter to one pipeline:
smops tui pipelines --profile dev --region us-east-1 --name my-pipeline
By default, the TUI shows running executions plus executions completed within the last 3 hours, so you can inspect recent success and failure results. Use --hours to adjust the time window:
smops tui pipelines --profile dev --region us-east-1 --name my-pipeline --hours 6
Keyboard shortcuts:
Left/Right: switch focus between the executions and steps panelsUp/Down: move within the focused panell: load the CloudWatch log tail for the selected failed stepr: refreshq: quit
Log discovery is currently supported for these step job types:
- ProcessingJob:
/aws/sagemaker/ProcessingJobs - TrainingJob:
/aws/sagemaker/TrainingJobs - TransformJob:
/aws/sagemaker/TransformJobs
Non-Interactive Commands
smops processing list --profile dev --region us-east-1
smops pipeline list --profile dev --region us-east-1
smops pipeline list --profile dev --region us-east-1 --name my-pipeline --hours 6
smops pipeline steps --profile dev --region us-east-1 --execution-arn arn:aws:sagemaker:...
processing list reads 20 running jobs per page by default. If the output includes Next token, pass it to fetch the next page:
smops processing list --profile dev --region us-east-1 --max-results 20
smops processing list --profile dev --region us-east-1 --max-results 20 --next-token '<token>'
When pipeline list is used without --name, it scans 10 pipelines per page by default. This avoids long hangs in AWS accounts with many pipelines. If the output includes Next token, pass it to continue scanning:
smops pipeline list --profile dev --region us-east-1 --pipeline-page-size 10
smops pipeline list --profile dev --region us-east-1 --pipeline-page-size 10 --next-token '<token>'
AWS Permissions
The AWS identity used by smops needs at least these permissions:
sagemaker:CreateProcessingJobsagemaker:StartPipelineExecutionsagemaker:ListProcessingJobssagemaker:DescribeProcessingJobsagemaker:ListPipelinessagemaker:ListPipelineExecutionssagemaker:DescribePipelineExecutionsagemaker:ListPipelineExecutionStepslogs:DescribeLogStreamslogs:GetLogEvents
Mock AWS Profile
This repository includes mock AWS config files for local demos of profile switching and CLI argument parsing. They do not write to your real ~/.aws files:
export AWS_CONFIG_FILE=examples/aws/config
export AWS_SHARED_CREDENTIALS_FILE=examples/aws/credentials
export AWS_PROFILE=mock-dev
export AWS_DEFAULT_REGION=us-east-1
You can also load the sample environment file directly:
set -a
source examples/aws/mock.env
set +a
Then run:
smops processing submit --config examples/processing-job.json --dry-run
smops processing list --profile mock-dev
smops tui processing --profile mock-dev
The bundled credentials are dummy values. They are only intended for dry runs, mock environments, local endpoints, or tests that use botocore Stubber/moto. They will not authenticate against real AWS.
E2E Tests
The tests use moto to simulate AWS SageMaker and CloudWatch Logs. They do not call real AWS services:
pip install -e '.[dev]'
pytest
Coverage includes:
- Processing Job submission and paginated running job lists
- Pipeline execution start and active/recent execution lists
- Pipeline step status display
- Failed step CloudWatch Logs tailing
- Processing Job TUI keyboard navigation with up, down, left, and right
- Pipeline TUI execution, step, and failed log loading
- Multiple AWS profile resolution
Moto does not currently implement list_pipeline_execution_steps, so that paginator is faked in memory in the tests. The other SageMaker and CloudWatch Logs calls run inside the moto environment.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sagemaker_ops_cli-0.1.1.tar.gz.
File metadata
- Download URL: sagemaker_ops_cli-0.1.1.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
719edaab83811108bd5eef2edd06b7c2c533d8d432553ac9858ffbc43a8264b6
|
|
| MD5 |
eab34946d641ebcb420f7ac2df9f7360
|
|
| BLAKE2b-256 |
1df751474898c3958e3ac8746e894b912b2309c298c72cdd0907a305ebcf0ff7
|
File details
Details for the file sagemaker_ops_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sagemaker_ops_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d09e4be97535eddeff4c18dd97bc0375cd420e9294bd1a391b2e495df1858cf6
|
|
| MD5 |
10e0f56a0d8d27f63acf1afae1cf544d
|
|
| BLAKE2b-256 |
a9c05c9908fdb4037bef97e920d5913f1fd14264e0395d5824b6e2f7ad0fe3fd
|