mle-infrastructure / mle-toolbox

Lightweight Tool to Manage Distributed ML Experiments 🛠
https://mle-infrastructure.github.io/mle_toolbox/toolbox/
MIT License
3 stars 1 forks source link

Population-Based Training for HyperOpt #20

Closed RobertTLange closed 2 years ago

RobertTLange commented 3 years ago

Once we have addressed the async scheduling of jobs #8 I would love to implement population-based training for hyperparameter optimization (Jaderberg et al., 2017 - https://arxiv.org/abs/1711.09846). It appears to be the most efficient parallel + non-sequential tuning algorithm even for small population size (ca. 15 runs) and across multiple domains.

The general API looks as follows: Step - Eval - Ready? - If yes: Exploit? - If params changed: Explore. The steps are performed asynchronous and in parallel. More details on each step:

Jaderberg algo

Important detail: PBT is not only a hyperparameter optimizer but also a model selection mechanism since we copy also weight parameters over!

The different mutations/steps/exploitation ranking themself don't appear to be hard to implement. But we do need a smooth logging setup as well as a standardized way of reloading network checkpoints. Probably have to differentiate between torch, tf, jax network checkpoint reloading.

RobertTLange commented 3 years ago

This will require a different pipeline compared to the standard base_hyperopt formulation. We will have to use a pretty rigid training script with implements the step, evaluate functions. Below you find a little mental dump of how this could work with the following setup: IMG_E69D5C9ADB5E-1