Courseiva
Model Development →mediumMultiple Choice

Databricks-ML-Pro Model Development Practice Question

When logging a model that requires custom libraries (e.g., a specific version of a non-standard package), how do you ensure the environment is reproducible on the serving endpoint?

⚠ Common exam trap

Candidates rely solely on the default environment captured by the notebook kernel, forgetting that serving endpoints require explicit dependency files like conda.yaml.

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

✓

Provide an explicit conda.yaml or requirements file during the log_model call.

Including a conda.yaml file or an MLflow requirements file ensures that the exact environment dependencies are captured alongside the model. When the model is deployed to a serving endpoint, Databricks uses this metadata to recreate the identical software stack. This prevents the 'it works on my machine' problem, ensuring that inference logic is executed in a consistent, predictable environment across all deployment stages.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Install the dependencies manually on the serving cluster after deployment.

    Why it's wrong here

    Manual dependency installation is not scalable and violates the principles of automated, reproducible deployments. It introduces human error, results in drift between different clusters, and makes it impossible to guarantee that the production environment exactly matches the training environment, leading to unstable or failing inference code at runtime.

  • ✗

    Include the library binaries directly in the model artifact folder.

    Why it's wrong here

    Binary files are architecture-dependent and can be extremely large, which bloats the model artifact unnecessarily. This approach complicates deployment and can lead to runtime crashes if the binaries are incompatible with the host environment's OS. Standard practice is to manage dependencies via configuration files like requirements.txt or conda.yaml.

  • ✓

    Provide an explicit conda.yaml or requirements file during the log_model call.

    Why this is correct

    Providing an explicit environment file during the log_model call ensures that MLflow captures the exact dependency requirements for the model. This allows the serving infrastructure to build a matching environment automatically, guaranteeing that the model runs in a configuration identical to the one used during training and validation.

  • ✗

    Rely on the serving cluster's default environment libraries.

    Why it's wrong here

    Default environments rarely include the specific versions or non-standard packages required for custom model inference. Relying on defaults assumes that the serving environment will always match the training one, which is an unsafe assumption that inevitably leads to import errors and failing model endpoints in a professional setting.

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.