Courseiva

Databricks Certified Machine Learning Associate (Databricks-ML-Assoc) — Questions 1–75

319 questions total · 5 pages · All types, answers revealed

Page 1 of 5

Page 2
1
MCQhard

A team registered a model in Unity Catalog and wants to serve it on a Databricks Model Serving endpoint. During deployment, the build fails because the model's conda environment references a private Python package hosted on an internal PyPI mirror that the serving build cannot reach. Which approach resolves the deployment?

A.Add the internal PyPI mirror URL as an environment variable on the serving endpoint configuration.
B.Convert the private package into a wheel, log it as a model artifact, and reference it in the model's conda environment via a pip requirement pointing to the artifact path.
C.Increase the endpoint's workload size so the build has more memory for dependency resolution.
D.Remove the private package from the conda environment and rely on the package being preinstalled in the serving base image.
AnswerB

Logging the private wheel alongside the model and referencing it with a relative pip path in the conda environment file lets the serving build resolve the dependency from the model artifacts themselves, avoiding external network access. This is the documented pattern for private libraries and keeps the environment reproducible and self-contained for deployment.

Why this answer

The robust fix is to make the model environment self-contained by logging the private wheel as part of the model artifacts and pointing the conda pip section at that relative path. The serving build then installs the dependency from artifacts it already has, with no need to reach an internal index. This preserves reproducibility and avoids exposing private infrastructure to the serving build.

Exam trap

The trap here is treating a dependency-resolution failure as a compute sizing or environment-variable problem instead of a package-availability problem.

2
MCQeasy

A data scientist is using MLflow Tracking to log experiments. They want to compare multiple runs of a scikit-learn model and identify the run with the lowest RMSE. Which MLflow feature should they use?

A.The MLflow Tracking UI, which allows sorting and filtering runs by metrics.
B.The MLflow Projects feature, which packages code for reproducible runs.
C.The MLflow Model Registry, which stores model versions and their stages.
D.The MLflow Recipes (formerly Pipelines) framework, which automates model training.
AnswerA

The MLflow Tracking UI provides a table of runs with sortable and filterable columns, including metrics. You can sort by RMSE ascending to find the lowest value. It also supports parallel coordinates plots and metric charts for visual comparison. This is the primary tool for comparing runs in an experiment.

Why this answer

The MLflow Tracking UI is designed for visualizing and comparing runs within an experiment. It allows sorting by metrics such as RMSE, filtering, and generating charts. Projects, Model Registry, and Recipes serve different purposes: packaging, lifecycle management, and automation, respectively.

Therefore, the Tracking UI is the correct tool for this comparison.

Exam trap

The trap here is confusing MLflow components: Projects and Recipes are about packaging and automation, while the Tracking UI is for run comparison.

3
MCQhard

An ML engineer is building an automated CI/CD pipeline that, after validating a new model version, must programmatically move it to the `champion` alias in Unity Catalog so the production Model Serving endpoint begins using it. The pipeline runs in a Databricks job using a service principal. Which action accomplishes the promotion programmatically?

A.Write the model version number into a Delta table that the endpoint reads at request time to decide which version to load.
B.Call the MLflow client method `set_registered_model_alias` with the model name, alias `champion`, and the target version, using a client connected to the Databricks registry URI.
C.Delete the current `champion` alias and recreate it by registering the model again under the same name with a new version number.
D.Invoke the endpoint's REST API with an update payload that includes the new model version number, forcing the endpoint to reload the model.
AnswerB

The MLflow client exposes `set_registered_model_alias`, which updates the alias pointer in the registry. When the client is configured with the Databricks tracking URI and the service principal's credentials, the call moves `champion` to the validated version, and the serving endpoint that resolves that alias picks it up. This is the supported programmatic promotion path.

Why this answer

Programmatic promotion in Unity Catalog is done through the MLflow client's alias APIs: `set_registered_model_alias` moves the alias to the validated version, and any serving endpoint resolving that alias adopts the change. Endpoint inference calls, custom Delta lookup tables, and delete-and-recreate maneuvers do not perform an atomic alias update and either fail outright or introduce availability risk.

Exam trap

The trap here is conflating endpoint inference APIs with registry management APIs, leading to the belief that a prediction call can change which model version is served.

4
MCQmedium

You are tracking a deep learning model experiment using MLflow. You want to ensure that the model architecture and all hyperparameters are easily reproducible. Which approach is best practice?

A.Only log the final model artifacts to the MLflow Model Registry to save disk space.
B.Log parameters, metrics, and include the conda environment configuration with the model.
C.Manually copy the training code into a text field in the MLflow UI for every run.
D.Use a global variable in your notebook to store all hyperparameters for easy access.
AnswerB

Logging parameters and environment configuration ensures that the code can be executed in an identical environment. MLflow automatically packages these dependencies, allowing you to restore the training state precisely. This reproducibility is a fundamental requirement for compliance, debugging, and iterative model development in enterprise ML pipelines.

Why this answer

Logging model parameters and the environment configuration (like conda.yaml or requirements.txt) via MLflow ensures reproducibility. By capturing the exact package versions and architectural settings during the run, you eliminate the 'it works on my machine' problem. This practice is essential in production workflows where model drift or performance degradation requires auditing the exact conditions under which a specific model version was trained.

Exam trap

Candidates frequently log only metrics, ignoring the environment configuration. They fail to realize that without the exact package versions, a model cannot be reliably reproduced in a different environment.

5
MCQmedium

A data scientist is using MLflow to log a custom PyTorch model in a Databricks notebook. They want to register the model in the Databricks Model Registry and later serve it with MLflow model serving. Which function should they call within their MLflow run to log the model with the necessary signature and dependencies?

A.mlflow.pytorch.log_model()
B.mlflow.save_model()
C.mlflow.log_model()
D.mlflow.register_model()
AnswerA

mlflow.pytorch.log_model() is the correct function to log a PyTorch model. It saves the model in MLflow format, captures dependencies, and allows specifying a signature and input example. This enables the model to be registered in the Model Registry and served with MLflow model serving. The function is part of the MLflow PyTorch flavor and is designed for this purpose.

Why this answer

To log a PyTorch model, the correct function is mlflow.pytorch.log_model. It handles saving the model in MLflow's format, capturing dependencies and signatures, and making it available for registration and serving. Other functions either don't exist, serve different purposes, or are not flavor-specific.

Exam trap

The trap here is confusing model logging with model registration or using a non-existent generic logging function.

6
Multi-Selecthard

A data scientist is using MLflow to log a model on Databricks. They want to ensure that the model can be loaded and used for inference in a different environment. Which two of the following are necessary components that must be included when logging the model to guarantee portability? (Choose two.)

Select 2 answers
A.The conda environment file (conda.yaml) that lists all dependencies.
B.The MLflow run ID where the model was logged.
C.The model's input example, which provides a sample input for testing.
D.The model's signature, which defines the input and output schema.
E.The training dataset used to fit the model.
AnswersA, D

The conda environment file is critical for portability because it specifies the exact libraries and versions needed to run the model. When loading in a different environment, MLflow uses this file to recreate the environment. Without it, the model may fail to load due to missing or incompatible dependencies. Therefore, it is a necessary component for ensuring the model works as intended elsewhere.

Why this answer

For a model to be portable across environments, it must include a signature to define input/output schemas and a conda environment file to capture dependencies. These ensure that the model can be correctly loaded and executed elsewhere. Other elements like training data, run ID, or input examples are not required for the model to function.

Exam trap

The trap here is confusing optional metadata like input examples or run IDs with the core components needed for a model to load and run in a new environment.

7
MCQhard

A data scientist is using MLflow to track a hyperparameter tuning experiment with Spark MLlib's CrossValidator. They notice that each run in the MLflow UI shows only a single set of metrics, but they want to compare the performance of each hyperparameter combination across folds. What is the most effective way to log and visualize the per-combination and per-fold metrics in MLflow?

A.Create a separate MLflow run for each hyperparameter combination, and within each run, log the average metric across folds as well as individual fold metrics using distinct metric names.
B.Use MLflow's log_batch API to log all metrics and parameters for each combination in a single batch, without creating separate runs.
C.Log all metrics from all combinations into a single run, using metric names that encode the hyperparameters and fold numbers.
D.Use mlflow.log_metric with a step parameter for each fold, and log the hyperparameters as a JSON string in a single parameter.
AnswerA

Creating a separate run per hyperparameter combination allows each combination to be compared as a distinct entity in the MLflow UI. Logging both the average and individual fold metrics, with unique names like 'fold_0_auc', provides detailed insight. This structure supports sorting, filtering, and parallel coordinates plots to identify the best combination, directly addressing the need to compare performance across folds.

Why this answer

The MLflow UI organizes metrics and parameters by run, making runs the natural unit for comparing hyperparameter combinations. By creating a separate run for each combination and logging both aggregate and per-fold metrics with distinct names, the data scientist can leverage the UI's comparison tools, such as parallel coordinates and scatter plots, to identify the best performing combination and understand fold-level variability.

Exam trap

The trap here is assuming that logging all metrics into a single run or using the step parameter can substitute for separate runs, when the MLflow UI's comparison capabilities fundamentally depend on runs as distinct entities.

8
MCQmedium

Refer to the exhibit. A data scientist receives this error while trying to load a model. What is the most likely cause of this failure in the workflow?

A.The model has been deleted from the registry.
B.The model version number is incorrectly referenced in the code.
C.The cluster does not have permission to access the MLflow registry.
D.The MLflow tracking URI is pointing to a different workspace.
AnswerB

The error explicitly states that the version does not exist. This is a common issue when using hard-coded version integers. If the model was never registered as version 5, or if it was deleted, the retrieval command will fail, confirming the code is pointing to a non-existent artifact.

Why this answer

This error indicates that the code is attempting to reference a specific version of a model that does not exist in the Model Registry. This often occurs when a script relies on hard-coded version numbers rather than dynamic lookups or stage-based references. In a production workflow, using stage aliases like 'Production' is preferred to ensure that the application always fetches the current valid version without needing manual updates when models are updated.

Exam trap

Candidates often assume the error is related to network connectivity or permissions, failing to notice that hard-coded version numbers are brittle and prone to breaking when versions are updated.

9
MCQhard

A team deploys an MLflow pyfunc model to a Databricks Model Serving endpoint. During pre-deployment testing they call the endpoint with a small batch of records and receive an HTTP 400 error stating the request payload does not match the model signature. The model was logged with an inferred signature from a pandas DataFrame. Which action most directly resolves the mismatch?

A.Re-log the model with an explicit input_example and signature, then register the new version and update the served entity to that version.
B.Enable inference tables on the endpoint so failed requests are logged and the signature is auto-corrected.
C.Increase the endpoint's workload size from Small to Large so the request payload can be accepted.
D.Add a `Content-Type: text/plain` header to the request so the endpoint parses the payload differently.
AnswerA

Re-logging with an explicit signature and input_example ensures the logged schema matches the payload the endpoint expects, and registering a new version plus updating the served entity points the endpoint at the corrected model. This directly addresses the signature mismatch reported in the 400 error.

Why this answer

A signature mismatch means the logged model's expected schema differs from the payload the endpoint receives. The reliable fix is to re-log the model with an explicit signature and input example, register the new version, and repoint the served entity. Compute scaling, content-type changes, and inference tables address different concerns and do not alter schema validation.

Exam trap

The trap here is treating a signature validation error as a capacity or networking problem instead of a schema mismatch that must be fixed by re-logging the model.

10
Multi-Selecthard

A machine learning engineer is troubleshooting a Model Registry issue where models are not being transitioned correctly. Which TWO actions should the engineer take to ensure proper governance and automated testing in the Registry?

Select 2 answers
A.Implement Webhooks to trigger external CI/CD validation pipelines upon status transitions.
B.Delete all older versions of the model to keep the registry clean and performant.
C.Manually update the model stage via the UI for every version to ensure maximum control.
D.Use Model Registry tags to perform metadata-based filtering for downstream automated testing.
E.Disable the model versioning feature to save storage space in the DBFS.
AnswersA, D

Webhooks allow Databricks to trigger external services like Jenkins or GitHub Actions whenever a model version changes state. This enables automated testing and validation workflows, ensuring that models meet performance benchmarks and quality gates before being approved for staging or production, which is a critical governance requirement.

Why this answer

Effective model governance relies on robust testing and clear transition protocols. Integrating CI/CD pipelines ensures that models undergo automated unit and integration tests before transitioning to Staging or Production. By utilizing Webhooks and automated transition triggers, teams can enforce validation checks, ensuring only high-quality models reach production.

This systematic approach reduces risk and maintains a clear audit trail for compliance and operational reliability within the Databricks ML ecosystem.

Exam trap

Candidates often rely on manual transitions in the Registry, which lacks auditability. They fail to implement automated webhooks or tags, which are required for robust, repeatable CI/CD pipelines.

11
MCQhard

A data scientist is training a gradient boosting model using Spark MLlib on a large dataset in Databricks. They notice that the model's performance on a validation set is significantly worse than on the training set, and they suspect overfitting. They want to use MLflow to track hyperparameters and metrics to diagnose the issue. Which combination of MLflow logging practices will best help them identify overfitting across multiple runs?

A.Log only the training metric and the model artifact, and rely on the MLflow UI to automatically compute validation metrics.
B.Log hyperparameters and the final model, but log metrics only at the end of training to reduce clutter.
C.Log training and validation metrics separately for each run, and log hyperparameters such as maxDepth and minInstancesPerNode.
D.Use MLflow autologging for Spark MLlib, which automatically logs training and validation metrics and hyperparameters.
AnswerC

Logging both training and validation metrics allows direct comparison to detect overfitting, where training performance improves while validation performance degrades. Logging key hyperparameters like maxDepth and minInstancesPerNode enables correlation of model complexity with overfitting. This combination provides the necessary data to diagnose and tune the model effectively using MLflow's comparison features.

Why this answer

To diagnose overfitting, it is essential to compare training and validation performance across runs. Logging both metrics separately, along with relevant hyperparameters that control model complexity, allows the data scientist to visualize the gap and tune accordingly. MLflow's tracking and comparison features then make it straightforward to identify runs where validation performance lags.

Exam trap

The trap here is assuming that MLflow autologging automatically captures validation metrics, when in fact validation metrics must be explicitly computed and logged by the user.

12
MCQhard

A data scientist is using Databricks Feature Store to train a model. They define a feature table with a primary key and a timestamp key, and they want to ensure that when they create a training set, only the latest feature values as of each label event are used to avoid label leakage. Which Databricks Feature Store method should they call to create the training set with point-in-time correctness?

A.fs.get_feature_table(name="features")
B.fs.read_table(name="features")
C.fs.create_training_set(df, feature_lookups=..., label="label", exclude_columns=[...])
D.fs.write_table(df, name="features", mode="overwrite")
AnswerC

The create_training_set method of the FeatureStoreClient performs point-in-time lookups by default when feature tables have a timestamp key. It joins the label DataFrame with feature tables using the timestamp to fetch only feature values that were valid at or before each label event, preventing leakage. This is the intended API for building training sets with time-travel semantics in Databricks Feature Store.

Why this answer

create_training_set is the Feature Store API that performs point-in-time lookups using the timestamp key of feature tables, ensuring that only feature values available before each label event are used. This prevents label leakage and is the correct method for building training sets in Databricks Feature Store. Other methods either write, read, or inspect tables without temporal join logic.

Exam trap

The trap here is assuming that reading a feature table and joining manually is equivalent to point-in-time lookup, when only create_training_set enforces temporal correctness.

13
Multi-Selectmedium

Which THREE actions are essential when preparing a machine learning model for deployment using the Databricks Model Registry?

Select 3 answers
A.Transitioning the model version to the appropriate stage.
B.Logging the model with an input signature.
C.Adding metadata and descriptions to the model version.
D.Manually downloading the model pickle file to a local machine.
E.Hard-coding the model URI in the application inference code.
AnswersA, B, C

Transitions allow for the formal advancement of a model from experimentation to deployment. Using stages like 'Staging' and 'Production' enables teams to control which versions are used in downstream inference applications, ensuring only tested and approved artifacts are exposed to live data and production environments.

Why this answer

Preparing a model involves validating its performance, documenting its lineage, and assigning it to the appropriate registry stage. By logging the model with its signature, you ensure that the input/output schema is preserved. Transitioning through stages (Staging, Production) allows for controlled releases, while adding metadata via tags and descriptions provides necessary context for other stakeholders to understand the model's purpose, limitations, and performance characteristics in a production environment.

Exam trap

Candidates often overlook the importance of the input signature, incorrectly assuming that code alone is sufficient for deployment without defining the expected data schema for downstream inference.

14
MCQeasy

Which Databricks feature allows you to manage the lifecycle of a model, including transitions from 'Staging' to 'Production'?

A.Databricks SQL
B.MLflow Model Registry
C.Delta Live Tables
D.Unity Catalog
AnswerB

The MLflow Model Registry is the purpose-built service in Databricks for managing the entire model lifecycle. It allows for versioning, metadata tracking, and stage transitions, providing an organized approach to moving models from initial experimentation through staging to final deployment in a production serving endpoint.

Why this answer

The MLflow Model Registry provides a centralized store for managing models throughout their lifecycle. It allows teams to track model versions, apply transitions (e.g., Staging to Production), and manage metadata. This central control is fundamental for MLOps, as it provides a clear record of which model is currently active in the production environment and ensures that only validated models are promoted to downstream systems.

Exam trap

Candidates often confuse workspace git repositories or MLflow tracking servers with the specific component dedicated to lifecycle stage transitions like 'Staging' to 'Production'.

15
Multi-Selectmedium

A data scientist is evaluating feature importance for a tree-based model trained on Databricks. They want to understand which features contribute most to the model's predictions. Which TWO methods are appropriate for extracting feature importance from a scikit-learn Random Forest model? (Choose two.)

Select 2 answers
A.Access the feature_importances_ attribute of the fitted model.
B.Examine the coefficients of the model's decision function.
C.Use SHAP (SHapley Additive exPlanations) values to compute feature importance.
D.Use the model's get_params method to retrieve feature importance.
E.Use the model's predict_proba method to derive feature importance.
AnswersA, C

Scikit-learn's Random Forest model exposes a feature_importances_ attribute after fitting. This attribute provides a normalized array of importance scores based on impurity decrease. It is a straightforward and computationally efficient way to get a global ranking of feature importance, which is suitable for understanding which features contribute most to the model's predictions.

Why this answer

The feature_importances_ attribute of a fitted Random Forest provides a quick, impurity-based measure of global feature importance. SHAP values offer a more detailed, model-agnostic approach that attributes each feature's contribution to individual predictions, which can be aggregated for global importance. Both are valid methods for understanding feature influence.

The other options do not yield feature importance: predict_proba returns probabilities, decision function coefficients are for linear models, and get_params returns hyperparameters.

Exam trap

The trap here is assuming that any model output or method can provide feature importance; only specific attributes or external libraries like SHAP do.

16
MCQmedium

When hyperparameter tuning using 'Hyperopt' on Databricks, what is the primary benefit of using the 'Trials' object?

A.It automatically deletes the worst-performing models from the registry.
B.It enables the storage and retrieval of results from the hyperparameter search.
C.It forces the cluster to use 100% of available cores for training.
D.It prevents the model from overfitting to the validation set.
AnswerB

The Trials object acts as a database for the optimization process, storing the parameters and metrics for every experiment run. This allows the user to query the best-performing parameters, track the convergence of the search, and even resume a search if the cluster is terminated mid-process.

Why this answer

The Trials object records the results of every model evaluation run during the hyperparameter search. By persisting these results, it allows for post-hoc analysis, visualization of the search space, and the ability to resume interrupted tuning jobs. This is critical for managing expensive compute tasks, as it prevents the loss of progress and provides insights into the model's sensitivity to different parameter combinations, ultimately leading to more informed model development decisions.

Exam trap

Candidates frequently confuse the 'Trials' object with the objective function itself, assuming it performs the optimization rather than acting as a persistent storage mechanism for the search results.

17
MCQmedium

An ML engineer has a scikit-learn model trained locally and wants to log it to MLflow with a signature so that Databricks Model Serving can enforce input schema validation. The engineer calls mlflow.sklearn.log_model(model, 'model') but does not use infer_signature. What is the most accurate consequence when the model is later served on Databricks Model Serving?

A.The model will be served with a default signature that expects a single double column named 'features'.
B.Databricks Model Serving will automatically infer the signature from the first request payload and cache it for later validation.
C.Databricks Model Serving will reject the model version because a signature is mandatory for all Unity Catalog registered models.
D.The model will be served, but the endpoint cannot validate incoming request schemas against a stored signature, so malformed inputs may reach the model.
AnswerD

MLflow signatures are recorded only when log_model is called with a signature argument or infer_signature. Without it, the logged model has no stored input schema, so Databricks Model Serving cannot enforce request validation and will pass payloads directly to the model, where unexpected columns or types may cause runtime errors.

Why this answer

Logging a model without infer_signature leaves the MLflow model metadata without an input schema. Databricks Model Serving uses that stored signature to validate request payloads, so the endpoint will accept requests but cannot reject malformed ones. To gain schema enforcement, the engineer should call infer_signature on a sample DataFrame and pass it to log_model.

Exam trap

The trap here is assuming that Databricks Model Serving can infer or enforce a schema from live traffic even when no signature was logged with the model.

18
MCQmedium

A data science team is transitioning from local model development to Databricks. They want to ensure their models are portable across different Databricks workspaces. What is the recommended practice for managing models in this environment?

A.Export models as pickle files to DBFS.
B.Use MLflow Model Registry with Unity Catalog.
C.Email model artifacts to other team members.
D.Re-train the model in each workspace.
AnswerB

Unity Catalog provides a centralized, governed repository for models across all Databricks workspaces. It enables teams to share models securely and maintain a single source of truth. This approach supports standardized deployment pipelines and metadata management, ensuring models are easily accessible and managed throughout their lifecycle in multi-workspace environments.

Why this answer

Using the MLflow Model Registry within Unity Catalog is the best practice for cross-workspace model management. Unity Catalog provides a unified namespace and governance, allowing models to be registered and then accessed from different workspaces with appropriate permissions. This practice eliminates the need for manual migration of artifacts and ensures that model lineage, versions, and metadata remain synchronized and governed, which is critical for enterprise-grade MLOps and compliance.

Exam trap

Candidates often suggest manual model exporting or cloud storage transfers, unaware that Unity Catalog and the Model Registry provide native, governed cross-workspace access without manual file movement.

19
MCQmedium

A data scientist trains a scikit-learn model with MLflow tracking in a Databricks notebook. They call mlflow.sklearn.log_model(model, 'model') but later find that the Registered Model's schema shows no input signature, preventing automatic schema enforcement during serving. What should they have done to capture the model signature?

A.Register the model in the workspace Model Registry and then edit the signature in the UI
B.Call mlflow.sklearn.log_model(model, 'model', signature=mlflow.models.infer_signature(X_train, model.predict(X_train)))
C.Log the training DataFrame as an artifact and add a signature manually in the MLmodel file after training
D.Enable autologging with mlflow.sklearn.autolog() before training and logging
AnswerB

mlflow.models.infer_signature(X_train, model.predict(X_train)) examines the training DataFrame and the model's predictions to build an MLflow ModelSignature containing input and output column types. Passing it to log_model persists the signature in MLmodel, enabling schema validation and automatic enforcement by Model Serving. It is the documented, lightweight way to capture schema without manual specification.

Why this answer

The model signature is created and attached during logging, not afterward. mlflow.models.infer_signature derives input and output schema from sample data and predictions, and passing it to log_model stores it in the MLmodel file. This enables schema enforcement and automatic serving input validation. Other options either do not create a signature or attempt unsupported post-hoc edits.

Exam trap

The trap here is assuming that autologging or the Model Registry UI can add a signature after the fact, when signatures must be captured at log time.

20
MCQmedium

A data scientist is tuning a scikit-learn GradientBoostingClassifier on Databricks. They use Hyperopt with the fmin function and the SparkTrials backend, but they notice that the best model returned by fmin is not identical to the model they get when they retrain with the same hyperparameters. They also observe that the logged metrics from each trial vary slightly even when the same hyperparameters are used. What is the most likely cause?

A.The random seed for the classifier is not fixed, so each trial and the final retrain produce different random splits and initialization, leading to slight variations.
B.SparkTrials runs each trial on a different worker node, and the data is shuffled differently on each node, causing divergent results.
C.Hyperopt's fmin function does not support scikit-learn models; it only works with MLflow models, so the returned model is a placeholder.
D.SparkTrials caches the training data on each worker, and the cache is not invalidated between trials, causing stale data to be used.
AnswerA

GradientBoostingClassifier uses randomness in feature subsampling and in the order of samples if subsample < 1.0. Without a fixed random_state, each trial and the final retrain will have different random seeds, causing slight differences in the fitted model and metrics. This is the most likely cause of the observed variation and mismatch.

Why this answer

The mismatch and metric variation occur because the model training is non-deterministic. GradientBoostingClassifier uses random processes for feature subsampling and sample selection when subsample is less than 1.0. Without setting a fixed random_state, each run produces a slightly different model, even with identical hyperparameters.

This explains both the differing trial metrics and the final model discrepancy.

Exam trap

The trap here is assuming that distributed training with SparkTrials introduces data inconsistency, when the real issue is the lack of a fixed random seed in the estimator.

21
Multi-Selectmedium

Which TWO factors should be considered when choosing between Batch Inference and Real-time Inference for a model in Databricks?

Select 2 answers
A.The memory limit of the driver node during the model training phase.
B.The required latency for the model predictions to reach the end user.
C.The total volume and frequency of the incoming data requests.
D.The number of features used in the machine learning model.
E.The programming language used to write the ML model training code.
AnswersB, C

Latency is the primary driver for choosing between real-time and batch inference. If the user requires sub-second responses to an event, real-time serving is necessary. If the predictions can be processed asynchronously, batch inference is significantly more efficient and cost-effective for handling high volumes of data.

Why this answer

Choosing between batch and real-time inference depends on latency requirements and data availability. Batch is suited for high-volume, non-time-sensitive tasks, whereas real-time is necessary for low-latency, event-driven predictions. Understanding these trade-offs is essential for ML architects to design cost-effective and performant serving strategies that align with business needs, as they dictate the infrastructure configuration, monitoring complexity, and the overall deployment strategy for the model lifecycle.

Exam trap

Candidates often over-focus on model accuracy or training speed, forgetting that deployment strategy is primarily dictated by the business requirements of latency and data throughput volume rather than model complexity.

22
MCQmedium

A team is transitioning from local model development to production in Databricks. Which THREE practices should be implemented to ensure a successful MLOps workflow?

A.Always register models in the MLflow Model Registry.
B.Keep all training and production code in a single notebook for simplicity.
C.Implement automated CI/CD pipelines for deployment.
D.Monitor model performance and trigger retraining when drift is detected.
E.Allow all team members to have 'Admin' access to production models.
AnswerA, C, D

Registering models provides a centralized, version-controlled repository. This allows for clear tracking of which model version is in which stage, enables audit logs of changes, and facilitates integration with deployment tools, which is necessary for managing model provenance and ensuring only approved versions are deployed to production endpoints.

Why this answer

Moving to production requires rigorous automation and governance. Using a centralized model registry ensures version control and auditability. Automated CI/CD pipelines ensure that model training and deployment are consistent and repeatable, reducing the risk of manual errors.

Finally, monitoring model performance in production is critical to detect drift and trigger retraining, ensuring the model remains accurate and relevant as the underlying data distribution changes over time in the real-world environment.

Exam trap

Candidates often focus only on model training, forgetting that production MLOps requires a holistic approach including continuous monitoring for drift and automated CI/CD deployment pipelines.

23
MCQmedium

Which Databricks tool is primarily used for organizing and documenting experiments, tracking parameters, and versioning models during the machine learning lifecycle?

A.Databricks SQL.
B.Delta Live Tables (DLT).
C.MLflow.
D.Unity Catalog.
AnswerC

MLflow is the native Databricks tool for end-to-end machine learning. It covers the entire lifecycle, including experimentation, reproducibility, and deployment. By providing a unified interface for tracking runs and managing model versions, it is the primary solution for data scientists and engineers working within the Databricks machine learning ecosystem.

Why this answer

MLflow is the integrated platform in Databricks for managing the end-to-end machine learning lifecycle. It includes Tracking for logging parameters and metrics, Projects for packaging code for reproducibility, and the Model Registry for managing model versions and lifecycle transitions. It is the cornerstone of Databricks ML, providing the visibility and control necessary for professional-grade machine learning workflows across a team.

Exam trap

Candidates mix up Unity Catalog governance features with MLflow experiment tracking, confusing administrative access controls with lifecycle parameter logging tools.

24
MCQmedium

A data scientist is training a scikit-learn model on a large dataset using Databricks. They want to speed up hyperparameter tuning by running trials in parallel across a cluster. Which Databricks tool should they use?

A.MLflow Tracking with nested runs
B.Databricks AutoML
C.Pandas UDFs
D.Hyperopt with SparkTrials
AnswerD

Hyperopt with SparkTrials distributes hyperparameter tuning trials across Spark executors, enabling parallel search. It integrates natively with MLflow for logging. This is the recommended approach for scaling hyperparameter tuning on Databricks, reducing wall-clock time compared to sequential search.

Why this answer

Hyperopt with SparkTrials is the Databricks-recommended tool for parallel hyperparameter tuning. It distributes trials across Spark executors, leverages MLflow for logging, and supports advanced search algorithms. The other options either do not parallelize tuning or are not designed for custom parallel search.

Exam trap

The trap here is assuming that MLflow Tracking with nested runs provides parallelism, when it only organizes runs hierarchically.

25
MCQeasy

A data scientist has trained a model and wants other team members to serve it through a Databricks Model Serving endpoint. The model must be discoverable by a three-level namespace and governed by Unity Catalog. What should the data scientist do first?

A.Export the model to a DBFS path and point the serving endpoint at the DBFS file path.
B.Log the model with MLflow and register it to a Unity Catalog model using `mlflow.register_model` with a three-level name.
C.Package the model as a Docker image and push it to a container registry for the endpoint to pull.
D.Create a Databricks job that runs the model's predict method on a schedule and writes results to a Delta table.
AnswerB

Registering the model to Unity Catalog under a three-level namespace like `catalog.schema.model_name` makes it discoverable and governed, and provides the versioned artifact that Model Serving references. This is the prerequisite step before creating an endpoint. Without a registered Unity Catalog model version, the serving configuration has no valid entity to load.

Why this answer

Serving a model through Databricks Model Serving requires a registered model version. Registering to Unity Catalog with a three-level name provides governance and discoverability, and the endpoint then references that catalog, schema, and model name with a version. Exporting to DBFS, scheduling batch jobs, or using custom containers do not establish the Unity Catalog model entry required here.

Exam trap

The trap here is thinking the endpoint can point directly at a serialized model file, when it must reference a registered model version in Unity Catalog or the workspace Model Registry.

26
MCQhard

A machine learning engineer maintains a Databricks Model Serving endpoint named `recommendations-endpoint` serving a registered model `ml_team.recommender_model` at version 7. The team wants to route 10% of live traffic to a newly registered candidate version 8 while keeping version 7 serving the remaining 90%, without altering the existing client request URL. Which approach should the engineer take?

A.Configure traffic splitting on the existing endpoint by setting `traffic_config` with `routes` assigning 10% to version 8 and 90% to version 7.
B.Update the endpoint's `config` to point only at version 8 and rely on client-side retries to fall back to version 7 when errors occur.
C.Overwrite version 7 in the Model Registry with the artifacts of version 8, then restart the endpoint so it serves the updated model.
D.Create a second endpoint for version 8 and use an external load balancer to split traffic between the two endpoint URLs.
AnswerA

Databricks Model Serving supports traffic splitting on an existing endpoint through the `traffic_config` field, where each entry in `routes` specifies a served model name and a percentage. Setting version 8 to 10% and version 7 to 90% preserves the same endpoint URL and load-balances live requests accordingly, enabling safe canary-style evaluation without touching client code.

Why this answer

Databricks Model Serving endpoints expose a `traffic_config` setting whose `routes` array maps served model versions to percentage weights. Adjusting those weights on the existing endpoint shifts a defined share of live requests to the candidate version while the endpoint URL and client integration remain unchanged. This supports progressive rollout and A/B comparison, and the split can be reverted instantly by restoring the previous weights.

Exam trap

The trap here is assuming a new model version requires a brand-new endpoint, when Databricks Model Serving can split traffic between versions on the same endpoint through `traffic_config`.

27
MCQmedium

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?

A.Save the model using joblib.dump and then use MLflow to log the file as an artifact.
B.Use mlflow.pyfunc.log_model to log the model, then call mlflow.register_model to register it.
C.Log the model using mlflow.log_artifact and then manually register it via the MLflow UI.
D.Log the model using mlflow.sklearn.log_model with the registered_model_name parameter set.
AnswerD

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.

Why this answer

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.

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.

28
MCQhard

When using the Databricks Feature Store for real-time inference, why is it recommended to use a specific online store (e.g., Cosmos DB) instead of querying the offline store?

A.The offline store is not compatible with the Python programming language.
B.The offline store cannot handle concurrent requests from multiple inference endpoints.
C.Online stores are designed for low-latency random access lookups.
D.The offline store requires a GPU cluster to perform any queries.
AnswerC

Real-time inference demands rapid, single-record retrieval. Online stores provide this by using indexing and caching mechanisms that allow for millisecond-level latency. Offline stores, by contrast, are designed for batch processing, which makes them unsuitable for servicing individual real-time prediction requests in a production environment.

Why this answer

Offline stores (Delta Lake) are optimized for high-throughput, sequential read/write operations common in batch training, but they suffer from high latency during random access lookups. Online stores are optimized for low-latency point lookups (Key-Value access). Separating these storage tiers allows ML models to achieve the sub-millisecond response times required for real-time applications while still leveraging the massive analytical capabilities of the offline store for training.

Exam trap

Candidates often assume the offline store can be used for real-time inference because it contains all the data, ignoring the high-latency performance limitations of Delta Lake.

29
MCQmedium

An ML engineer is building a recurring batch inference pipeline in Databricks. The model is registered in Unity Catalog as a model version and must always use the version currently tagged as 'champion', which is reassigned after each retraining run. The engineer wants the inference notebook to resolve this alias at runtime rather than hard-coding a version number. Which approach should the engineer use in the notebook?

A.Load the model with mlflow.pyfunc.load_model("models:/catalog.schema.model_name@champion") to resolve the alias at runtime.
B.Load the model with mlflow.pyfunc.load_model("models:/catalog.schema.model_name/Production") to resolve the stage at runtime.
C.Read the model version number from the MLflow Tracking API at runtime and pass it to mlflow.pyfunc.load_model with a numeric version URI.
D.Download the model artifacts from the Unity Catalog volume path with dbutils.fs.cp and load them with mlflow.pyfunc.load_model using the local path.
AnswerA

The models:/ URI with the @champion suffix resolves the Unity Catalog model alias to the currently assigned version at load time, so the notebook always picks up the latest promoted model without edits. This is the documented pattern for alias-based deployment in Databricks, and it works with mlflow.pyfunc.load_model as well as scoring inside the notebook or a job task.

Why this answer

Using a model alias in the models:/ URI lets the pipeline resolve the promoted version at runtime, so retraining and promotion do not require editing the inference notebook. The alias is a mutable pointer managed in Unity Catalog, and mlflow.pyfunc.load_model understands the models:/ scheme with the @alias suffix, making it the intended mechanism for champion-based batch scoring.

Exam trap

The trap here is assuming that MLflow model stages like Production still apply inside Unity Catalog, when Unity Catalog models rely on aliases instead.

30
MCQmedium

What is the purpose of the 'Champion' model version in the Model Registry?

A.To serve as the model used by all users by default
B.To identify the model that took the longest to train
C.To represent a model that is currently being tested
D.To store the source code for the model
AnswerA

The Champion model is intended to be the standard version that applications and users should interact with. It serves as the primary version for production workloads, ensuring that all traffic is routed to the most stable and performant model version currently vetted by the organization's governance processes.

Why this answer

The 'Champion' model is the designated version that currently handles the primary traffic for a deployment. By explicitly labeling a version as the Champion, teams can clearly identify the production-ready model. This provides a single source of truth for deployment automation, ensuring that when an endpoint is configured to serve the 'Champion', it is always running the intended, validated model without manual configuration changes.

Exam trap

Candidates often confuse the 'Champion' version with the latest trained model version, assuming newest always means default, whereas 'Champion' must be explicitly designated for production traffic.

31
MCQmedium

An ML engineer is building a Databricks Job that trains a model with scikit-learn and needs to capture hyperparameters, evaluation metrics, and the resulting model artifact for each run. The team wants to compare runs visually in the workspace and later promote the best model to the Model Registry. Which MLflow capability should the engineer use to record these per-run details?

A.Databricks Feature Store with online store enabled
B.MLflow Tracking with autologging enabled for scikit-learn
C.Databricks Jobs task dependencies with a condition task
D.MLflow Model Registry stage transitions
AnswerB

MLflow Tracking records parameters, metrics, tags, and artifacts for each run, and the scikit-learn autologging integration automatically captures estimator hyperparameters, evaluation metrics, and the fitted model artifact. This satisfies the need to compare runs in the workspace UI and gives a model artifact that can be registered afterward, with no manual logging calls required for standard estimators.

Why this answer

Recording per-run parameters, metrics, and model artifacts is the job of MLflow Tracking, and the scikit-learn autologging integration captures these automatically for standard estimators. That gives the team comparable runs in the workspace experiment UI and a logged model artifact that can subsequently be registered and promoted through the Model Registry.

Exam trap

The trap here is assuming that the Model Registry or Feature Store performs experiment tracking, when in fact only MLflow Tracking logs the per-run parameters, metrics, and artifacts.

32
Multi-Selecthard

A team is preparing to deploy a model to a Databricks Model Serving endpoint that must scale down to zero replicas when idle yet still serve bursty traffic with acceptable cold-start latency. They also need to capture the request and response payloads for later monitoring. Which two endpoint settings or features should they configure? (Choose two.)

Select 2 answers
A.Configure a provisioned throughput endpoint to reserve dedicated capacity for the model.
B.Increase the workload size to Large to reduce cold-start latency when scaling up from zero.
C.Enable scale-to-zero on the served entity so the endpoint can drop to zero replicas during idle periods.
D.Enable inference tables on the endpoint to log request and response payloads to a Delta table.
E.Set the endpoint's minimum replicas to one so that a warm replica is always available.
AnswersC, D

Scale-to-zero lets the endpoint release all compute when no requests arrive, which directly satisfies the requirement to scale down to zero replicas when idle. When traffic resumes, the endpoint scales back up, incurring a cold start. Because the scenario demands scaling to zero, this setting is necessary; without it the endpoint would keep at least one replica running and continue consuming capacity during idle periods.

Why this answer

The scenario has two distinct requirements: scaling to zero when idle and capturing payloads for monitoring. Scale-to-zero satisfies the first by releasing all compute during idle periods, and inference tables satisfy the second by logging request and response payloads to a Delta table. Keeping a minimum replica or reserving provisioned throughput would prevent scaling to zero, and workload size does not address either requirement.

Exam trap

The trap here is assuming that reducing cold-start latency requires keeping a warm replica, when that choice directly prevents the endpoint from ever scaling down to zero as required.

33
MCQhard

An MLOps engineer is responsible for a Databricks Model Serving endpoint that serves a mission-critical pricing model. The team wants an automated safeguard that detects when live input feature distributions drift away from the training distribution and triggers a retraining workflow, without modifying the model artifact itself. Which Databricks capability should be configured?

A.Increase the endpoint's workload size so it can handle higher request volume.
B.Add a custom preprocessing step to the model that rejects requests outside the training range.
C.Enable inference tables on the endpoint and build a Databricks SQL alert over the logged payloads.
D.Set the model version's stage to Production and rely on stage transitions to signal drift.
AnswerC

Inference tables persist the request and response payloads of the endpoint to a Delta table, which can be queried continuously. Comparing logged feature values against training statistics in SQL and raising an alert on the drift metric gives an automated trigger for retraining, and it requires no change to the model artifact. This directly matches the requirement for a non-invasive drift safeguard.

Why this answer

Inference tables capture the actual request payloads hitting the endpoint into a queryable Delta table, which is the foundation for computing drift metrics against training baselines. Pairing that with a scheduled query or SQL alert creates an automated signal that can start a retraining job, all without touching the model artifact, unlike request rejection, capacity changes or registry stage bookkeeping.

Exam trap

The trap here is confusing endpoint scaling or registry stage changes with monitoring, when only logged live payloads can reveal distribution shift.

34
MCQmedium

A machine learning engineer is using MLflow to log a scikit-learn model. They call mlflow.sklearn.log_model(model, "model") without specifying a signature. When the model is later loaded for batch inference, the engineer observes that the model's predict method works correctly, but they cannot determine the expected input schema from the logged model. Which MLflow component is missing and would have provided this information?

A.Run ID
B.Model signature
C.Model version
D.Input example
AnswerB

The model signature captures the expected input and output schema of the model, including column names, data types, and shapes. Without it, MLflow does not store this metadata, making it difficult to validate inputs or understand the model's interface. Logging a signature via mlflow.models.infer_signature or manually specifying it would provide the missing schema information.

Why this answer

The model signature is the MLflow component that explicitly defines the input and output schema of a logged model. Without it, MLflow does not store metadata about column names, data types, or tensor shapes, which complicates downstream validation and deployment. Logging a signature ensures that consumers of the model understand its expected interface, reducing integration errors.

Exam trap

The trap here is confusing an input example with a model signature; an example is a sample, not a formal schema definition.

35
MCQmedium

When using MLflow to manage the lifecycle of a model in Databricks, why should you use the Model Registry instead of just saving model files to DBFS?

A.It automatically compresses the model files to save storage space.
B.It allows for versioning and stage management of models.
C.It allows models to be trained directly on the registry.
D.It converts models into a proprietary format for faster inference.
AnswerB

The Model Registry offers full versioning, allowing teams to roll back to previous versions if needed. It also supports transition states like 'Staging' and 'Production,' which are key for CI/CD pipelines, enabling organizations to manage the model lifecycle with clear rules, auditability, and governance over which model is currently active.

Why this answer

The Model Registry provides versioning, stage transitions (e.g., Staging to Production), and centralized access control, which are essential for governed model deployment. Directly saving to DBFS ignores these enterprise features, making it impossible to track lineage or manage model lifecycle status effectively. Using the Registry creates an audit trail and standardizes the deployment workflow, which is critical for compliance and ensuring that only validated models move into production environments.

Exam trap

Candidates often treat DBFS as a production-ready model management system, failing to recognize that it lacks the critical versioning and stage-gating features of the Model Registry.

36
MCQeasy

Which Databricks feature allows data scientists to automatically track parameters, metrics, and models during the training process?

A.Delta Lake.
B.MLflow Tracking.
C.Databricks Jobs.
D.Unity Catalog.
AnswerB

MLflow Tracking is specifically designed to record and query experiment results, including parameters, metrics, and artifacts. It serves as the single source of truth for the model development history, allowing data scientists to identify the best-performing models easily and maintain a clean audit trail for deployment.

Why this answer

MLflow Tracking is the core component of the Databricks machine learning platform for monitoring experiments. It provides a centralized API to log parameters and metrics, enabling teams to compare different versions of models side-by-side. Mastering this feature is foundational for the exam, as it is the primary mechanism for managing the iterative nature of model development and ensuring that research is structured and reproducible.

Exam trap

Candidates often confuse MLflow Tracking with MLflow Model Registry, failing to realize that tracking is specifically for logging experiment parameters and metrics during the training process.

37
Multi-Selectmedium

Which THREE steps are essential for preparing a dataset for training using the Databricks Feature Store?

Select 3 answers
A.Define a FeatureTable with a primary key to enable lookups.
B.Manually copy raw training data into each local node's disk.
C.Register the FeatureTable in the Feature Store UI or via API.
D.Use the 'training_set' interface to join features with a label dataset.
E.Delete all source tables after registering the features.
AnswersA, C, D

Defining a FeatureTable with a primary key is the foundational step for the Feature Store. The primary key is necessary for joining feature data with other datasets and for querying features efficiently during inference, ensuring that the correct data is retrieved for specific entities in the production environment.

Why this answer

Preparing data for the Feature Store involves defining features, registering them in a catalog, and then utilizing the Feature Store client to perform joins for training. This structured workflow ensures that all features are documented, discoverable, and versioned. By standardizing these steps, data scientists can maintain a robust lineage for their data, which is critical for model auditing and ensuring that training data remains consistent across different projects and team members.

Exam trap

Candidates frequently forget the necessity of defining primary keys in FeatureTables, which is a mandatory step for enabling the Feature Store to perform lookups.

38
MCQmedium

A data scientist is building a training pipeline where raw event data lands in a Delta table. They need to transform the data, train a model, and register it to the Databricks Model Registry. The pipeline must run daily on a schedule and send an email alert if training fails. Which Databricks construct should they use to orchestrate the entire workflow?

A.A Databricks Job with multiple tasks that include a notebook task for data transformation, a notebook task for training, and a task that registers the model, with email notifications configured on the Job.
B.An MLflow Project that defines the transformation, training, and registration steps in its MLproject file and is run with mlflow run on a schedule.
C.A Delta Live Tables pipeline that performs transformations and automatically trains and registers the model as part of the pipeline.
D.A Databricks SQL dashboard that queries the raw Delta table, calls an external training service via a webhook, and emails the results.
AnswerA

A Databricks Job supports multiple tasks with dependencies, so transformation, training, and registration can be sequenced in one workflow. Job-level email notifications on failure satisfy the alerting requirement, and the Job scheduler runs it daily. This is the native Databricks orchestration construct for multi-step ML workflows.

Why this answer

Databricks Jobs with multiple tasks are the native way to orchestrate multi-step ML workflows. You can define task dependencies so transformation runs before training, and training before registration. Job-level notifications send email alerts on failure, and the built-in scheduler handles the daily cadence.

This satisfies all requirements without external tooling.

Exam trap

The trap here is assuming MLflow Projects provide scheduling and alerting, when they only package code and must be orchestrated by a separate scheduler.

39
MCQmedium

A machine learning engineer is using MLflow to log a model built with XGBoost. They want to ensure that the model's input schema is captured for validation during deployment. Which MLflow feature should they use?

A.Model signature
B.Model version
C.Run ID
D.Input example
AnswerA

The model signature defines the expected input and output schema of a model. It is logged with the model and used for validation during deployment. For XGBoost models, you can specify the signature using mlflow.models.infer_signature or manually. This ensures that the deployed model receives data in the correct format and helps catch schema mismatches early.

Why this answer

The model signature is the MLflow feature that captures the input and output schema of a model. It is logged alongside the model and is used by deployment tools to validate incoming data. For XGBoost, you can infer the signature from training data or define it manually.

This ensures that the model receives data in the expected format, reducing runtime errors.

Exam trap

The trap here is assuming that an input example provides schema validation, when it only offers a sample for testing without enforcing structure.

40
MCQeasy

A machine learning engineer wants to register a model in the Databricks Model Registry using MLflow. They have already trained a model and logged it with MLflow. Which method should they use to register the model programmatically?

A.mlflow.register_model(model_uri, name)
B.mlflow.log_model(model, name)
C.mlflow.create_registered_model(name)
D.mlflow.save_model(model, path)
AnswerA

mlflow.register_model is the correct function to register a model version in the Model Registry. It takes the model URI (e.g., 'runs:/run_id/model') and the desired registered model name. This creates a new model version and associates it with the run, enabling versioning and stage transitions. It is the standard programmatic way to register models in Databricks.

Why this answer

To register a model programmatically in the Databricks Model Registry, the engineer should use mlflow.register_model, which creates a new model version linked to the logged run. This is the direct method for registration. The other options either create a registered model without a version, log the model without registering, or save the model locally without registry integration.

Thus, mlflow.register_model is the appropriate choice.

Exam trap

The trap here is confusing logging a model with registering it, or thinking that creating a registered model name is sufficient.

41
Multi-Selecthard

A data science team is using Databricks Repos to manage a machine learning project. They want to ensure that their notebooks and supporting modules are version-controlled and that they can collaborate without overwriting each other's changes. Which TWO practices should they follow? (Choose two.)

Select 2 answers
A.Store notebooks only in the Databricks workspace and rely on workspace revision history for version control.
B.Clone the remote Git repository into Databricks Repos and commit changes from the Repos UI or a terminal.
C.Enable automatic Git commits on every notebook save to avoid manual versioning steps.
D.Use Git branches within Databricks Repos to isolate feature work and merge changes through pull requests.
E.Use DBFS to store notebooks and manually copy files to a Git repository outside Databricks.
AnswersB, D

Cloning the repository into Repos links the workspace to the remote Git repository. Users can commit and push changes from the Repos UI or a terminal, keeping the remote repository as the source of truth. This enables proper version control and collaboration, including conflict resolution.

Why this answer

To collaborate effectively with Databricks Repos, teams should clone the remote Git repository into Repos and use Git branches for feature work, merging changes through pull requests. These practices provide isolation, version control, and a review process, ensuring that collaborators do not overwrite each other's work.

Exam trap

The trap here is assuming that workspace revision history or DBFS provides the branching and merge capabilities needed for collaborative version control.

42
MCQeasy

When deploying a model to Databricks Model Serving, what is the recommended way to handle sensitive credentials like database connection strings?

A.Include credentials as environment variables in the model's conda.yaml file.
B.Store the credentials in an encrypted text file inside the model package.
C.Use Databricks Secrets to reference credentials within the serving environment.
D.Use a global variable within the model inference script.
AnswerC

Databricks Secrets allow you to reference sensitive information securely during deployment. This approach ensures that credentials remain encrypted at rest and in transit, and are only accessible by authorized users or service principals, aligning with enterprise security standards for cloud-based machine learning deployment workflows and infrastructure.

Why this answer

Using Databricks Secrets is the industry standard for managing sensitive information securely. By decoupling credentials from the model code or deployment configuration, you prevent hard-coding secrets which could be inadvertently exposed. This practice is vital for maintaining security compliance and protecting proprietary data access, as it enables centralized management, auditing, and rotation of keys without necessitating code changes in the model repository.

Exam trap

Candidates frequently choose environment variables or hardcoded strings for credentials, overlooking the security risks and the native Databricks Secrets utility designed for this.

43
MCQmedium

A data scientist has trained a scikit-learn model and logged it with MLflow. They now want to register the model in the Databricks Model Registry and transition it to the 'Production' stage. Which sequence of MLflow API calls should they use?

A.mlflow.register_model() then mlflow.tracking.MlflowClient().transition_model_version_stage()
B.mlflow.create_model_version() then mlflow.transition_model_stage()
C.mlflow.register_model() then mlflow.set_model_stage()
D.mlflow.log_model() then mlflow.register_model()
AnswerA

This sequence is correct: first register the model using mlflow.register_model(), which creates a new model version in the registry. Then use the MlflowClient's transition_model_version_stage() method to move that version to the 'Production' stage. This is the standard workflow for model lifecycle management in Databricks. The client provides methods to manage stages and transitions.

Why this answer

The correct workflow is to register the model with mlflow.register_model(), then use MlflowClient.transition_model_version_stage() to move the version to 'Production'. Other options use non-existent functions or omit the stage transition.

Exam trap

The trap here is using non-existent top-level functions like mlflow.set_model_stage() instead of the MlflowClient method.

44
MCQmedium

When sharing a Databricks ML experiment with another team, what is the best way to ensure they can reproduce your results exactly?

A.Sharing a screenshot of the training results.
B.Sharing the Git hash and the MLflow logged environment.
C.Exporting the model binary to a local CSV file.
D.Writing the code in a standard Jupyter notebook.
AnswerB

Sharing the specific Git commit hash ensures the exact code version is used, while the logged MLflow environment ensures that all dependencies and library versions match. This combination provides a complete manifest for reproducing the environment and the training logic, which is critical for consistent results across different platforms.

Why this answer

To ensure full reproducibility, you must log both the code version (often via Git hash) and the exact environment configuration (the Conda or pip environment) using MLflow. By capturing the library versions, the Python runtime environment, and the specific code state, you provide the necessary metadata for another environment to rebuild your exact setup, thereby guaranteeing that the same inputs will lead to the same model outputs consistently.

Exam trap

Candidates often think sharing the notebook alone is enough. They ignore that the environment (dependencies/versions) and the specific code snapshot (Git hash) are required for true reproducibility.

45
MCQhard

Which Databricks artifact should be used to encapsulate a model, its environment dependencies, and the required code to ensure consistent model behavior across different deployment environments?

A.A raw Python script that loads the model weights.
B.An MLflow model with a captured Conda or pip environment.
C.A Delta Table containing the trained model weights.
D.A Git repository containing the training notebook and data.
AnswerB

MLflow models include a configuration that specifies the required environment, including dependencies. This allows the model to be loaded reliably across different environments. By capturing the environment, MLflow ensures reproducibility and consistent inference, which is a fundamental requirement for deploying machine learning models into production systems with confidence.

Why this answer

An MLflow model flavor, specifically using the 'MLmodel' metadata file, provides a standard format for packaging models. By including the conda.yaml or requirements.txt file, MLflow captures all environment dependencies. This ensures that when the model is loaded in any environment (e.g., development, staging, production), the environment is reconstructed exactly, preventing version mismatches and runtime errors that frequently cause failed deployments in machine learning pipelines.

Exam trap

Candidates sometimes confuse raw model artifacts (like a pickle file) with the full MLflow package. They forget that the environment file is what prevents dependency hell in production.

46
MCQmedium

Your team is experiencing 'data drift' in production where the model's accuracy drops over time. What is the most recommended Databricks-native approach to address this?

A.Increase the size of the serving cluster to handle more data points.
B.Implement a retraining pipeline that is triggered when performance metrics drop.
C.Hard-code the input feature ranges in the inference function to filter out outliers.
D.Switch to a more complex model architecture to better fit the production data.
AnswerB

A robust ML workflow includes continuous monitoring and an automated retraining loop. When performance metrics drop, a pipeline should be triggered to retrain the model on the most recent data. This effectively mitigates data drift by keeping the model updated with the current characteristics of the production environment.

Why this answer

Addressing data drift involves monitoring incoming production data and comparing it against the training data distribution. By using Delta Lake's time-travel capabilities and MLflow's experiment tracking, teams can identify when and why model performance degrades. This proactive monitoring allows for timely retraining of the model with updated data, ensuring that production predictions remain accurate and aligned with the current real-world environment, which is vital for long-term model reliability.

Exam trap

Candidates may suggest manual retraining or ignoring the issue, failing to recognize that a systematic, data-driven approach using monitoring and automated triggers is the standard Databricks recommendation.

47
MCQeasy

A team wants to compare multiple model runs for a fraud detection project, view their metrics side by side, and identify which run produced the best area under the ROC curve. They have already logged each run with MLflow. Which Databricks capability should they use to perform this comparison?

A.The cluster event log filtered by Spark stage failures.
B.The MLflow experiment runs comparison view in the workspace.
C.The Delta transaction log for the training data table.
D.The Unity Catalog lineage graph for the feature tables.
AnswerB

MLflow experiments group related runs, and the experiment UI provides a comparison view where metrics such as area under the ROC curve can be sorted and charted across runs. This directly supports side-by-side evaluation and selecting the best-performing run, which is exactly the fraud detection team's goal after logging runs with MLflow.

Why this answer

MLflow experiments collect runs, and the experiment comparison view lets users sort, filter, and visualize metrics across runs. For a fraud detection project where runs are already logged, this view provides the side-by-side metric comparison needed to identify the best area under the ROC curve without additional tooling.

Exam trap

The trap here is confusing infrastructure or governance logs with the experiment UI that actually surfaces run metrics.

48
Multi-Selecthard

A machine learning team is using Databricks Feature Store to serve features for online inference. They need to ensure that the online store remains consistent with the offline store and supports low-latency lookups. Which two practices should they follow? (Choose two.)

Select 2 answers
A.Manually copy feature values from the offline store to the online store using a notebook.
B.Schedule regular updates to the online store to reflect changes in the offline feature table.
C.Disable automatic synchronization to reduce overhead.
D.Publish feature tables to the online store using the publish_table API or the FeatureStoreClient.
E.Use the online store as the primary source of truth for feature engineering.
AnswersB, D

Scheduling regular updates via jobs ensures that the online store stays in sync with the offline store as new data arrives. Without periodic refreshes, the online store would become stale, leading to inconsistent predictions. This practice is critical for maintaining feature freshness and consistency in production systems.

Why this answer

Publishing feature tables to the online store and scheduling regular updates are essential to keep online and offline stores consistent. The publish_table API automates the sync, and scheduled jobs ensure freshness. Manual copying, using the online store as primary, or disabling sync would compromise consistency and performance.

Exam trap

The trap here is assuming that the online store automatically stays in sync without any explicit publishing or scheduling, but it requires deliberate synchronization steps.

49
MCQeasy

A data scientist has trained a model using scikit-learn and wants to log it to MLflow for deployment. They need to ensure that the model can be served with the correct dependencies. Which MLflow function should they use to log the model?

A.`mlflow.log_metric()`
B.`mlflow.sklearn.log_model()`
C.`mlflow.register_model()`
D.`mlflow.log_artifact()`
AnswerB

`mlflow.sklearn.log_model()` logs a scikit-learn model in MLflow's native format, capturing the model's flavor, dependencies (via conda_env or pip_requirements), and signature. This enables seamless deployment with MLflow Models, including serving and scoring. It is the correct function for logging scikit-learn models.

Why this answer

`mlflow.sklearn.log_model()` is specifically designed to log scikit-learn models, capturing the model flavor, dependencies, and signature. This allows the model to be served or deployed with the correct environment. Other functions either log artifacts, metrics, or register an already logged model, none of which fulfill the logging requirement.

Exam trap

The trap here is confusing model logging with artifact logging or model registration, which serve different purposes in the MLflow lifecycle.

50
MCQeasy

What is the primary function of the 'Model Signature' in the context of Databricks MLflow?

A.To encrypt the model artifacts for secure transfer.
B.To define the schema and types for the model inputs and outputs.
C.To optimize the model for specific hardware architectures.
D.To store the git hash of the code used to train the model.
AnswerB

The signature serves as the contract between the model and the caller. It specifies the expected data structures, ensuring that any inference request is compatible with the model. This is fundamental to preventing runtime errors and ensuring that the model is used correctly by downstream applications and API services.

Why this answer

The Model Signature defines the schema of the inputs, outputs, and parameters of the model. It ensures that the model is invoked with data that matches its training assumptions, preventing runtime errors. By enforcing this schema, Databricks helps developers build more robust pipelines where data mismatches are caught early, rather than causing silent failures or errors during production inference.

Exam trap

Candidates often confuse model signatures with model metrics or parameter logs, assuming signatures evaluate accuracy instead of strictly validating input and output data types.

51
MCQeasy

A machine learning engineer is using MLflow to track experiments in Databricks. They want to record the hyperparameters used for each run so that they can compare runs later. Which MLflow method should they use to log a single hyperparameter?

A.`mlflow.log_metric()`
B.`mlflow.set_tag()`
C.`mlflow.log_param()`
D.`mlflow.log_artifact()`
AnswerC

`mlflow.log_param()` logs a single key-value parameter for the current run. It is the standard method for recording hyperparameters such as learning rate or number of trees, making them searchable and comparable across runs in the MLflow experiment UI.

Why this answer

`mlflow.log_param()` is the correct method to record hyperparameters for an MLflow run. It stores key-value pairs that are displayed in the experiment UI and can be used to filter and compare runs, which is essential for hyperparameter tuning.

Exam trap

The trap here is mixing up parameters and metrics; parameters are configuration inputs, while metrics are evaluation outputs, and MLflow provides separate methods for each.

52
MCQhard

An ML engineer deployed a model to a Databricks Model Serving endpoint and enabled inference tables. After a week, the team notices that some requests returned HTTP 200 but the corresponding rows in the inference table show null prediction values. They need to diagnose why predictions are missing for those requests. Which explanation is most consistent with this symptom?

A.The endpoint's autoscaling reduced replicas, causing dropped responses.
B.The model returned a response shape that the serving layer could not map to the prediction column.
C.The endpoint's service principal lacked SELECT permission on the inference table.
D.The inference table was configured with a sampling fraction that excluded those rows.
AnswerB

Inference tables log request and response payloads, and the serving layer extracts predictions based on the expected response structure. If the model returns a dict or array that does not match the expected prediction field, the endpoint can still return HTTP 200 while the logged prediction column is null. This mismatch between the model's output shape and the logging schema is a common cause of missing predictions in inference tables.

Why this answer

Inference tables capture request and response payloads for each served request, and the serving layer derives the prediction column from the model's response structure. When a model returns output in a format the logging layer does not recognize as a prediction, the request still succeeds with HTTP 200 but the logged prediction is null. Sampling, autoscaling, and read permissions produce different symptoms such as missing rows or errors, not present rows with null predictions.

Exam trap

The trap here is assuming a successful HTTP status guarantees a fully populated inference table row, when response-shape mismatches can leave the prediction column null.

53
Multi-Selectmedium

A team is preparing to deploy a registered MLflow model to a Databricks Model Serving endpoint. They want to capture every request and response for later monitoring and debugging, and they also want the endpoint to remain available during a rolling model version update. (Choose two.)

Select 2 answers
A.Enable verbose logging in the MLflow model's Python code and write logs to DBFS.
B.Enable inference tables on the serving endpoint.
C.Delete the existing endpoint and create a new one pointing at the new model version.
D.Configure the endpoint with zero-downtime updates by using a new model version in the same endpoint configuration.
E.Set the endpoint's `min_instances` to 0 to reduce cost during the update.
AnswersB, D

Inference tables automatically log request payloads and response payloads from a Model Serving endpoint into a Delta table in Unity Catalog. Enabling them satisfies the requirement to capture every request and response for monitoring and debugging, and the logged data can be queried directly with SQL for drift analysis or troubleshooting.

Why this answer

Capturing every request and response is achieved by enabling inference tables, which log payloads to a Delta table. Keeping the endpoint available during a model version change is achieved by updating the served version in place, which triggers a rolling update rather than endpoint deletion. Together these satisfy both the observability and availability requirements without downtime or manual log plumbing.

Exam trap

The trap here is assuming that deleting and recreating the endpoint is required to change model versions, when Model Serving supports in-place version updates with rolling rollout.

54
MCQmedium

A machine learning engineer is using MLflow on Databricks to track experiments for a fraud detection model. They notice that runs from two different team members are being logged into the same experiment, but the engineer wants to ensure that all runs from the current notebook session are automatically associated with a specific experiment. Which MLflow API call should the engineer use to set the active experiment for the current session?

A.mlflow.start_run(experiment_id="12345")
B.mlflow.set_tracking_uri("databricks")
C.mlflow.create_experiment("/Shared/fraud-detection")
D.mlflow.set_experiment("/Shared/fraud-detection")
AnswerD

This call sets the active experiment for the current session, so subsequent runs are logged there. It is the correct API to associate runs with a specific experiment path. The scenario requires ensuring all runs from the session go to a designated experiment, and set_experiment achieves that without needing to pass the experiment ID to each start_run call.

Why this answer

The correct API is mlflow.set_experiment, which sets the active experiment for the current session. This ensures that all subsequent runs are logged to the specified experiment without needing to pass the experiment ID to each run. It is the standard way to organize runs by project or team in Databricks.

Exam trap

The trap here is confusing setting the tracking URI with setting the active experiment; the former only points to the tracking server, not the specific experiment.

55
MCQmedium

A data scientist is using MLflow to track experiments on Databricks. They want to log a custom metric that is computed during model training and later compare it across runs using the MLflow UI. Which MLflow API call should they use?

A.mlflow.set_tag("custom_metric", value)
B.mlflow.log_artifact("custom_metric", value)
C.mlflow.log_param("custom_metric", value)
D.mlflow.log_metric("custom_metric", value)
AnswerD

mlflow.log_metric logs a numeric metric that can be tracked over time or across runs. Metrics are specifically designed for evaluation outputs such as accuracy, loss, or custom scores. This allows the MLflow UI to plot and compare the metric across runs, which is exactly what the data scientist needs for analysis.

Why this answer

The data scientist needs to track a numeric value computed during training and compare it across runs. MLflow provides specific APIs for different types of data: parameters for inputs, metrics for numeric outputs, tags for metadata, and artifacts for files. Using log_metric ensures the value is stored as a metric and can be visualized and compared in the MLflow UI.

The other APIs serve different purposes and would not provide the desired functionality.

Exam trap

The trap here is confusing metrics with parameters or tags, assuming any key-value logging will work for comparison.

56
MCQmedium

When designing a production-grade machine learning workflow, which THREE of the following are necessary to ensure the pipeline is observable and recoverable?

A.Use Delta Lake to version the training datasets.
B.Configure the job to automatically ignore all failures and continue.
C.Implement model checkpointing during the training process.
D.Log all training metrics and parameters to MLflow.
E.Run all jobs manually to avoid the risk of automation errors.
AnswerA, C, D

Delta Lake's time travel and versioning capabilities allow you to access the state of your data at any point in time. This is critical for reproducing training results and debugging data-related issues, as it ensures you can consistently train models on the exact same data as the original run.

Why this answer

Observability and recoverability are pillars of reliable MLOps. Comprehensive logging (via MLflow) provides the 'why' behind a model's state. Versioning datasets ensures you can recreate the input data if a model fails.

Finally, robust checkpointing during training allows the job to resume from the last successful state rather than restarting from scratch, saving significant time and resources when failures occur in large, long-running training jobs.

Exam trap

Test-takers frequently select general performance metrics like accuracy tuning as pillars of operational recoverability, confusing model optimization with infrastructure observability and job failure recovery mechanisms.

57
Multi-Selectmedium

An ML engineer is setting up a Databricks Job to retrain a production model nightly. The job must run only when upstream data validation succeeds, notify the team on failure, and avoid retraining when the input data has not changed. Which TWO capabilities of Databricks Jobs directly support these requirements? (Choose two.)

Select 2 answers
A.Cluster autoscaling to add workers when the training dataset grows
B.Job-level and task-level notifications that alert on failure or duration thresholds
C.Job compute configured with photon acceleration for the training tasks
D.Task dependencies with condition tasks to branch based on upstream task outcomes
E.Repair runs to rerun only failed tasks after a partial failure
AnswersB, D

Databricks Jobs support email, webhook, and other notifications configured per task or for the whole job, triggered on failure, success, or duration limits. Configuring failure notifications satisfies the requirement to inform the team when the nightly retraining pipeline breaks, complementing the branching logic that controls whether training runs at all.

Why this answer

Condition tasks provide the branching needed to run training only when validation passes and data has changed, while task and job notifications deliver the failure alerts. Together they implement the conditional retraining and notification requirements, whereas autoscaling, repair runs, and Photon address performance or recovery rather than control flow and alerting.

Exam trap

The trap here is treating performance features such as autoscaling or Photon as workflow controls, when conditional execution and alerting are handled by condition tasks and notifications.

58
MCQmedium

When logging a model, what is the significance of the 'code_path' parameter in mlflow.log_model?

A.It specifies the path to the Databricks notebook.
B.It includes additional local files/modules needed for the model to execute correctly.
C.It tells the system to generate a Git commit for the current training run.
D.It enables automatic unit testing of the model code.
AnswerB

Including necessary modules ensures that if the model uses custom classes or functions defined in separate scripts, they are serialized and saved alongside the model. This guarantees that when the model is loaded for inference, it finds all necessary definitions, preventing 'ModuleNotFound' errors or missing logic exceptions.

Why this answer

The 'code_path' parameter allows users to include additional local source code files or directories required by the model, such as custom preprocessing classes. By bundling these dependencies, the model remains self-contained and portable. This is essential when the inference code relies on custom logic defined in external modules, ensuring that those modules are correctly packaged and available whenever the model is loaded in a new runtime environment.

Exam trap

Candidates often confuse 'code_path' with 'artifacts', incorrectly assuming it refers to the model weights or training data instead of the source code modules required for execution.

59
MCQeasy

A machine learning engineer has a model registered in Unity Catalog and wants to expose it as a REST API so an external application can send JSON payloads and receive predictions. The team has no existing serving infrastructure. Which Databricks feature should be used to create this API?

A.A Databricks job that runs a notebook on a schedule and writes predictions to a table.
B.A Databricks SQL warehouse with a query that invokes the model as a user-defined function.
C.A Databricks Model Serving endpoint created from the registered model.
D.An MLflow experiment tracking run that logs the model's parameters and metrics.
AnswerC

Model Serving provisions a managed, autoscaling HTTP endpoint for a registered model and returns predictions from JSON request payloads. It requires no infrastructure work, handles scaling and versioning, and supports the request-response pattern the external application needs. Creating the endpoint from the Unity Catalog model is the direct way to obtain a REST API.

Why this answer

Model Serving is the Databricks capability that turns a registered model into a managed REST endpoint with autoscaling and request-response semantics. Scheduled notebook jobs, experiment tracking runs and SQL warehouses serve other purposes, so they cannot provide the low-friction HTTP API the external application needs for on-demand scoring.

Exam trap

The trap here is equating any way of running a model, such as a scheduled job or SQL function, with a serving endpoint that exposes an HTTP API.

60
MCQeasy

What is the primary benefit of using 'AutoML' in Databricks for a machine learning project?

A.Automatically replacing all human data scientists.
B.Automating the model training and tuning process.
C.Providing the only way to register models in Databricks.
D.Enabling the direct deployment of models without testing.
AnswerB

AutoML automates algorithm selection, hyperparameter tuning, and data preprocessing steps. This allows users to generate high-quality baseline models rapidly. By leveraging distributed computing, it explores the search space more effectively than manual methods, providing a reliable starting point for subsequent, more refined machine learning model development and deployment.

Why this answer

Databricks AutoML automatically explores various algorithms, hyperparameters, and preprocessing techniques to identify the best-performing model for a given dataset. This significantly accelerates the prototyping phase, allowing data scientists to establish a baseline model quickly. By automating the tedious parts of the machine learning pipeline, AutoML frees up time for data scientists to focus on complex feature engineering, business logic integration, and model interpretation rather than manual trial-and-error workflows.

Exam trap

Students often assume AutoML completely replaces data scientists by handling complex domain-specific feature engineering, whereas its primary role is automating baseline model training and tuning.

61
MCQeasy

A data scientist wants to compare the performance of three hyperparameter configurations for a Spark ML model. They need a central place to view metrics like RMSE and MAE across runs, and to filter runs by parameters. Which Databricks capability should they use?

A.Databricks Jobs with task dependencies
B.MLflow Tracking with the Databricks-hosted experiment UI
C.Databricks Feature Store
D.Databricks Model Registry
AnswerB

MLflow Tracking records parameters, metrics, and artifacts for each run. The Databricks-hosted MLflow experiment UI provides side-by-side run comparison, metric charts, and filtering by parameters. This directly satisfies the need to compare hyperparameter configurations using RMSE and MAE in a central place.

Why this answer

MLflow Tracking, accessed through the Databricks experiment UI, is the component that logs and visualizes run metrics, parameters, and artifacts. It enables filtering and side-by-side comparison of runs, which is exactly what the data scientist needs for evaluating hyperparameter configurations using RMSE and MAE.

Exam trap

The trap here is confusing the Model Registry or Jobs with the experiment tracking UI, when only MLflow Tracking provides run comparison and metric visualization.

62
MCQmedium

A team is building a Feature Store in Databricks. What is the primary advantage of using the Feature Store for training models compared to using raw Delta tables?

A.It automatically scales the compute cluster based on the number of features.
B.It prevents training-serving skew by using consistent feature engineering.
C.It eliminates the need for data cleaning before feature creation.
D.It allows models to be deployed directly to external cloud storage.
AnswerB

The Feature Store ensures that the transformations applied to data during training are identical to those applied during inference. This consistency is critical for maintaining model performance in production, as it guarantees that the model receives input data formatted exactly as it expects based on its training distribution.

Why this answer

The Feature Store provides a centralized repository for features, ensuring that the same feature engineering logic is used for both training and real-time inference. This eliminates training-serving skew, a common problem where the logic used during training differs from the logic used in production. This consistency is essential for model accuracy and reliability in dynamic production environments.

Exam trap

Students often believe the Feature Store is primarily a storage cost-saving optimization, missing its core purpose of resolving feature logic discrepancies between offline training and online serving.

63
MCQeasy

A data scientist finishes a training notebook and wants to capture the source code revision and the Git repository URL on the MLflow run so reviewers can reproduce the exact code state. The repository is already connected to the Databricks workspace through Git integration. Which mechanism records this information automatically?

A.Enabling autologging, which always injects Git metadata regardless of where the notebook is executed.
B.MLflow Git-based source tracking, which stores the repository URL and commit hash as run tags when the notebook runs from a Git folder.
C.Manually calling mlflow.set_tag() with a hand-copied commit hash after each training run.
D.Registering the model in Unity Catalog, which copies the workspace Git configuration into model version metadata.
AnswerB

When a notebook executes from a Databricks Git folder, MLflow records the Git repository URL and commit hash as run tags such as mlflow.source.git.repoURL and mlflow.source.git.commit. Reviewers can then check out that exact revision to reproduce the run. No manual logging call is needed, which is why this is the correct mechanism for the described requirement.

Why this answer

Databricks integrates Git folders with MLflow so that runs executed from a connected repository automatically receive source tags including the repository URL and commit hash. This gives reviewers a precise revision to check out for reproduction. Manual tagging is not automatic, autologging targets framework artifacts rather than Git metadata, and model registration does not populate run source tags.

Exam trap

The trap here is assuming autologging captures Git provenance, when Git source tags come from running the notebook inside a connected Git folder.

64
MCQmedium

A machine learning engineer has registered a model in the Databricks Model Registry and wants to expose it as a REST API with automatic scaling and no server management. The model's Python dependencies are captured in a conda environment file logged with the run. Which Databricks capability should the engineer use to serve this model with minimal operational overhead?

A.A Databricks job that runs the model on a schedule and writes predictions to a Delta table
B.Databricks Model Serving with a model version URI from the Model Registry
C.A SQL warehouse configured with the model's conda environment installed on all nodes
D.An all-purpose cluster running an MLflow model server process started manually
AnswerB

Databricks Model Serving directly consumes a registered model version URI, builds the serving environment from the logged conda dependencies, and exposes a REST endpoint with managed scaling. It requires no cluster or server administration, matching the requirement for minimal operational overhead while providing low-latency inference for the registered model.

Why this answer

Databricks Model Serving is the managed capability that takes a registered model version URI, reconstructs the environment from logged dependencies, and publishes a scalable REST endpoint without server administration. The other choices describe batch, interactive, or SQL compute that cannot deliver managed low-latency REST inference for a registered MLflow model.

Exam trap

The trap here is assuming any Databricks compute can host a model endpoint, when only Model Serving provides managed REST inference for registered model versions.

65
MCQmedium

A data scientist is tuning a scikit-learn random forest with Hyperopt in a Databricks notebook. Each trial trains on a 40 GB Delta table, and the scientist notices that every trial re-reads the full table from cloud storage, making the search slow. Which change best accelerates the hyperparameter search while preserving correctness?

A.Switch the search algorithm from the default TPE to Random Search to reduce per-trial overhead.
B.Enable adaptive query execution and rely on Spark to skip re-reading unchanged files automatically.
C.Load the Delta table into a Spark DataFrame once, cache it, and have each trial convert the cached data to pandas.
D.Increase max_evals so more trials run and the overhead is amortized.
AnswerC

Caching the Spark DataFrame materializes the data in cluster memory or local disk so subsequent trials reuse it instead of re-reading cloud storage. Each trial still converts the cached data to the pandas representation scikit-learn needs, preserving the exact training data and therefore correctness. This removes the dominant repeated I/O cost and is the standard way to speed up Hyperopt loops on Databricks.

Why this answer

Hyperopt runs many independent trials, and when each trial re-reads a large Delta table, storage I/O dominates runtime. Caching the Spark DataFrame once outside the objective function materializes the data so trials reuse it, while converting to pandas inside each trial keeps scikit-learn training identical. This preserves data and model semantics and removes the repeated read that made the search slow.

Exam trap

The trap here is tuning the search algorithm or trial count when the real bottleneck is repeated data reads that caching would eliminate.

66
MCQhard

Which THREE features are provided by the MLflow Model Registry to support model governance and deployment?

A.Automatic promotion of models to production based on accuracy.
B.Versioning of models to track changes over time.
C.Transitioning models between lifecycle stages such as Staging and Production.
D.Tagging models with metadata for easier organization.
E.Real-time model training based on incoming production data.
AnswerB, C, D

Versioning is a core capability of the Model Registry. Each time a model is registered, it receives a new version number. This enables teams to maintain historical records of model artifacts, allowing them to rollback to previous versions if a new model underperforms in production or experiences issues after deployment.

Why this answer

The Model Registry acts as the governance layer for machine learning. It supports versioning (to track history), stage transitions (to control promotion from staging to production), and tagging (for metadata management). These features are critical for regulatory compliance and operational stability, ensuring that teams can track exactly which model version is in production, who approved it, and what data it was trained on for auditability.

Exam trap

Candidates frequently select 'model training' or 'data preprocessing' as governance features, failing to distinguish between core MLflow tracking experiments and the specific governance capabilities provided by the Model Registry.

67
Multi-Selecthard

A data science team is deploying a model to a Databricks Model Serving endpoint. They want to enable inference logging to capture the input data and predictions for monitoring and debugging. Which TWO configurations are required to enable inference logging for a serving endpoint? (Choose two.)

Select 2 answers
A.Set the endpoint's workload size to at least 'Medium'.
B.Ensure the model signature includes a field for logging.
C.Specify a Delta table to store the inference logs.
D.Enable inference logging in the endpoint configuration.
E.Configure the model to output logs in JSON format.
AnswersC, D

Inference logging requires a target Delta table where the logs will be written. The table must be specified in the endpoint configuration, and the endpoint's service principal must have write permissions to it. This table stores the request and response data for monitoring.

Why this answer

To enable inference logging for a Model Serving endpoint, you must explicitly enable it in the endpoint configuration and specify a Delta table to store the logs. The endpoint's identity needs write access to that table. Other factors like workload size or model signature do not affect logging.

This allows capturing request and response data for monitoring and debugging.

Exam trap

The trap here is assuming that model-level configurations like output format or signature are needed for inference logging, when actually it is a serving endpoint feature requiring explicit enablement and a storage table.

68
Multi-Selecthard

An ML platform team is standardizing how models move from experimentation to production on Databricks. They want promotion decisions to be auditable and to prevent unvalidated models from serving live traffic. Which TWO practices align with Databricks Model Registry and Unity Catalog governance? (Choose two.)

Select 2 answers
A.Embed promotion logic entirely in notebook widgets so reviewers approve versions from the notebook UI.
B.Allow any team member with workspace access to register and promote models to reduce bottlenecks.
C.Rely on MLflow stages like Staging and Production to gate which model version receives live traffic.
D.Store models in Unity Catalog with a three-level name and control access using catalog, schema, and model privileges.
E.Use model aliases such as champion and challenger to mark the versions approved for serving and evaluation.
AnswersD, E

Unity Catalog governs models as securable objects, so privileges such as USE CATALOG, USE SCHEMA, and EXECUTE on the model determine who can load or serve them. This gives the platform team auditable, centralized access control instead of relying on workspace-local registry permissions, and it prevents unauthorized consumers from loading unvalidated versions in a governed environment.

Why this answer

Auditable promotion in Unity Catalog rests on governed model objects and movable aliases. Three-level names plus catalog, schema, and model privileges control who can read, write, and serve models, while champion and challenger aliases record which version is approved for production or evaluation. Together they let consumers reference a stable name that promotion workflows update, with every change visible in the registry and subject to access control.

Exam trap

The trap here is treating MLflow stages as the promotion mechanism for Unity Catalog models, when governed models use aliases and Unity Catalog privileges instead.

69
MCQmedium

A machine learning engineer is using MLflow to track a model training run on Databricks. They log a metric with mlflow.log_metric("accuracy", 0.95) and later want to retrieve it. They call mlflow.get_run(run_id) and access run.data.metrics. However, they find that the metrics dictionary is empty. What is the most likely reason?

A.The metric name contained uppercase letters, which are not allowed in MLflow.
B.The metric value was outside the allowed range, so MLflow silently dropped it.
C.The metric was logged with a step parameter, so it is stored in run.data.metrics as a list of values.
D.The metric was logged to a different run than the one being retrieved.
AnswerD

If the metric was logged to a different run, then retrieving the current run's data would show no metrics. This can happen if the active run was not set correctly or if the logging occurred in a different context. The other options do not explain an empty metrics dictionary for the specified run. Ensuring the correct run_id is used is essential.

Why this answer

An empty metrics dictionary when retrieving a run indicates that no metrics were logged to that specific run. This commonly occurs when the metric is logged while a different run is active, or when the run_id used for retrieval does not match the run where logging occurred. Verifying the active run and run_id resolves the issue.

Exam trap

The trap here is assuming that metrics are automatically associated with the most recent run, ignoring the possibility of logging to a different run context.

70
MCQhard

Refer to the exhibit. What is the most likely cause of this error in a deployed MLflow model?

A.The serving endpoint has reached its maximum memory capacity.
B.The client application is sending data that does not conform to the defined input schema.
C.The model has been corrupted during the transition to Production.
D.The serving endpoint is not authenticated to access the data.
AnswerB

The error message explicitly points to a schema mismatch where a 'string' was provided instead of a 'double'. This is a direct violation of the model signature, which governs the expected input data types. The client application must be updated to cast the data correctly before sending the request.

Why this answer

The error explicitly indicates a schema mismatch between the client's payload and the model's expected input signature. This frequently occurs when downstream applications send data without proper type casting. Validating the input data before sending it to the serving endpoint is a critical step in production MLOps to prevent type-related failures and ensure robust service interaction between disparate software components in a distributed architecture.

Exam trap

Candidates often blame the model code or the infrastructure environment for schema errors. They overlook the client-side payload, which is the most frequent source of input type mismatches in production.

71
MCQeasy

A data scientist is training a machine learning model and wants to ensure that the code version, model parameters, and artifacts are all linked to a specific execution. Which Databricks component is designed specifically for this purpose?

A.Databricks Feature Store
B.MLflow Tracking
C.Databricks Workflows
D.Unity Catalog
AnswerB

MLflow Tracking is the dedicated component for logging and querying experiments. It records parameters, metrics, code versions, and artifacts, providing a structured way to maintain reproducibility and lineage for every machine learning training run within the Databricks ecosystem, which is fundamental to robust model development workflows.

Why this answer

MLflow tracking is the component that logs the full lifecycle of a machine learning experiment. By capturing parameters, code versions (via git commit hashes), and resulting model artifacts, it provides a comprehensive audit trail. This is essential for machine learning operations as it allows teams to reproduce results, debug failures, and compare performance metrics between different training runs consistently across the platform.

Exam trap

Candidates often confuse MLflow Tracking with the Model Registry or Feature Store, assuming tracking manages deployment stages rather than logging experiment metadata and execution runs.

72
MCQmedium

A machine learning engineer is tuning a scikit-learn GradientBoostingClassifier on Databricks. They want to run 40 hyperparameter combinations, each trained on the full dataset, while keeping the driver free of model training work and collecting all results in a single MLflow parent run. Which approach should they use?

A.Use scikit-learn's GridSearchCV with n_jobs=-1 inside a single notebook cell.
B.Use Hyperopt with Trials and wrap the objective function in a Pandas UDF.
C.Launch 40 separate notebooks with dbutils.notebook.run and merge their runs afterward.
D.Use Hyperopt with the default SparkTrials and set max_evals to 40.
AnswerD

SparkTrials distributes each hyperparameter trial as a Spark job across worker nodes, so the driver is not consumed by model fitting. With MLflow autologging enabled, SparkTrials records each trial as a nested run under a single parent run, giving one consolidated view of all 40 evaluations. This is the native Databricks pattern for parallel single-node algorithm tuning at this scale.

Why this answer

Distributing many single-node model fits requires a mechanism that schedules each trial as cluster work rather than driver-local computation. SparkTrials in Hyperopt does exactly this, and with MLflow autologging each trial becomes a nested run beneath one parent run, satisfying both the parallelism and the consolidated tracking requirements in a single, supported pattern.

Exam trap

The trap here is assuming that any parallel search option, such as n_jobs=-1, distributes work across the cluster when it actually only uses the driver's local cores.

73
MCQmedium

Which approach is most efficient for deploying a high-throughput, low-latency model in Databricks?

A.Running a custom Flask app on a standard notebook
B.Using Databricks Model Serving
C.Batch processing using Spark streaming
D.Manual deployment to an external cloud VM
AnswerB

Databricks Model Serving provides a fully managed, low-latency API endpoint for models. It handles autoscaling, health monitoring, and infrastructure provisioning, making it the standard choice for production environments that require reliable performance and high throughput without the overhead of manually managing containerized inference servers or Kubernetes clusters.

Why this answer

Databricks Model Serving is the recommended service for production environments requiring low latency and high scalability. It automatically manages scaling and infrastructure, ensuring that models are served in a highly available manner. By abstracting away the server management and load balancing, it allows developers to focus on model performance rather than infrastructure maintenance, which is essential for maintaining service level agreements in production-grade ML applications.

Exam trap

Candidates often suggest using a standard Spark job or a notebook for low-latency serving. However, these lack the necessary infrastructure for production-grade, high-throughput REST API endpoints.

74
MCQeasy

A data scientist is using Databricks Feature Store to create a training dataset for a model. They define a feature table with a primary key and a timestamp key. After creating the training set, they notice that some feature values are missing in the output. What is the most likely cause?

A.The primary key of the feature table does not match the primary key of the training dataset.
B.The feature table was created without specifying a timestamp key, so point-in-time lookups could not be performed.
C.The feature table was not refreshed after new data was added, so the latest feature values are not available.
D.The training dataset was created using a time range that does not cover the timestamps of some feature values.
AnswerD

Feature Store performs point-in-time lookups based on the timestamp key. If the training dataset's time range does not encompass the timestamps of certain feature values, those values will be absent. This is a common issue when the feature table has data outside the specified range. The other options do not directly explain missing values in this context.

Why this answer

Feature Store uses point-in-time lookups based on the timestamp key to ensure training data reflects the state at the time of the label. If the training dataset's time range does not include the timestamps of certain feature values, those values will be missing. This is a common pitfall when defining the training set's time range too narrowly.

Exam trap

The trap here is assuming that missing feature values are always due to data quality issues, rather than the time range specified for the training dataset.

75
MCQhard

Why should you use a dedicated Feature Store for your ML workflows instead of just storing features as Delta tables?

A.It makes Delta tables run significantly faster during training.
B.It automatically cleans missing data in the raw tables.
C.It ensures consistency by linking features across training and inference.
D.It is the only way to store data in the Databricks platform.
AnswerC

The Feature Store provides a unified interface that ensures the same features used during training are accessed during serving. This consistency is the most important factor in avoiding training-serving skew, a common and difficult-to-debug issue where models perform perfectly in the lab but fail silently in production due to input differences.

Why this answer

While Delta tables provide high-performance storage, a dedicated Feature Store adds a metadata layer that tracks feature lineage, usage, and schema definitions. It ensures that the exact same feature logic is shared between training and inference pipelines. This consistency is critical for preventing training-serving skew, which is a major, often silent, cause of model performance degradation when moving from development to real-world production environments.

Exam trap

Many candidates believe standard Delta tables automatically handle feature reuse and lineage tracking across training and inference, missing the specific metadata consistency guarantees provided by a Feature Store.

Page 1 of 5

Page 2

All pages

Practice Databricks-ML-Assoc by domain

Target a specific domain to shore up weak areas.

See all domains with question counts →