Courseiva
ML Ops →mediumMultiple Choice

Databricks-ML-Pro ML Ops Practice Question

Your team uses MLflow Projects to package training code. A colleague runs the project on a Databricks cluster and it fails with a dependency conflict because the cluster has an older version of a library than the project's conda environment specifies. What is the most reliable way to ensure the project uses its declared dependencies without modifying the shared cluster?

⚠ Common exam trap

The trap here is assuming that any MLflow CLI flag or notebook-level pip install provides the same dependency isolation as the project's conda environment.

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

✓

Use the MLflow Projects CLI with the --conda flag or run via mlflow run, which creates an isolated conda environment from the project's conda.yaml.

MLflow Projects are designed to encapsulate dependencies in a conda.yaml, and running them with conda enabled creates an isolated environment that installs the specified versions. This avoids conflicts with shared cluster libraries and preserves reproducibility. Flags controlling experiment names, global installs, or notebook conversions do not provide the same isolation or reliability.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Run the MLflow project with the --experiment-name flag to isolate dependencies per experiment.

    Why it's wrong here

    The --experiment-name flag only controls where runs are logged; it has no effect on dependency resolution or environment isolation. It will not install or override libraries on the cluster. This option confuses experiment tracking configuration with environment management.

  • ✓

    Use the MLflow Projects CLI with the --conda flag or run via mlflow run, which creates an isolated conda environment from the project's conda.yaml.

    Why this is correct

    MLflow Projects supports conda environments defined in conda.yaml. Running with mlflow run and conda enabled creates an isolated environment that installs the declared dependencies, avoiding conflicts with the cluster's preinstalled libraries. This is the intended mechanism for reproducible dependency management.

  • ✗

    Install the required library version globally on the cluster and restart it before running the project.

    Why it's wrong here

    Modifying the shared cluster's global libraries affects all users and can break other workloads. It also does not guarantee isolation for the project and may still conflict with other dependencies. The scenario explicitly asks to avoid modifying the shared cluster.

  • ✗

    Convert the project to a Databricks notebook and use %pip install at the top of the notebook.

    Why it's wrong here

    Converting to a notebook abandons the MLflow Projects packaging and reproducibility benefits. While %pip install can install libraries in a notebook session, it does not recreate the full conda environment and may still conflict with cluster libraries. It is not the most reliable way to honor the project's declared dependencies.

About these practice questions

This Databricks-ML-Pro question is part of Courseiva's 300-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.