Overview
- Amazon SageMaker AI is the AWS framework for building ML models E2E (it covers the whole ML lifecycle)
- Lots of functionality overlap with e.g. MLFlow
- ‼️ The AWS AIP cert expects you to be familiar with SageMaker AI and its subproducts (e.g. SageMaker Canvas, SageMaker Jumpstart…), but it is NOT the main focus of this exam!
- ❗ In AIP, SageMaker AI can often appear as a distractor among possible answers to a scenario
- While powerful and very customizable, building and training models in SageMaker AI requires time, effort, and operational cost when compared to using off-the-shelf models in Bedrock
- Choosing SageMaker AI over more managed solutions usually feels like reinventing the wheel
- There are of course exceptions when SageMaker AI is the correct choice over alternatives, but they are exceptions
- These notes assume you have already taken AIF and MLA, hence we won't dive deep into SageMaker AI, we will only point out isolated facts that may not have been covered in the previous certs
SageMaker AI additional facts for AIP
Optimizing FM Deployments
Ref: https://www.udemy.com/course/ultimate-aws-certified-generative-ai-developer-professional/learn/lecture/53684513
- Can train/tune a model in SageMaker AI, then deploy it in Bedrock
- Must use Bedrock Custom Model Import
- 👍 Serverless inference
- With SageMaker AI Inference Components, each model gets its own scaling policy
- DJL (Deep Java Library)
- For creating DL containers in Java
- Created by Amazon
- Several ways to perform model compression:
- Quantization (of model weights)
- Pruning
- Knowledge distillation (smaller model trained from larger model)
SageMaker ML Lineage Tracking
Ref: https://www.udemy.com/course/ultimate-aws-certified-generative-ai-developer-professional/learn/lecture/53684585 and https://www.udemy.com/course/ultimate-aws-certified-generative-ai-developer-professional/learn/lecture/53684589
- 🔧 Tracking of ML workflow for auditing & compliance
- Creates & stores ML workflow (MLOps)
- Keeps running history of models
- Use LineageQuery API from Python (part of SageMaker SDK for Python) for querying lineage entities
- e.g. find all models/endpoints that use a given artifact
- Cross-account lineage tracking via AWS RAM (Resource Access Manager)
- Use SageMaker AddAssociation API + required IAM roles & permissions