Tracking Notebook Running Instances


The MI Lab is integrated with MLflow and supports generating models in Mlflow after running the model training codes in JupyterLab. The generated models can be directly registered and deployed in the MI Hub.


For more information about Mlflow, see MLflow Documentation.

Prerequisites

You should have prepared the model training codes that can run in JupyterLab.

Running Model Training Codes

You can run and debug the model training codes in JupyterLab by following these steps:

  1. Open the list of notebook instances in MI Lab, and open the notebook instance.

  2. From the left File Browser, browse and open a model training code file, e.g. train.ipynb.

    _images/opening_training_code.png
  3. Click the Run the selected cells icon above the model training code file box to execute each line of the cell code in the model training code file to ensure that the codes run successfully.

    _images/running_training_code.png

Viewing Instance Running Results

After the model training code runs successfully, you can view the instance running results in MLflow by following these steps:

  1. Expand the Running Instance window on the right side of the page to view the list of instance running results. Once a line of codes runs successfully, its running results will be displayed in the list of running instances.

    _images/viewing_instance_results.png
  2. Click the Go to Lab icon in the upper right corner of the Running Instance window to view all successful and failed running results of the notebook instance in MLflow.

    _images/viewing_instance_list.png
  3. Click a successful running result, and view the newly created model in the Artifacts column. The Run ID displayed on the upper part of the page is the name of the model. When registering a model in the MI Hub, you can register a model by this name.

    _images/viewing_created_model.png
  4. Optional: In the Artifacts column, select the model folder and click Register Model to directly register the model in the MI Hub.

    _images/registering_created_model.png