EasyDeepLearn

How does Hydra help ML config management?

medium

Answer

  • Facebook's config framework.
  • Compose configs from YAML files: defaults list + overrides.
  • Command-line overrides: python  trainpy  optimizer=adam  lr=0.001\mathrm{python}\;\mathrm{train}\mathrm{py}\;\mathrm{optimizer} = \mathrm{adam}\;\mathrm{lr} = 0.001.
  • Multi-run: python  trainpy  m  lr=0.001,0.01,0.1\mathrm{python}\;\mathrm{train}\mathrm{py}\; - m\;\mathrm{lr} = 0.001, 0.01, 0.1 runs sweep.
  • Groups: swap whole subsystems (model=resnet50  vs  vit\mathrm{model} = \mathrm{resnet50}\;\mathrm{vs}\;\mathrm{vit}).
  • Structured configs with dataclasses for type safety.
  • Automatic run dir per experiment.
  • Combined with Optuna sweeper for HPO.
  • Standard for research + production.
Check yourself — multiple choice
  • Random
  • Facebook config framework: compose YAML + CLI overrides + multi-run sweep + groups swap subsystems (model=resnet50 vs vit) + structured dataclass + auto run dir + Optuna sweeper HPO
  • Same as argparse
  • Not real

Hydra: compose + override + multi-run + groups + structured.

#reproducibility#pipeline

Practise MLOps & Data Quality

215 interview questions in this topic.

Related questions