Find and copy the run ID of the run that created the model
Find and copy a run ID associated with an ElasticNet training run from the MLflow tutorial part 1: training and logging notebook. The run ID appears on the run details page; it is a 32-character alphanumeric string shown after the label "Run".
To navigate to the run details page for the MLflow tutorial part 1: training and logging notebook, open that notebook and click Experiment in the upper right corner. The Experiments sidebar displays. Do one of the following:
In the Experiments sidebar, click the icon at the far right of the date and time of the run. The run details page appears in a new tab.
Click the square icon with the arrow to the right of Experiment Runs. The Experiment page displays in a new tab. This page lists all of the runs associated with this notebook. To display the run details page for a particular run, click the link in the Start Time column for that run.
For more information, see "View notebook experiment" (AWS|Azure|GCP).
Create a PySpark UDF and use it for batch inference
In this section, you use the MLflow API to create a PySpark UDF from the model you saved to MLflow. For more information, see Export a python_function model as an Apache Spark UDF.
Saving the model as a PySpark UDF allows you to run the model to make predictions on a Spark DataFrame.
MLflow tutorial: inference
This notebook shows how to load a model previously logged to MLflow and use it to make predictions on data in different formats. The notebook includes two examples of applying the model:
Requirements
mlflow
in the Package field.Prerequsite