MLflow utilities for NNabla.
- nnabla
- mlflow
$ pip install git+https://github.com/takuseno/nnabla-mlflow
Calling nnabla_mlflow.autolog
monkey-pathches NNabla's monitors to automatically save data as MLflow metrics.
import mlflow
import nnabla_mlflow
from nnabla.monitor import MonitorSeries
nnabla_mlflow.autolog() # monkey-patch Monitor classes
metric_monitor = MonitorSeries('metric', interval=1)
with mlflow.start_run():
metric_monitor.add(1, 2) # mlflow.log_metric('metric', 1, step=2) is internally called
Currently, the following monitors are supported.
- MonitorSeries
- MonitorTimeElapsed
- MonitorImage
- MonitorImageTile
To automatically save parameters as an artifact, pass with_save_parameters=True
.
nnabla_mlflow.autolog(with_save_parameters=True)
- support MonitorImage and MonitorImageTile
- support
log_model
andsave_model
just likemlflow.tensorflow
andmlflow.pytorch
- support NNabla's Trainer