Databricks-ML-Assoc Model Deployment Practice Question
When deploying a model to a production endpoint, what is the best practice for handling dependencies?
⚠ Common exam trap
Candidates often assume that the environment is handled automatically by the cluster. They forget that production endpoints need explicit, version-controlled dependency manifests like requirements.txt to ensure consistency.
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
✓
Include a requirements.txt file in the model artifact
The best practice is to ensure all dependencies are explicitly defined in the MLflow model artifact. Using custom environment files or letting MLflow infer them ensures that the production container is built using the exact versions of packages used in training. This minimizes the risk of production-level errors caused by version mismatches, ensuring stability and reproducibility across the model lifecycle in the Databricks ecosystem.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Manually install dependencies in the cluster terminal
Why it's wrong here
Manual installation on a terminal is temporary and not persistent. It is a major operational risk as it cannot be reproduced reliably or scaled across multiple nodes. Any model dependency must be part of the declarative configuration so that the environment can be recreated automatically during deployment or autoscaling.
- ✓
Include a requirements.txt file in the model artifact
Why this is correct
Including a requirements.txt file or letting MLflow capture the environment ensures that the serving environment mirrors the training environment. This is the standard method to maintain consistency, allowing the Databricks serving infrastructure to install the correct package versions during the initial container build and deployment process.
- ✗
Use the 'latest' tag for all library imports
Why it's wrong here
Using 'latest' tags for dependencies is a significant anti-pattern in production environments. It introduces non-determinism, as the production environment might use different library versions than those tested. This can lead to silent failure modes, bugs, or performance degradation when libraries undergo breaking API changes in newer releases.
- ✗
Only use libraries that come pre-installed in the Databricks Runtime
Why it's wrong here
While using pre-installed libraries is convenient, it is rarely sufficient for complex ML projects that require specific versions of specialized packages like XGBoost, PyTorch, or Hugging Face Transformers. Relying solely on the runtime limits functionality and forces sub-optimal model choices to fit within the pre-installed library set.
About these practice questions
Courseiva writes every Databricks-ML-Assoc question from scratch — 319 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.