2020-12-19 00:40:02 -08:00
.. _tune-mlflow:
2021-01-11 17:36:55 -08:00
Using MLflow with Tune
2020-12-19 00:40:02 -08:00
======================
2021-06-01 09:50:44 -07:00
.. warning :: If you are using these MLflow integrations with :ref: `ray-client` , it is recommended that you setup a remote Mlflow tracking server instead of one that is backed by the local filesystem.
2021-01-11 17:36:55 -08:00
`MLflow <https://mlflow.org/> `_ is an open source platform to manage the ML lifecycle, including experimentation,
2020-12-19 00:40:02 -08:00
reproducibility, deployment, and a central model registry. It currently offers four components, including
2021-01-11 17:36:55 -08:00
MLflow Tracking to record and query experiments, including code, data, config, and results.
2020-12-19 00:40:02 -08:00
.. image :: /images/mlflow.png
:height: 80px
:alt: MLflow
:align: center
:target: https://www.mlflow.org/
2021-01-11 17:36:55 -08:00
Ray Tune currently offers two lightweight integrations for MLflow Tracking.
One is the :ref: `MLflowLoggerCallback <tune-mlflow-logger>` , which automatically logs
metrics reported to Tune to the MLflow Tracking API.
2020-12-19 00:40:02 -08:00
The other one is the :ref: `@mlflow_mixin <tune-mlflow-mixin>` decorator, which can be
used with the function API. It automatically
2021-01-11 17:36:55 -08:00
initializes the MLflow API with Tune's training information and creates a run for each Tune trial.
2020-12-19 00:40:02 -08:00
Then within your training function, you can just use the
2021-01-11 17:36:55 -08:00
MLflow like you would normally do, e.g. using `` mlflow.log_metrics() `` or even `` mlflow.autolog() ``
2020-12-19 00:40:02 -08:00
to log to your training process.
Please :doc: `see here </tune/examples/mlflow_example>` for a full example on how you can use either the
2021-01-11 17:36:55 -08:00
MLflowLoggerCallback or the mlflow_mixin.
2020-12-19 00:40:02 -08:00
2021-01-11 17:36:55 -08:00
MLflow AutoLogging
2020-12-19 00:40:02 -08:00
------------------
You can also check out :doc: `here </tune/examples/mlflow_ptl_example>` for an example on how you can leverage MLflow
autologging, in this case with Pytorch Lightning
2021-01-11 17:36:55 -08:00
MLflow Logger API
2020-12-19 00:40:02 -08:00
-----------------
.. _tune-mlflow-logger:
2021-01-11 17:36:55 -08:00
.. autoclass :: ray.tune.integration.mlflow.MLflowLoggerCallback
2020-12-19 00:40:02 -08:00
:noindex:
2021-01-11 17:36:55 -08:00
MLflow Mixin API
2020-12-19 00:40:02 -08:00
----------------
.. _tune-mlflow-mixin:
.. autofunction :: ray.tune.integration.mlflow.mlflow_mixin
:noindex: