Courseiva
Model Development →hardMultiple Select

Databricks-ML-Assoc Model Development Practice Question

A machine learning engineer is using MLflow to log a model trained with a custom Python function. They want to ensure that the model can be loaded and served in a different environment. Which two of the following must be included when logging the model to ensure portability? (Choose two.)

⚠ Common exam trap

The trap here is assuming that the model signature or run ID is required for loading a model, when in fact the code and dependencies are the critical components for portability.

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 Python function code that defines the model's prediction logic.

The correct answers are the Python function code and the environment dependencies. When logging a custom Python function model, MLflow must save the function code to reconstruct the model. Additionally, the environment dependencies (conda.yaml) ensure that the required libraries are available. Together, these enable the model to be loaded and served in a different environment. The model signature, training dataset, and run ID are not strictly required for portability.

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 training dataset used to fit the model.

    Why it's wrong here

    The training dataset is not required for loading or serving the model. Including it would bloat the model artifacts and is not necessary for portability. MLflow does not automatically log the training data as part of the model, and it is not needed for inference.

  • ✗

    The MLflow run ID for reference.

    Why it's wrong here

    The run ID is metadata that links the model to the run, but it is not needed for loading the model in a different environment. The model artifacts are self-contained. While the run ID can be useful for tracking, it does not affect the model's ability to be loaded or served.

  • ✓

    The Python function code that defines the model's prediction logic.

    Why this is correct

    When logging a custom Python function model, the function's code must be included so that the model can be reconstructed in a different environment. MLflow saves the function as part of the model artifacts, ensuring that the prediction logic is available. Without it, the model cannot be loaded or served.

  • ✓

    The environment dependencies, such as a conda.yaml or requirements.txt.

    Why this is correct

    Environment dependencies are crucial for portability. MLflow captures the current environment's dependencies in a conda.yaml file when logging a model. This ensures that the same libraries and versions are installed when loading the model elsewhere, preventing compatibility issues. Without it, the model may fail to load due to missing or mismatched packages.

  • ✗

    The model signature, specifying input and output schema.

    Why it's wrong here

    The model signature is important for documenting the expected input and output types, but it is not strictly required for loading the model. It helps with validation and serving, but a model can be loaded without it. Portability primarily depends on the code and dependencies.

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.