How to Run Tutorials

This brief guide will walk you through some options that you have to run these tutorials and have a Tracking Server that is available to log the results to (as well as offering options for the MLflow UI).

1. Download the Notebook

You can download the tutorial notebook by clicking on the “Download the Notebook” button at the top of each tutorial page.

2. Install MLflow

Install MLflow from PyPI by running the following command:

pip install mlflow

Tip

💡 We recommend creating a new virtual environment with tool like venv, uv, Poetry <https://python-poetry.org/docs/managing-environments/>, to isolate your ML experiment environment from other projects.

3. Set Up MLflow Tracking Server (Optional)

Direct Access Mode (no tracking server)

You can start a tutorial and log models, experiments without a tracking server set up. With this mode, your experiment data and artifacts are saved directly under your current directory.

While this mode is the easiest way to get started, it is not recommended for general use:

  • The experiment data is only visible on the UI when you run mlflow ui command from the same directory.

  • The experiment data cannot be accessible from other team members.

  • You may lose your experiment data if you accidentally delete the directory.

4. Connecting Notebook with Tracking Server

Note

If you are on Databricks, you can skip this section because a notebook is already connected to the tracking server and an MLflow experiment.

For other managed service (e.g., SageMaker, Nebius), please refer to the documentation provided by the service provider.

Once the tracking server is up, connect your notebook to the server by calling mlflow.set_tracking_uri("http://<your-mlflow-server>:<port]"). For example, if you are running the tracking server locally on port 5000, you would call:

mlflow.set_tracking_uri("http://localhost:5000")

This will ensure that all MLflow runs, experiments, traces, and artifacts are logged to the specified tracking server.

5. Ready to Run!

Now that you have set up your MLflow environment, you are ready to run the tutorials. Go back to the tutorial and enjoy the journey of learning MLflow!🚢