MulaiMulai sekarang secara gratis

MLflow projects module

MLflow Projects can also be run programmatically with Python using the mlflow projects module.

In this exercise you will run an MLflow Project using the projects module to train a model for your "Insurance" Project. You will define the entry point from your MLproject file to execute the training code. You will also define the experiment name of "Insurance" so that the model is properly logged to the correct experiment in MLflow Tracking.

You may read the contents of the MLproject file by executing print(MLproject) in the IPython shell.

Latihan ini adalah bagian dari kursus

Introduction to MLflow

Lihat Kursus

Petunjuk latihan

  • Call the run() function from the mlflow projects module.
  • Set the URI for the MLproject file to the current working directory.
  • Set the entry point to "main" according to the MLproject file.
  • Set the experiment name to "Insurance".

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

import mlflow

# Set the run function from the MLflow Projects module
____.____.____(
  	# Set the URI as the current working directory
    ____='____',
    # Set the entry point to main
    ____='____',
    # Set the experiment name as Insurance
    ____='____',
    env_manager="local",
    synchronous=True,
)
Edit dan Jalankan Kode