MulaiMulai sekarang secara gratis

Adding parameters to project run

Parameters can be used to configure the behavior of a model by being passed as variables to the model during training. This allows you to train the model several times using different parameters without modifying the training code itself.

In this exercise, you will use the mlflow projects module to run a Project used to train a Logistic Regression model for your Insurance experiment. You will create code using the mlflow projects module that will run your project. You will then add parameters that will be passed as hyperparameters to the model during training.

Latihan ini adalah bagian dari kursus

Introduction to MLflow

Lihat Kursus

Petunjuk latihan

  • Call mlflow.projects.run() function from the mlflow projects module.
  • Create the parameters dictionary and set n_jobs_param to 2 and fit_intercept_param to False.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

import mlflow

# Set the run function from the MLflow Projects module
____.____.____(
    uri='./',
    entry_point='main',
    experiment_name='Insurance',
  	env_manager='local',
  	# Set parameters for n_jobs and fit_intercept
  	____={
        '____': ____, 
        '____': ____
    }
)
Edit dan Jalankan Kode