MLFlow Tips and Tricks #1
Using Databricks as an MLFlow repository from a local notebook
You can run MLFlow in a local notebook and use a Databricks workspace as your tracking server. Meaning, you will log to the Experiments tab in that workspace.
If you have the Databricks cli set up, you’re already configured. If not, start here: https://docs.databricks.com/aws/en/dev-tools/cli/tutorial
Run the following commands to set the tracking server to your DEFAULT Databricks CLI profile.
import mlflow
mlflow.login()
mlflow.set_tracking_uri("databricks")Change the argument to set_tracking_uri to use a different profile, e.g. “MY_PROFILE”:
mlflow.set_tracking_uri("databricks://MY_PROFILE")Now you can mlflow.log() from your local notebook!