MLflow integration guide#
With the Neptune-MLflow integration, you can export run metadata from MLflow to Neptune.
In development
We're working on the plugin component of the integration, which lets you log metadata to Neptune and MLflow simultaneously.
See example in Neptune  Code examples 
Before you start#
- Sign up at neptune.ai/register.
- Create a project for storing your metadata.
- Have MLflow installed.
Installing the integration#
Exporting MLflow runs to Neptune#
neptune-notebooks incompatibility
Currently, the CLI component of the integration does not work together with the Neptune-Jupyter extension (neptune-notebooks).
Until a fix is released, if you have neptune-notebooks installed, you must uninstall it to be able to use the neptune mlflow
command.
You can export your logged metadata from MLflow to Neptune with the neptune mlflow
CLI command:
If you haven't set your credentials as environment variables, you can also pass them as arguments:
How do I save my credentials as environment variables?
Set your Neptune API token and full project name to the NEPTUNE_API_TOKEN
and NEPTUNE_PROJECT
environment variables, respectively.
For example:
- On Windows, the command is
set
instead ofexport
.
- On Windows, the command is
set
instead ofexport
.
Finding your credentials:
- API token: In the bottom-left corner of the Neptune app, expand your user menu and select Get your API token.
- Project: Your full project name has the form
workspace-name/project-name
. To copy the name, click the menu in the top-right corner and select Edit project details.
If you're working in Colab, you can set your credentials with the os and getpass libraries:
You'll find the imported metadata in All metadata, in the following structure:
artifacts
|-- <logged artifacts>
experiment
|-- creation_time
|-- experiment_id
|-- last_update_time
|-- name
run_data
|-- metrics
|-- params
|-- tags
run_info
|-- artifact_uri
|-- end_time
|-- experiment_id
|-- lifecycle_stage
|-- run_id
|-- run_name
|-- run_uuid
|-- start_time
|-- status
|-- user_id
Note for large projects
When exporting runs from MLflow, Neptune checks whether each MLflow run already exists in the Neptune project.
Due to a technical limitation, a maximum of 10 000 Neptune runs can be checked for each export. Therefore, if your Neptune project contains more than 10 000 runs, it is possible that some MLflow runs will be copied over to Neptune even if they already exist in the Neptune project.
Related
- What you can log and display
- Neptune–MLflow API reference
- neptune-mlflow repo on GitHub
- MLflow repo on GitHub