概念 · AIF-C01 の発展
Experiment tracking: managed MLflow
Log parameters, metrics and artifacts for every training run, compare the runs, and repeat the best one.
このレッスンはまだ翻訳されていないため、英語で表示しています。
AI Practitionerで学んだこと
- SageMaker AI runs MLflow as a managed service to track experiments and compare training runs.
- Model Registry keeps a catalog of model versions with an approval status.
- 1Training code logs parameters and metrics.
- 2Artifacts such as the model go to your S3 bucket.
- 3Open the MLflow UI and compare runs.
- 4Register the best model.
Random seed
- A parameter
Data version
- S3 URI and version ID
Code
- Git commit as a tag
Container
- Image URI as a tag
Settings
- Every hyperparameter
| Pin down | Log it as |
|---|---|
| Random seed | A parameter |
| Data version | S3 URI and version ID |
| Code | Git commit as a tag |
| Container | Image URI as a tag |
| Settings | Every hyperparameter |
概要
Training is many runs, each with other data, settings or code. MLflow groups runs into an experiment. Each run logs parameters (settings), metrics (results, often per step) and artifacts (files such as the model and plots). You compare runs side by side in the MLflow UI and pick the best.
概要
Managed MLflow has three parts. Compute and the metadata store (run IDs, parameters, metrics) live in the SageMaker AI service account and are managed for you. The artifact store is an S3 bucket in your account, and the server needs an IAM role that can reach it. Your code installs MLflow and the sagemaker-mlflow plugin and calls set_tracking_uri with the server ARN. The plugin signs each call with your IAM credentials. MLflow API calls are IAM actions under the sagemaker-mlflow prefix, so one team can log and another only read.
概要
A tracking server comes in Small (the default, up to 25 users), Medium (up to 50) and Large (up to 100). Pick by users, data logged and call rate. It runs in a single Availability Zone. AWS also offers MLflow Apps, the newer managed form, which AWS prefers: they start faster and can be shared across accounts. Register the best model in the MLflow Model Registry and then in SageMaker Model Registry.
概要
The older SageMaker Experiments SDK works only in Studio Classic. AWS recommends MLflow, and old code must be rewritten with the MLflow SDK. A run is reproducible only if you log the random seed, data version, code commit, container image and every hyperparameter. An audit can then trace a deployed model to its run.
覚えること
- Run: one attempt. Experiment: a group of runs.
- Artifacts: your S3 bucket. Run metadata: the service account.
- Sizes: Small 25 users, Medium 50, Large 100.
試験では
- “Track and compare many training runs, then register the best model” points to managed MLflow on SageMaker AI.
- “Repeat a past training run exactly” points to logging seed, data version, code commit and container image with the run.
- “A tracking server for 40 concurrent users” points to the Medium size.
混同しやすいもの
このタスクの内容 · 2.3
- Experiment tracking: managed MLflow
- Amazon Bedrock evaluations
- Performance baselines and drift detection
- Shadow variants and A/B tests
- Explaining model outputs
- Debugging model convergence
- Evaluating traditional ML models
- NLP and text-generation metrics
- Human evaluation and human-in-the-loop
- LLM-as-a-judge and AI output assessment
- Evaluating RAG retrieval and answers