Databricks Machine Learning Professional Question 67
Select 3A data science team is building a machine learning model and wants to deploy it as a REST API to serve predictions. They are considering using the pyfunc MLflow flavor for this purpose. Which of the following are advantages of using the pyfunc MLflow flavor?
- A
It provides a standardized interface for loading and serving models written in different machine learning frameworks.
- B
It requires the model to be rewritten in Python if it was developed in another programming language.
- C
It allows models to be deployed using MLflow's built-in tools, such as the MLflow Model Serving feature.
- D
It ensures that deployed models automatically track all experiment metadata during inference.
- E
It supports integration with custom Python code for pre-processing and post-processing.
Show answer and explanation
Correct answers: A, C, E
Explanation
The pyfunc MLflow flavor is advantageous because it provides a standardized, framework-agnostic interface for serving models, supports deployment through MLflow's built-in tools, and allows for the integration of custom Python code for pre- and post-processing. These features make it highly versatile for deploying machine learning models in production.
- A. Correct.
Correct: The pyfunc MLflow flavor is designed to provide a standardized interface for loading and serving models regardless of the framework in which they were built.
- B. Incorrect.
Incorrect: The pyfunc MLflow flavor does not require models to be rewritten in Python; it can package models built in various frameworks as long as the necessary dependencies are included.
- C. Correct.
Correct: MLflow provides built-in tools like MLflow Model Serving to deploy pyfunc models seamlessly.
- D. Incorrect.
Incorrect: While MLflow tracks experiment metadata during training, the pyfunc flavor does not automatically track metadata during inference.
- E. Correct.
Correct: The pyfunc flavor allows integration with custom Python code for pre- and post-processing, enabling flexibility in model deployment scenarios.