Tools for Optuna, MLflow and the integration of both
HPOflow
Tools for Optuna, MLflow and the integration of both.
The main components are:
hpoflow.OptunaMLflow:A wrapper to use Optuna and log to MLflow at the same time.
hpoflow.OptunaMLflowCallback:Class inheriting from
transformers.TrainerCallbackthat integrates withOptunaMLflow
to send the logs to MLflow and Optuna during model training.hpoflow.SignificanceRepeatedTrainingPruner: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.
Installation
HPOflow is available at the Python Package Index (PyPI).
It can be installed with pip:
$ pip install hpoflow
Some additional dependencies might be necessary.
To use hpoflow.optuna_mlflow.OptunaMLflow:
$ pip install mlflow GitPython
To use hpoflow.optuna_transformers.OptunaMLflowCallback:
$ pip install mlflow GitPython transformers