Databricks-ML-Pro Model Development Practice Question
A data scientist is using MLflow to log a model trained with scikit-learn. They want to ensure that the model can be loaded later for batch inference using `mlflow.pyfunc.load_model`. Which condition must be met for the model to be loadable as a PyFunc model?
⚠ Common exam trap
The trap here is thinking that Model Registry registration is required to load a model as PyFunc, when actually the PyFunc flavor is automatically added during logging.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The model must be logged with `mlflow.sklearn.log_model`, which automatically adds the `python_function` flavor.
To load a scikit-learn model as a PyFunc model, it must be logged with `mlflow.sklearn.log_model`, which automatically includes the `python_function` flavor. This flavor provides a consistent inference API across different model types. Registration is not required, nor is a signature or ONNX format. The key is that the logged model contains the PyFunc flavor, which `mlflow.pyfunc.load_model` uses to load and serve the model.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The model must be saved in the ONNX format to be compatible with PyFunc.
Why it's wrong here
ONNX is a separate model format and is not required for PyFunc. MLflow's PyFunc flavor supports many native formats, including scikit-learn, by wrapping them. Saving in ONNX would be an alternative for interoperability, but it is not a prerequisite for loading a scikit-learn model as PyFunc.
- ✗
The model must be logged with a signature that defines the input schema; otherwise, PyFunc loading will fail.
Why it's wrong here
While a signature is recommended for validation, it is not required to load a model as PyFunc. MLflow can load models without a signature, though serving tools may enforce schema checks. The absence of a signature does not prevent `mlflow.pyfunc.load_model` from working; it only means input validation is not enforced.
- ✓
The model must be logged with `mlflow.sklearn.log_model`, which automatically adds the `python_function` flavor.
Why this is correct
When logging a scikit-learn model with `mlflow.sklearn.log_model`, MLflow automatically includes the `python_function` flavor. This makes the model loadable via `mlflow.pyfunc.load_model`, which provides a generic interface for inference. The Python function flavor wraps the native model, allowing it to be used in environments where the original library may not be available or for consistent serving.
- ✗
The model must be registered in the MLflow Model Registry before it can be loaded as a PyFunc model.
Why it's wrong here
Registration in the Model Registry is not required to load a model as a PyFunc. Any logged model with the `python_function` flavor can be loaded directly from its run artifact URI. Registration is for lifecycle management and versioning, but loading as PyFunc only requires the appropriate flavor to be present in the logged model.
About these practice questions
One of 300 original Databricks-ML-Pro practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-ML-Pro practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-ML-Pro exam.