Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Introduction to MLflow

Cursus bekijken

Oefeninstructies

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

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

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
  	____={
        '____': ____, 
        '____': ____
    }
)
Code bewerken en uitvoeren