IniziaInizia 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.

Questo esercizio fa parte del corso

Introduction to MLflow

Visualizza il corso

Istruzioni dell'esercizio

  • 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.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

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
  	____={
        '____': ____, 
        '____': ____
    }
)
Modifica ed esegui il codice