Exercise

Creating a multi-step workflow: Model Engineering

The MLflow Projects module can be used as a way to run a multi-step workflow. All steps can be coordinated though a single Python program that passes results from previous steps to the following.

In this exercise, you will begin creating a multi-step workflow to manage the Model Engineering and Model Evaluation steps of the ML lifecycle. You will use the run() method from the MLflow Projects module for the model_engineering entry point and pass parameters used as hyperparameters for model training. You will also capture the output of the run_id and set it to a variable so that it can be passed to the model_evaluation step of the workflow as a parameter.

The MLproject created in the previous step is available in the IPython Shell using print(MLproject). The MLflow module is imported.

Instructions

100 XP
  • Assign the run() method from MLflow Projects module to a variable called model_engineering.
  • Set the entry point argument to "model_engineering".
  • Set parameters for training the model. "n_jobs" to 2 and "fit_intercept" to False.
  • Set the run_id attribute of model_engineering to a variable called model_engineering_run_id.