Courseiva
Model Development →hardMultiple Choice

Databricks-ML-Pro Model Development Practice Question

A machine learning engineer is using MLflow to track experiments on Databricks. They want to compare multiple runs of a scikit-learn model and automatically log the best model to the Model Registry. They use `mlflow.sklearn.autolog()` and then call `mlflow.sklearn.log_model` with `registered_model_name`. However, they notice that the model version in the registry does not include the signature or input example. Which action should they take to ensure the signature and input example are logged?

⚠ Common exam trap

The trap here is believing that autolog captures all metadata including signature, when in fact signature and input example must be explicitly provided for scikit-learn models.

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

✓

Pass a `signature` and `input_example` to `mlflow.sklearn.log_model` explicitly, because autolog does not capture them for scikit-learn models.

Autolog for scikit-learn logs parameters, metrics, and the model artifact but does not automatically capture a model signature or input example. To include these, the engineer must explicitly pass `signature` and `input_example` to `mlflow.sklearn.log_model`. This is essential for model serving and validation, as the signature defines the expected input schema and the input example provides a sample for testing.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Register the model without a signature, then manually update the model version metadata in the Model Registry UI to add the signature and input example.

    Why it's wrong here

    The Model Registry UI does not allow editing the signature or input example of a logged model version. These are artifacts stored with the model and must be provided at logging time. Manually editing metadata is not supported and would not update the model's schema information used for validation and serving.

  • ✗

    Set the environment variable `MLFLOW_LOG_MODEL_SIGNATURE` to `true` before training, which enables automatic signature logging for all models.

    Why it's wrong here

    There is no environment variable named `MLFLOW_LOG_MODEL_SIGNATURE` in MLflow. Signature logging is controlled via function arguments or autolog configuration for certain frameworks, but not through that variable. For scikit-learn, autolog does not log signatures by default, and setting a non-existent variable would have no effect.

  • ✗

    Use `mlflow.models.infer_signature` on the training data and then call `mlflow.sklearn.log_model` with the inferred signature, but input example cannot be logged for scikit-learn.

    Why it's wrong here

    `infer_signature` can indeed generate a signature from training data, but input examples can also be logged for scikit-learn models by passing `input_example` to `log_model`. The statement that input example cannot be logged is false. Both signature and input example are supported and should be provided explicitly.

  • ✓

    Pass a `signature` and `input_example` to `mlflow.sklearn.log_model` explicitly, because autolog does not capture them for scikit-learn models.

    Why this is correct

    While `mlflow.sklearn.autolog()` logs parameters, metrics, and the model, it does not automatically infer and log a model signature or input example for scikit-learn models. To include these, the data scientist must explicitly pass `signature` and `input_example` arguments to `log_model`. This ensures the registered model version has the necessary metadata for schema validation and deployment.

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 →

How Courseiva writes practice questions · Editorial policy

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.