QuestionQ88

VerifiedModel Deployment

A machine learning engineer is using the following code block to scale inference for a single-node model on a Spark DataFrame with one million records:

Question Image

Assuming the default Spark configuration is in place, which of the following is a benefit of using an Iterator?

Explanation

An iterator pandas UDF can initialize expensive state once and reuse it for the full iterator of internally processed batches. Loading the MLflow model before iterating over features therefore avoids loading the model again for every inference batch on the executor/worker handling that iterator.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!