-
๐ EC2 Instances: Full User Control (Least Pre-built Content)
With EC2, you have complete control over the entire setup. You need to:- Start an EC2 instance (e.g., GPU-enabled for training deep learning models).
- Install dependencies manually (e.g., Python, ML libraries like PyTorch or TensorFlow).
- Copy or configure the training script, and handle the training data management (downloading data from S3 or other sources).
- Run the training process manually using your own code.
- Manage all aspects of the environment, scaling, and resource management.
Use Case: This is suited for advanced users who need fine-grained control over their infrastructure and model training environment.
-
๐ SageMaker Studio or Notebook Instances: Medium Level (Some Pre-built Content)
SageMaker Studio or Notebook Instances provide a more managed environment for model training:- Pre-installed machine learning frameworks and data science packages (e.g., TensorFlow, PyTorch, Scikit-learn) are available, so you donโt need to install them manually.
- You still need to choose the instance type (CPU/GPU) and the number of instances for your training.
- Write your training script, and arrange for input data from S3 or other sources.
- Run the training job with SageMaker managing infrastructure provisioning, while you configure the runtime.
- Youโll work within a Jupyter IDE, which provides an interactive experience and allows you to save step-by-step outputs in a notebook, aiding in experimentation and tracking.
Use Case: This is ideal for users who want a balance between control and convenience, using pre-installed tools in a familiar notebook environment.
-
๐ SageMaker Pre-built Algorithm Containers (Most Pre-built Content)
For SageMakerโs pre-built algorithm containers (available in AWS ECR):- The algorithm (e.g., Linear Learner, XGBoost, etc.) comes pre-packaged within a Docker container.
- You only need to arrange the input data (typically in S3) and the location to save the model.
- In some cases, there are pre-trained model images available to fine-tune or use directly.
- You still choose the instance type and the number of instances, but SageMaker manages the rest of the infrastructure and runs the pre-built algorithm for you.
Use Case: This is perfect for users who want to train models quickly without dealing with the complexity of infrastructure management or custom coding. Itโs ideal for common algorithms and fast experimentation.
-
๐ AWS SageMaker JumpStart: No-Code/Low-Code Option
AWS JumpStart offers a no-code/low-code solution for getting started with machine learning:- JumpStart provides pre-built solutions and pre-trained models that can be deployed with minimal or no code.
- It includes popular use cases (e.g., object detection, sentiment analysis) and can be used to fine-tune models on your own data.
- JumpStart simplifies the entire process from model selection to deployment with a user-friendly interface.
Use Case: This is perfect for users or businesses looking to quickly implement machine learning solutions without deep expertise in coding or managing infrastructure.
These levels provide a range of options from complete control to minimal involvement, letting you choose the approach that best fits your needs.
โ 20241219 AWS Machine Learning - Training with EC2 (demo video)
https://www.youtube.com/watch?v=yBq0Fn7Z6RU
โ AWS SageMaker SDK PyTorch ResNet50 (example project)
https://github.com/nov05/udacity-CD0387-deep-learning-topics-within-computer-vision-nlp-project-starter
โ โข Training job with debugging and profiling enabled notebook
โ โข Training script
โ โข Inference script
โ AWS ECR Linear learner container (example notebook)
https://github.com/nov05/udacity-aws-mle-nano-course5/blob/main/exercise_3.5/multiinstancestarterfile.ipynb
๐ Docker containers for training and deploying models
https://docs.aws.amazon.com/sagemaker/latest/dg/docker-containers.html
๐ How to find AWS SageMaker pre-built container registry paths
AWS > Documentation > Amazon SageMaker > ECR Paths
Docker Registry Paths and Example Code
Click on US East (N. Virginia)
Docker Registry Paths and Example Code for US East (N. Virginia) (us-east-1)
Click on Linear Learner (algorithm)
๐ Get container registry path via SageMaker SDK example Python code