--- id: sagemaker-training version: "5.1.1" license: Apache License 2.0 license_treatment: permissive maintenance: aging --- # sagemaker-training — Open source library for creating containers to run on Amazon SageMaker. License: permissive · Maintenance: aging · Downloads: 319.3K/mo ## What it is and what it does SageMaker Training Toolkit is a library that bridges custom training code and Amazon SageMaker's containerized training infrastructure. It runs inside a Docker image and handles the plumbing between SageMaker's training job orchestration and your training script—reading hyperparameters, environment variables, input channels, and model output paths from SageMaker's standard locations, then executing your entry point with the correct arguments and environment. You write a training script (Python or shell), package it in a Dockerfile with this library, and push the image to ECR or run it locally. When SageMaker launches a training job with that image, the toolkit automatically exposes training data paths, hyperparameters, and system info as environment variables and command-line arguments, then runs your script. It's designed for teams building custom training containers that need to integrate with SageMaker's managed training service rather than using pre-built framework images. Use it for: - Build a custom training container for a proprietary ML framework or training pipeline not covered by SageMaker's pre-built images. - Pass hyperparameters and input data channels from SageMaker training jobs into your training script without manual environment parsing. - Create a Docker image that reads training data from S3 via SageMaker channels and writes trained models to the correct output directory. - Execute shell or Python entry points with automatic argument and environment variable injection from SageMaker's hyperparameters.json and inputdataconfig.json. - Run training jobs locally using Docker before deploying to SageMaker's managed infrastructure. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Integrates training scripts into Docker containers for use with Amazon SageMaker, handling environment setup, hyperparameter passing, and entry point execution within containerized training jobs. Yes, if you are building custom training containers for SageMaker. The package is stable (Production/Stable classifier, 530 GitHub stars, no known vulnerabilities) and solves a real integration problem—it eliminates boilerplate for reading SageMaker's training configuration. High install friction (source distribution only) and aging maintenance (326 days since release) are acceptable trade-offs given the narrow, specialized use case. Not worth installing if you use SageMaker's pre-built framework images or train outside SageMaker. ## Install pip install sagemaker-training uv add sagemaker-training poetry add sagemaker-training ## Installing sagemaker-training Before you install: High install friction due to source distribution only. Package is aging (326 days since release) but maintained; last commit 2026-01-16. No runtime dependencies, but requires Docker and SageMaker integration context to be useful. License in practice: Licensed under Apache License 2.0 (permissive). Safe for commercial and open-source use with standard attribution requirements. Quickstart: # In Dockerfile: RUN pip install sagemaker-training COPY train.py /opt/ml/code/train.py ENV SAGEMAKER_PROGRAM train.py # In training script: from sagemaker_training import environment, entry_point env = environment.Environment() args = env.to_cmd_args() entry_point.run(uri=env.module_dir, user_entry_point=env.user_entry_point, args=args, env_vars=env.to_env_vars()) Requires Docker and SageMaker infrastructure; training script must be located at /opt/ml/code; intended for use within SageMaker training jobs, not standalone Python environments. Verify before relying: - Whether the package works with Python versions beyond 3.8, 3.9, 3.10 (classifiers list these but requires_python is unspecified) - Current state of example notebooks and documentation links referenced in the description ## Package facts - License: Apache License 2.0 (permissive) - Python support: unspecified - Install friction: high - Maintenance: aging - Downloads: 319.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sagemaker docker training container, ml model training in docker, sagemaker training toolkit, containerized machine learning training, aws sagemaker custom containers, docker entry point for ml training, sagemaker hyperparameter passing, sagemaker-integration, docker-training, aws-ml [View on SkillFed](https://skillfed.io/packages/sagemaker-training) · [View on PyPI](https://pypi.org/project/sagemaker-training/)