Уроки 6-9: autolog, hyperparam sweep, grid search, serving + MLproject, walkthrough

This commit is contained in:
2026-07-20 15:01:31 +03:00
parent 2c07fd63c0
commit d6a4b46db0
14 changed files with 1248 additions and 95 deletions
+33
View File
@@ -0,0 +1,33 @@
# MLflow Project — формат воспроизводимых экспериментов
# ========================================================
# Запуск:
# mlflow run . -P n_estimators=100 -P max_depth=8
# mlflow run . -P n_estimators=200 -P max_depth=12 --experiment-name digits_project
#
# MLflow автоматически:
# 1. Создаст изолированное окружение из conda.yaml (или requirements.txt)
# 2. Запустит entry point с указанными параметрами
# 3. Логирует всё в MLflow tracking
name: mlflow-practice
python_env: python_env.yaml
entry_points:
main:
parameters:
n_estimators: {type: int, default: 100}
max_depth: {type: int, default: 8}
command: "python src/train_simple.py --n-estimators {n_estimators} --max-depth {max_depth}"
gpu:
parameters:
epochs: {type: int, default: 10}
batch_size: {type: int, default: 256}
lr: {type: float, default: 0.001}
command: "python src/train_gpu.py --epochs {epochs} --batch-size {batch_size} --lr {lr}"
sweep:
parameters:
max_combos: {type: int, default: 20}
command: "python src/hyperparam_sweep.py --max-combos {max_combos}"