Skill 2.2.2

Configure SageMaker AI script mode with supported frameworks for simplicity and performance

Key Concepts

Create a framework estimator (for example, PyTorch, SKLearn, TensorFlow, HuggingFace) with entry_point, source_dir (with a requirements.txt), framework and Python versions, instance type and hyperparameters. SageMaker AI passes hyperparameters as command-line arguments and paths as environment variables such as SM_CHANNEL_TRAIN and SM_MODEL_DIR.

Script mode avoids building custom containers, keeps framework optimisations and supports distributed training libraries. Save the model to SM_MODEL_DIR so it is uploaded to S3 as model.tar.gz.