For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.us.ovhcloud.com/en/public-cloud/ai-machine-learning/ai-notebooks-mlflow.md.
  • English

AI Notebooks - Tutorial - Track your ML models with MLflow inside notebooks

View as Markdown

Learn how to integrate MLflow inside AI Notebooks to track and compare your Machine Learning models.

MLflow is an open-source platform for Machine Learning workflow management. You can use this tool for ML model tracking and versioning but also storage and deployment.

  • How to use MLflow inside AI Notebooks?

PaaS AI m lflow - step 1

For this purpose, we will compare image classification models: EfficientNets.

Info

EfficientNet models are pre-trained on the ImageNet dataset.

In this context, several EfficientNet models will be trained on the same dataset: (stanford_dogs). The Stanford Dogs dataset contains images of 120 breeds of dogs from around the world.

The different models will be tracked and compared based on their performance thanks to MLflow:

  • EfficientNet-b0
  • EfficientNet-b1
  • EfficientNet-b2
  • EfficientNet-b3
  • EfficientNet-b4
  • EfficientNet-b5
  • EfficientNet-b6
  • EfficientNet-b7

 

Requirements

 

Instructions

You can launch the notebook from the OVHcloud Control Panel or via the ovhai CLI.

 

Launching a Jupyter notebook with "TensorFlow" via UI (Control Panel)

To launch your notebook from the OVHcloud Control Panel, refer to the following steps.

 

Code editor

Choose the Jupyterlab code editor.

 

Framework

In this tutorial, the TensorFlow framework is used. You can choose the 2.12 version: tf2.12-py311-cudaDevel11.8.

 

Resources

Using GPUs is recommended to train the EfficientNet models.

Info

Here, using 1 GPU is sufficient.

 

Launching a Jupyter notebook with "TensorFlow" via CLI

If you have not used our CLI yet, follow this guide to install it.

To launch your notebook with the OVHcloud AI CLI, choose the jupyterlab editor and the tensorflow framework.

To access the different versions of tensorflow available, run the following command:

ovhai capabilities framework get tensorflow -o yaml
Info

Here, you can use the version 2.12 of TensorFlow (tf2.12-py311-cudaDevel11.8).

You will also need to choose the number of GPUs to use in your notebook, using <nb-gpus>.

To launch your notebook, run the following command:

ovhai notebook run tensorflow jupyterlab \
        --name <notebook-name> \
        --framework-version tf2.12-py311-cudaDevel11.8 \
        --gpu <nb-gpus>

You can then reach your notebook’s URL once the notebook is running.

 

Accessing the notebooks

Once our AI examples repository has been cloned in your environment, find the fine-tuning notebook tutorial by following this path: ai-training-examples > notebooks > go-further > mlflow > notebook-tutorial-mlflow-integration.ipynb.

A preview of this notebook can be found on GitHub here.

 

Go further

Browse all the AI & Machine Learning guides.

Browse the rest of the OVHcloud US documentation for guides on our other products and services.

Learn more about AI & Machine Learning on the OVHcloud US website.

If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.