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.
Questo esercizio fa parte del corso
Introduction to MLflow
Istruzioni dell'esercizio
- Call the
run()function from themlflow projectsmodule. - Set the URI for the
MLprojectfile to the current working directory. - Set the entry point to
"main"according to theMLprojectfile. - Set the experiment name to
"Insurance".
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
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,
)