Tools for Optuna, MLflow and the integration of both.
The main components are:
A wrapper to use Optuna and log to MLflow at the same time.
Class inheriting from
transformers.TrainerCallbackthat integrates with
to send the logs to MLflow and Optuna during model training.
An Optuna pruner
to use statistical significance (a t-test which serves as a heuristic) to stop
unpromising trials early, avoiding unnecessary repeated training during cross validation.
HPOflow is available at the Python Package Index (PyPI).
It can be installed with pip:
$ pip install hpoflow
Some additional dependencies might be necessary.
$ pip install mlflow GitPython
$ pip install mlflow GitPython transformers