aws/sagemaker-training-toolkit

Train machine learning models within a 🐳 Docker container using 🧠 Amazon SageMaker.

What it solves

This toolkit provides a way to make any Docker container compatible with Amazon SageMaker for training machine learning models. It removes the need to write complex boilerplate code to handle the environment setup, data paths, and hyperparameters when using custom training containers.

How it works

The toolkit is installed as a Python library within a Docker image. It manages the entry point of the training script (defined by the SAGEMAKER_PROGRAM environment variable) and handles the communication between the SageMaker service and the training script. It provides an Environment object to programmatically access hyperparameters, filesystem locations, and environment variables (such as input data channels) provided by SageMaker.

Who it’s for

Data scientists and ML engineers who are using custom Docker containers to train models on Amazon SageMaker and want a standardized way to integrate their training scripts with the SageMaker platform.

Highlights

  • Easy Integration: Simply install the library via pip and define your entry point script in the Dockerfile.
  • Hyperparameter Handling: Automatically passes hyperparameters as script arguments to the training entry point.
  • Environment Access: Provides a read-only snapshot of the container environment, including paths to input data channels and the model directory.
  • Execution Management: Includes a utility to execute the entry point and signal success or failure to the SageMaker platform via specific output files.

Related

  • Project
  • Project
  • Project
  • Project