Courseiva
ML Workflows →mediumMultiple Choice

Databricks-ML-Assoc ML Workflows Practice Question

An ML engineer is developing a model in a Databricks notebook. They want to log the model and its dependencies to MLflow, ensuring that the exact library versions used during training are captured. They also need to register the model in the Databricks Model Registry. Which approach should they use?

⚠ Common exam trap

The trap here is assuming that any artifact logging method will automatically capture dependencies and register the model, when only model logging functions with registered_model_name provide that integrated behavior.

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

✓

Log the model using mlflow.sklearn.log_model with the registered_model_name parameter set.

Logging a model with a framework-specific MLflow flavor function such as mlflow.sklearn.log_model captures the model, its dependencies, and environment details, ensuring reproducibility. Setting registered_model_name registers the model in the Databricks Model Registry in the same operation, streamlining the workflow. Other methods either lack dependency capture or require additional manual steps.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Save the model using joblib.dump and then use MLflow to log the file as an artifact.

    Why it's wrong here

    joblib.dump saves the model locally but does not integrate with MLflow's tracking or registry. Logging the file as an artifact does not create a model version with a signature or capture dependencies. This method bypasses MLflow's model management capabilities, making reproducibility and deployment difficult.

  • ✗

    Use mlflow.pyfunc.log_model to log the model, then call mlflow.register_model to register it.

    Why it's wrong here

    While mlflow.pyfunc.log_model can log models with custom inference logic, it does not automatically capture dependencies unless explicitly specified. Calling mlflow.register_model separately works but adds an extra step. The scenario does not require custom pyfunc; using the framework-specific log_model with registered_model_name is simpler and ensures dependencies are captured.

  • ✗

    Log the model using mlflow.log_artifact and then manually register it via the MLflow UI.

    Why it's wrong here

    mlflow.log_artifact logs arbitrary files but does not capture the model in a format that MLflow can load for inference, nor does it automatically record dependencies. Manually registering via the UI is error-prone and does not ensure that library versions are captured. This approach lacks the reproducibility and automation provided by dedicated model logging functions.

  • ✓

    Log the model using mlflow.sklearn.log_model with the registered_model_name parameter set.

    Why this is correct

    Using mlflow.sklearn.log_model with registered_model_name logs the model and automatically registers it in the Databricks Model Registry. MLflow captures the model's dependencies, including library versions, via the conda environment and requirements.txt, ensuring reproducibility. This approach satisfies both logging and registration in one step, making it the most efficient and correct method.

About these practice questions

One of 319 original Databricks-ML-Assoc 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-Assoc 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-Assoc exam.