Courseiva

Databricks Certified Machine Learning Associate (Databricks-ML-Assoc) — Questions 151–225

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

Page 2

Page 3 of 5

Page 4
151
MCQmedium

A machine learning engineer is orchestrating a multi-step training workflow on Databricks using Databricks Jobs. The workflow includes data preprocessing, model training, and evaluation. The engineer needs to ensure that the evaluation step runs only if the training step completes successfully, and that the preprocessing step runs first. Which feature of Databricks Jobs should be used to define these dependencies?

A.Repair run with task-level retries
B.Databricks Repos integration with Git
C.Job clusters with autoscaling enabled
D.Task dependencies using the depends_on field
AnswerD

Task dependencies in Databricks Jobs allow you to specify that a task runs only after its upstream tasks succeed. By setting the depends_on field, you create a directed acyclic graph (DAG) that enforces the order: preprocessing first, then training, then evaluation. This ensures that the evaluation step only runs if training succeeds, meeting the requirement.

Why this answer

Task dependencies via the depends_on field are the core mechanism in Databricks Jobs for orchestrating multi-task workflows. They allow you to specify that a task runs only after its upstream tasks complete successfully, enabling conditional execution. This directly satisfies the need to run preprocessing first, then training, and evaluation only if training succeeds.

Other options address compute scaling, failure recovery, or version control, not workflow dependencies.

Exam trap

The trap here is confusing job orchestration features like dependencies with cluster configuration or failure recovery mechanisms, which do not control task execution order.

152
MCQhard

A team has a Databricks Model Serving endpoint configured with scale-to-zero enabled and min_instances set to 0. During a load test, they observe that the first request after an idle period takes roughly 40 seconds while subsequent requests complete in under 200 milliseconds. They need to eliminate this cold-start latency for a customer-facing application without over-provisioning. Which configuration change best addresses the requirement?

A.Increase max_instances so more replicas can absorb the burst.
B.Increase the workload size from Small to Large.
C.Enable route optimization in the endpoint configuration.
D.Set min_instances to 1 so at least one instance stays warm.
AnswerD

Setting min_instances to 1 keeps one replica provisioned at all times, so the container and model are already loaded and the first request after an idle period is served without a cold start. This is the documented way to trade a small amount of always-on compute for predictable low latency, and it does not require scaling the endpoint beyond what the workload needs during quiet periods.

Why this answer

Cold-start latency occurs because a scaled-to-zero endpoint must provision a container and load the model before serving the first request. Keeping one replica always available by setting min_instances to 1 removes that provisioning and loading delay while still allowing the endpoint to scale up under load. Increasing max_instances, changing workload size, or enabling routing features does not prevent the endpoint from scaling to zero during idle periods.

Exam trap

The trap here is confusing max_instances, which governs burst capacity, with min_instances, which governs whether any replica stays warm when traffic drops to zero.

153
MCQeasy

Which Databricks ML component is best suited for managing access control for machine learning experiments and models across different teams?

A.Notebook tags.
B.Unity Catalog.
C.Environment variables in the cluster config.
D.The 'git commit' history.
AnswerB

Unity Catalog provides a unified, centralized governance solution for data and machine learning assets. It enables administrators to manage permissions and access control for experiments and models, ensuring security and compliance across the workspace. It is the definitive standard for access governance in the modern Databricks lakehouse architecture.

Why this answer

Unity Catalog is the centralized governance layer in Databricks. It allows administrators to define fine-grained access controls for experiments and models, ensuring that sensitive IP is protected and that users only have access to what they need. Implementing Unity Catalog is a best practice for security and compliance, ensuring that model assets are governed as strictly as the underlying data they rely on.

Exam trap

Test-takers often choose workspace-level access control lists (ACLs) or notebook permissions instead of Unity Catalog when asked about comprehensive governance across teams.

154
Multi-Selecthard

Which THREE of the following are supported methods for serving machine learning models in Databricks?

Select 3 answers
A.Real-time REST API endpoints
B.Manual model training in a local Excel file
C.Batch inference via Spark jobs
D.SQL user-defined functions (UDFs)
E.Streaming model updates to public web hosting
AnswersA, C, D

Real-time model serving provides a low-latency, scalable REST endpoint. It is the ideal method for serving predictions to web applications or mobile apps that require immediate responses, effectively managing the infrastructure and load balancing to ensure high availability and consistent performance for production-ready machine learning services.

Why this answer

Databricks provides multiple pathways for model serving, catering to different latency and throughput requirements. Real-time serving provides low-latency REST endpoints for interactive applications. Batch inference allows for high-throughput processing on large datasets using Spark.

Finally, user-defined functions (UDFs) allow for embedding model logic directly into SQL or DataFrame transformations, which is highly useful for integrating machine learning models within existing data engineering pipelines and analytics workflows.

Exam trap

Candidates often overlook SQL user-defined functions (UDFs) as a valid model-serving method, incorrectly assuming serving is restricted solely to REST APIs or batch jobs.

155
MCQmedium

What is the primary role of an 'MLflow Signature' during the model deployment phase?

A.To encrypt the model artifacts for security
B.To define the input and output schema for validation
C.To determine the optimal number of cluster nodes
D.To compress the model for faster deployments
AnswerB

The signature specifies the required input features and the output format. This metadata is used by the serving endpoint to validate incoming JSON requests, ensuring they match the expected schema. This prevents invalid data from causing failures during the inference process, which is critical for production stability.

Why this answer

The MLflow signature acts as a contract between the model and the application that consumes it. By defining expected input types and shapes, the signature enables automatic validation of incoming payloads before they reach the model. This prevents runtime errors, such as type mismatches or missing features, and ensures that the serving endpoint remains robust and reliable when receiving production traffic from various sources.

Exam trap

Candidates often mistake the signature for a security feature or an authentication method. They fail to recognize it is primarily a schema contract for data validation.

156
MCQmedium

A data scientist is deploying a model to a Databricks Model Serving endpoint. They observe that the inference latency is high. What should they check first?

A.The number of users accessing the workspace.
B.The complexity of the input data and preprocessing transformations.
C.The version of the Databricks Runtime installed on the cluster.
D.The storage location of the training dataset.
AnswerB

Preprocessing steps executed during inference are a frequent cause of latency. If the data requires complex joins, heavy transformations, or slow library calls, this will add directly to the total latency. Ensuring that these transformations are optimized or pre-calculated is usually the most effective way to reduce overall request latency.

Why this answer

High inference latency is often caused by heavy preprocessing steps or unoptimized model complexity. Checking the 'inference profile' or analyzing the time taken for data transformation versus the actual model prediction is the most critical first step. By separating these concerns, the data scientist can identify whether the bottleneck lies in the feature engineering pipeline (which might need optimization) or the model architecture itself, enabling targeted performance improvements.

Exam trap

Candidates immediately assume the ML model itself is unoptimized, failing to investigate expensive inline data transformations occurring before the model receives the payload.

157
MCQeasy

A data scientist wants to test a newly registered model version interactively before promoting it to production. They need to send a sample request to the model and inspect the prediction and the model's input schema. Which Databricks feature should they use?

A.The Databricks Jobs UI run history for the training job.
B.The Serving tab of the registered model in Unity Catalog, which provides a test request interface.
C.The `mlflow.pyfunc.load_model` function in a notebook.
D.The Model Registry's version description field.
AnswerB

The Serving tab in the model version UI provides an interactive interface where a user can send a sample request to the model and view the response. It also displays the model signature, including input and output schema, so the data scientist can confirm expected fields before promoting the version to production.

Why this answer

The Serving tab on a registered model version in Unity Catalog offers a built-in test interface. It lets the user submit a sample request, see the prediction, and review the model signature that defines expected inputs and outputs. This provides a quick validation step before the version is promoted or attached to a production endpoint.

Exam trap

The trap here is confusing notebook-based model loading with the serving test interface, when only the Serving tab exercises the actual serving path and shows the signature.

158
MCQmedium

A data scientist is training a scikit-learn model on a Databricks cluster using MLflow. To enable automatic logging of parameters, metrics, and models, they call mlflow.sklearn.autolog() before fitting the model. After the run completes, they notice that the model artifact is stored in the run's artifact location but is not registered in the MLflow Model Registry. What is the most likely reason for the model not being registered?

A.The model registration failed because the cluster does not have the necessary permissions to write to the Model Registry.
B.The autolog() function does not log models for scikit-learn; it only logs parameters and metrics.
C.The autolog() function logs the model but does not register it; registration requires either specifying registered_model_name in autolog() or manually registering the model.
D.The model was not registered because the MLflow run was not associated with a registered model name.
AnswerC

This is correct because mlflow.sklearn.autolog() logs the model artifact to the run but does not automatically register it in the Model Registry unless the registered_model_name argument is provided. By default, autolog only logs to the experiment's artifact store. To register, one must either pass registered_model_name to autolog or call mlflow.register_model after logging.

Why this answer

Autologging in MLflow captures parameters, metrics, and models but does not automatically register them in the Model Registry. To register, you must specify a registered model name either when calling autolog or when logging the model. Without that, the model remains only as an artifact in the run.

This is a common point of confusion for practitioners expecting end-to-end automation.

Exam trap

The trap here is assuming that autologging includes model registration, when in fact registration is a separate step that requires an explicit model name.

159
MCQmedium

Which technique should be used to prevent data leakage in ML workflows when performing cross-validation on time-series data?

A.Random sampling with replacement across the entire dataset.
B.Standard k-fold cross-validation with 5 folds.
C.Expanding window cross-validation (time-series split).
D.Removing all features that have high correlation with the target variable.
AnswerC

Expanding window validation maintains the temporal order of the data. By training on a chronologically growing window and testing on the subsequent period, you simulate real-world usage where the model predicts the future based on past data, correctly preventing leakage and ensuring reliable evaluation of the model's accuracy.

Why this answer

In time-series forecasting, standard k-fold cross-validation is inappropriate because it would allow the model to 'see' the future during training, leading to overly optimistic performance estimates. Instead, 'time-series split' or 'walk-forward' validation should be used, where the training set only consists of data points that occur chronologically before the validation set. This preserves the temporal order, providing a realistic assessment of the model's performance on unseen future data.

Exam trap

Candidates often apply standard k-fold cross-validation to time-series data, failing to realize that random splitting causes look-ahead bias, which invalidates the model's performance metrics.

160
MCQeasy

A data scientist wants to track the progress of a training script that runs for several hours on a Databricks cluster. The script uses MLflow and needs to record metrics such as loss and accuracy at the end of each epoch so they can be visualized in real time. Which MLflow API call should be used inside the training loop?

A.mlflow.log_param
B.mlflow.set_tag
C.mlflow.log_metric
D.mlflow.log_artifact
AnswerC

mlflow.log_metric logs a numeric value for a named metric and can be called repeatedly with the same metric name, optionally specifying a step. MLflow stores each value with its timestamp and step, enabling the UI to render a live-updating chart of loss and accuracy per epoch. This is the standard way to track training progress in real time.

Why this answer

To record metrics like loss and accuracy at each epoch for real-time visualization, the training loop should call mlflow.log_metric. This API accepts a metric name, a numeric value, and an optional step, and MLflow stores each call as a data point. The MLflow UI plots these points as a time-series chart, allowing progress monitoring during long training runs.

Exam trap

The trap here is confusing parameters, artifacts, and tags with metrics; only mlflow.log_metric produces the numeric time-series data that MLflow charts over steps or time.

161
MCQmedium

Refer to the exhibit. What is the effect of using the 'registered_model_name' parameter in the 'log_model' function?

A.It restricts access to the model to the current user only.
B.It automatically promotes the model to the 'Production' stage.
C.It registers a new version of the model in the MLflow Model Registry.
D.It forces the model to be saved in a specific S3 bucket.
AnswerC

Passing the 'registered_model_name' parameter triggers an automated entry into the registry. If the model name already exists, it creates a new version; if it does not, it creates a new registered model. This is the standard, efficient way to integrate logging with artifact management in the Databricks environment.

Why this answer

Including 'registered_model_name' automatically registers the model in the MLflow Model Registry as part of the logging process. This simplifies the deployment pipeline by eliminating the need to manually promote the model later. It creates a new version entry directly in the registry, ensuring that the model is immediately available for staging or production assignment, which is a best practice for streamlined machine learning operations.

Exam trap

Candidates often believe that registering a model requires a separate, manual step after training, failing to realize that the 'registered_model_name' parameter automates this during the logging process.

162
MCQeasy

A data scientist is developing a model on Databricks and wants to use MLflow to track experiments. They create a new experiment using mlflow.create_experiment('my_experiment') and then run mlflow.start_run(). However, when they log parameters and metrics, they notice that the run is not associated with 'my_experiment' but with the default experiment. What is the most likely reason?

A.The experiment was created in a different workspace, so the run cannot be associated with it.
B.The mlflow.start_run() function requires an experiment_id argument to associate the run with a specific experiment; without it, the run goes to the default experiment.
C.The experiment name 'my_experiment' is invalid because it contains an underscore; MLflow experiment names must be alphanumeric.
D.The mlflow.create_experiment() function only creates the experiment but does not set it as the active experiment; they must call mlflow.set_experiment() to use it.
AnswerD

This is correct because mlflow.create_experiment() creates a new experiment and returns its ID, but it does not change the active experiment. To log runs to that experiment, you must call mlflow.set_experiment() with the experiment name or ID. Without that, mlflow.start_run() uses the default experiment (usually the notebook's experiment). This is a common mistake when setting up experiments programmatically.

Why this answer

Creating an experiment with mlflow.create_experiment() does not automatically set it as the active experiment for subsequent runs. You must explicitly call mlflow.set_experiment() to designate the experiment for logging. Otherwise, runs default to the notebook's experiment or the default experiment.

This separation allows flexible experiment management but requires an extra step.

Exam trap

The trap here is assuming that creating an experiment also makes it the active one, when in fact you must set it explicitly.

163
MCQmedium

You are building a pipeline where a feature table must be updated daily. Which Databricks construct is the most appropriate for orchestrating this periodic feature engineering job?

A.MLflow Experiments
B.Databricks Jobs
C.Unity Catalog
D.MLflow Model Registry
AnswerB

Databricks Jobs provide the scheduling and orchestration logic required to run feature engineering pipelines automatically. By defining a workflow with dependencies and timing, you can guarantee that the Feature Store is updated correctly every day, ensuring downstream models have access to the latest data.

Why this answer

Databricks Workflows (Jobs) are the recommended tool for orchestrating multi-step data processing tasks, including feature engineering pipelines. By scheduling a Job, you can automate the ingestion, transformation, and write operations to the Feature Store. This ensures that features are refreshed consistently, minimizing data drift and enabling reliable model training or batch inference processes that depend on the most recent feature values.

Exam trap

Candidates rely on external cron jobs or standard notebook scheduling instead of leveraging the native orchestration capabilities built into the platform.

164
MCQeasy

A data scientist is working in a Databricks notebook and wants to use MLflow to log a trained scikit-learn model. They want to ensure that the model can be loaded later for inference. What is the correct MLflow function to log the model?

A.mlflow.log_artifact
B.mlflow.sklearn.log_model
C.mlflow.log_model
D.mlflow.register_model
AnswerB

mlflow.sklearn.log_model is the correct function to log a scikit-learn model in MLflow. It saves the model in a format that includes the model's dependencies and can be loaded later with mlflow.sklearn.load_model. This ensures the model can be used for inference. It also records the model signature and input example if provided.

Why this answer

To log a scikit-learn model, use mlflow.sklearn.log_model. This function captures the model, its dependencies, and optionally a signature, making it easy to load later with mlflow.sklearn.load_model. It is the standard way to persist scikit-learn models in MLflow, ensuring reproducibility and compatibility with model serving.

Exam trap

The trap here is confusing generic artifact logging or model registration with flavor-specific model logging, which is required for proper model persistence.

165
MCQmedium

A data scientist is training a machine learning model on Databricks and needs to ensure that every experiment run is automatically tracked, including parameters, metrics, and model artifacts. Which component should the scientist use to achieve this with minimal code changes?

A.Databricks Feature Store
B.MLflow Model Registry
C.MLflow Tracking with autologging
D.Databricks SQL Warehouse
AnswerC

MLflow Tracking provides a unified interface for recording experiments. Enabling autologging allows the framework to automatically log parameters, metrics, and artifacts when using compatible libraries. This significantly reduces boilerplate code, ensuring that all relevant experiment metadata is captured consistently for every training run executed within the notebook environment.

Why this answer

MLflow Tracking is the core component of the Databricks Machine Learning platform designed for logging experiments. By leveraging the autologging feature, the platform automatically captures parameters, metrics, and model signatures without requiring manual instrumentation for most popular frameworks like Scikit-learn or PyTorch. This ensures reproducibility and enables easy comparison of model performance across different runs, which is essential for managing model lifecycles in a production-oriented machine learning environment.

Exam trap

Candidates manually write custom logging code for every metric and parameter, missing the efficiency of automated tracking features built into MLflow.

166
MCQmedium

A data scientist has registered a model in the Databricks Model Registry. They want to transition the model from 'Staging' to 'Production' but need to ensure that only specific users can perform this transition. Which Databricks feature should they use to enforce this access control?

A.Cluster access control lists (ACLs).
B.Unity Catalog volume permissions.
C.Workspace-level secret scopes.
D.Model Registry permissions with stage-level access control.
AnswerD

Databricks Model Registry supports stage-level permissions, allowing you to grant users or groups the ability to transition models to specific stages. By setting permissions on the model, you can restrict who can move a model to Production. This is the correct feature to enforce access control for model stage transitions.

Why this answer

The Model Registry provides granular permissions at the model level, including the ability to restrict stage transitions. By configuring stage-level access control, administrators can ensure that only authorized users can move a model to Production. Other features like cluster ACLs, secret scopes, and volume permissions do not govern model registry operations.

Exam trap

The trap here is confusing cluster or data access controls with model registry permissions, assuming that broader workspace permissions automatically apply to model stages.

167
MCQmedium

A team is transitioning their model development from a single notebook to a production-grade ML pipeline. Which Databricks feature should they use to manage and coordinate this end-to-end process?

A.Databricks Feature Store.
B.Databricks Workflows.
C.MLflow Model Registry.
D.Databricks SQL.
AnswerB

Workflows provides the orchestration engine to chain notebooks and other tasks into reliable, scalable production pipelines. It supports scheduling, alerting, and parameter passing between tasks, making it the standard tool for moving machine learning projects from prototype notebooks to automated production systems within the Databricks ecosystem.

Why this answer

Databricks Workflows allows for the creation of multi-task pipelines that can run notebooks, Python scripts, or JARs in a defined order. This is essential for professional ML development, where data preprocessing, training, and evaluation need to happen sequentially. Moving from ad-hoc notebooks to controlled workflows improves reliability, allows for dependency management, and enables scheduling, which is critical for continuous integration and delivery of machine learning models.

Exam trap

Candidates frequently choose standard Apache Spark jobs or MLflow tracking features instead of Databricks Workflows for multi-task orchestration and pipeline scheduling.

168
MCQmedium

A data scientist has registered a scikit-learn model in Unity Catalog and now wants to serve it behind a Databricks Model Serving endpoint. The model's MLflow signature records a pandas DataFrame input with three named columns. The team wants the endpoint to reject malformed requests automatically rather than silently scoring them. Which action should the data scientist take?

A.Enable inference tables on the endpoint so malformed records are flagged in the Delta table and excluded from scoring.
B.Register the model with a new signature that uses a tensor spec instead of a DataFrame spec so the endpoint validates each element.
C.Add a Python preprocessing script that parses the raw JSON and raises an error for unexpected fields, then deploy that script as the endpoint's model.
D.Create the endpoint with the registered model version; Model Serving enforces the logged MLflow signature and schema validation by default.
AnswerD

Model Serving reads the MLflow signature stored with the registered model version and uses it to validate incoming payloads against the expected DataFrame schema. Requests whose columns or types do not match are rejected before inference runs, satisfying the requirement without extra configuration.

Why this answer

When a model is logged with an MLflow signature, Databricks Model Serving uses that signature to validate incoming requests. A pandas DataFrame signature with named columns causes the endpoint to check column names and types, rejecting payloads that do not conform. No custom preprocessing or inference table configuration is required, because validation happens at the serving layer before the model is invoked.

Exam trap

The trap here is assuming that schema validation requires custom code or inference tables, when Model Serving already enforces the logged MLflow signature automatically.

169
MCQmedium

A team queries a Databricks Model Serving endpoint through the serving client and receives an error indicating the endpoint is not ready. They confirmed the endpoint exists. Which condition most directly explains why requests fail until it clears?

A.The endpoint is in a state such as Updating or Not Ready while its configuration is being applied or a replica is still building.
B.The caller's personal access token has expired.
C.The model version referenced by the endpoint has been deleted from the registry.
D.The serving client is using the wrong workspace URL for the endpoint.
AnswerA

Endpoints move through provisioning and updating states, and during those transitions the service may reject requests because no ready replica can serve them. Once the endpoint reaches Ready, traffic is accepted. This is the most direct explanation for an existing endpoint returning a not-ready error, and it clears without any client-side change.

Why this answer

When an endpoint is being created or its configuration is being applied, it passes through transitional states and cannot serve requests until at least one replica is ready. A not-ready error for an endpoint known to exist points to that provisioning or updating state, which resolves on its own once the deployment completes and the endpoint reports Ready.

Exam trap

The trap here is attributing a not-ready response to an authentication or registry problem, when it actually reflects the endpoint's own lifecycle state while replicas are still being provisioned.

170
MCQmedium

When deploying a model to a production endpoint, what is the best practice for handling dependencies?

A.Manually install dependencies in the cluster terminal
B.Include a requirements.txt file in the model artifact
C.Use the 'latest' tag for all library imports
D.Only use libraries that come pre-installed in the Databricks Runtime
AnswerB

Including a requirements.txt file or letting MLflow capture the environment ensures that the serving environment mirrors the training environment. This is the standard method to maintain consistency, allowing the Databricks serving infrastructure to install the correct package versions during the initial container build and deployment process.

Why this answer

The best practice is to ensure all dependencies are explicitly defined in the MLflow model artifact. Using custom environment files or letting MLflow infer them ensures that the production container is built using the exact versions of packages used in training. This minimizes the risk of production-level errors caused by version mismatches, ensuring stability and reproducibility across the model lifecycle in the Databricks ecosystem.

Exam trap

Candidates often assume that the environment is handled automatically by the cluster. They forget that production endpoints need explicit, version-controlled dependency manifests like requirements.txt to ensure consistency.

171
MCQeasy

A data scientist has trained a model and wants to deploy it for real-time inference with automatic scaling and without managing infrastructure. Which Databricks feature should they use?

A.Databricks SQL endpoint
B.Databricks Model Serving
C.A standalone Flask app on a Databricks cluster
D.MLflow Model Registry
AnswerB

Databricks Model Serving provides a fully managed, serverless endpoint for real-time inference. It automatically scales based on traffic and requires no infrastructure management. You can enable it directly from the Model Registry or via the serving UI, making it the correct choice for this scenario.

Why this answer

Databricks Model Serving is the managed solution for deploying MLflow models as scalable REST endpoints. It handles provisioning, scaling, and monitoring, so the data scientist can focus on the model. It integrates with the Model Registry and supports real-time inference without infrastructure overhead.

Exam trap

The trap here is confusing the Model Registry, which stores model versions, with Model Serving, which actually hosts the model for predictions.

172
MCQmedium

A data scientist needs to track parameters, metrics, and model artifacts during training on Databricks. Which component is the primary tool for managing the entire lifecycle of these ML experiments?

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

MLflow Tracking provides an API and UI to log parameters, code versions, metrics, and output files when running machine learning code. It acts as the central repository for experiment data, allowing users to compare runs and manage the lifecycle of machine learning models within Databricks workspaces.

Why this answer

MLflow Tracking is the dedicated component within Databricks for recording experiments. By logging parameters, metrics, and artifacts, data scientists can reproduce results and compare different model versions effectively. This is crucial for maintaining model lineage and ensuring reproducibility across distributed training jobs in production environments.

MLflow is integrated natively into the Databricks platform, providing a seamless experience for tracking machine learning workflows from experimentation to final deployment.

Exam trap

Candidates often confuse MLflow Tracking with the Model Registry. While the Registry manages versions and lifecycle stages, Tracking is specifically for logging metrics, parameters, and artifacts during the actual training execution.

173
MCQmedium

Why is it important to use a 'Feature Store' rather than joining raw tables directly in the training notebook?

A.It is faster to write raw SQL joins.
B.It prevents training-serving skew by centralizing feature logic.
C.It automatically deletes old training data.
D.It prevents the use of any non-SQL data sources.
AnswerB

The Feature Store provides a consistent implementation of feature transformations. By retrieving features from the store during both training and inference, you guarantee that the logic is identical, which prevents performance degradation caused by discrepancies between how data was processed in training versus real-time production inference.

Why this answer

Using a Feature Store ensures that feature engineering logic is consistent and reusable across different models, preventing 'training-serving skew'. Joining raw tables in a notebook often leads to 're-implementation drift', where the code used in training differs slightly from the production inference pipeline. A Feature Store enforces a single source of truth for features, making models more reliable and reducing the time spent on redundant data cleaning tasks.

Exam trap

Test-takers frequently choose answers related to query performance speed, missing that the fundamental engineering concern addressed by a Feature Store is training-serving skew through centralized logic.

174
Multi-Selecthard

A data scientist is monitoring model drift in Databricks. Which TWO approaches are recommended to detect performance degradation in a production model?

Select 2 answers
A.Regularly compare current prediction metrics against the baseline training metrics.
B.Delete the original training data to force the model to learn new patterns.
C.Monitor feature distributions for statistically significant changes compared to training data.
D.Automate model retraining to run every hour, regardless of drift.
E.Manually inspect every prediction in the production logs for errors.
AnswersA, C

Comparing current metrics against baseline metrics is the standard way to detect concept drift. When performance metrics like F1-score or RMSE drop significantly from the training baseline, it serves as a strong indicator that the model no longer accurately represents the current data distribution, necessitating a retraining process.

Why this answer

Monitoring model drift is essential to ensure the continued accuracy of production models. Comparing current model performance metrics against a baseline established during training allows for proactive retraining. Similarly, tracking the distribution of input features (data drift) helps identify changes in data patterns that may undermine the model's reliability.

Combining these methods ensures a comprehensive view of the model's health and readiness for redeployment or adjustment.

Exam trap

Candidates often focus only on model performance metrics while ignoring the input data. They fail to realize that data drift is a leading indicator of future model performance degradation.

175
Multi-Selecthard

A team is deploying a batch scoring pipeline that loads a registered MLflow model and runs predictions over a large Delta table using Spark. They want the scoring job to reuse the model's training-time preprocessing and to remain reproducible months later. Which two practices should they follow? (Choose two.)

Select 2 answers
A.Reference the model by its numeric version when loading it in the batch job, so the exact artifact used in validation is always retrieved.
B.Load the model using the `latest` alias so the batch job always benefits from the most recent improvements automatically.
C.Log the model with `mlflow.pyfunc.log_model` (or framework flavor) including the model signature and input example so the schema and preprocessing are captured with the artifact.
D.Store the preprocessing code in a separate notebook and import it at scoring time so the batch job and training job share the same functions.
E.Convert the model to a pickle file, store it in a Delta table as a binary column, and load it via Spark at scoring time.
AnswersA, C

Loading a specific numeric version pins the job to an immutable artifact, guaranteeing that reruns months later use the identical weights and preprocessing. This is the standard way to achieve reproducibility for batch scoring, and it complements the signature metadata. Relying on a moving alias would instead silently change behavior whenever the alias is reassigned, breaking reproducibility.

Why this answer

Reproducible batch scoring requires an immutable artifact reference and self-describing metadata. Logging the model with a signature and input example embeds schema and preprocessing, while loading a specific numeric version pins the exact artifact so reruns match validation. Moving aliases, external notebook imports, and raw pickles all introduce drift or lose the metadata needed to reproduce training-time behavior.

Exam trap

The trap here is treating an alias like a version pin, when aliases intentionally move and therefore cannot provide the immutability that reproducible batch scoring requires.

176
Multi-Selecthard

A data scientist is using MLflow to track experiments on Databricks. They want to compare multiple runs and identify the best performing model based on a custom metric. Which TWO features of MLflow can be used to achieve this? (Choose two.)

Select 2 answers
A.MLflow tracking API's search_runs method
B.MLflow UI's compare runs feature
C.MLflow Projects with a custom entry point
D.MLflow Model Registry's stage transitions
E.MLflow's automatic logging with autolog()
AnswersA, B

The MLflow tracking API provides the search_runs method, which allows programmatic querying of runs filtered and sorted by metrics. You can specify an order_by clause on a custom metric to retrieve the top-performing runs. This enables automated comparison and selection of the best model based on the custom metric.

Why this answer

The MLflow UI's compare runs feature and the tracking API's search_runs method both allow you to compare runs and sort by custom metrics. The UI provides a visual side-by-side comparison, while search_runs enables programmatic querying and sorting. Together, they enable identifying the best performing run based on a custom metric.

Exam trap

The trap here is confusing MLflow features that manage models or automate logging with those that actually compare runs and sort by metrics.

177
MCQmedium

A data scientist is using MLflow on Databricks to log a scikit-learn model. They call mlflow.sklearn.log_model(model, 'model') and then inspect the run. They notice the model artifact is stored, but the run does not appear in the Models page of the workspace. They did not call any model registration function. What is the most likely reason the model is not listed in the Models page?

A.The model must be registered in the Model Registry using mlflow.register_model() or the model_signing/registration API before it appears in the Models page.
B.The model must be logged using mlflow.pyfunc.log_model() instead of mlflow.sklearn.log_model() to be visible in the Models page.
C.The model artifact is stored in the run but not in the workspace's default model store, so it cannot be displayed.
D.MLflow only shows models in the Models page if the run is part of an experiment with a specific tag.
AnswerA

The Models page in Databricks displays models registered in the Model Registry, not just logged artifacts. Logging a model with mlflow.sklearn.log_model() only stores artifacts in the run; to appear in the Models page, the model must be registered, which creates a model version and associates it with a registered model name.

Why this answer

The Models page in Databricks shows models that have been registered in the Model Registry. Logging a model with mlflow.sklearn.log_model() stores the artifact in the run but does not create a registered model. To make the model visible, the data scientist must register it, for example by using mlflow.register_model() or the model registry UI/API.

Exam trap

The trap here is assuming that logging a model automatically registers it in the Model Registry and makes it appear in the Models page.

178
MCQeasy

Which Databricks component is specifically designed to manage the full lifecycle of machine learning models, including registration, versioning, and stage transitions?

A.Delta Lake
B.MLflow Model Registry
C.Unity Catalog
D.Databricks Feature Store
AnswerB

The MLflow Model Registry is the designated tool for versioning, deploying, and managing the lifecycle of machine learning models in Databricks. It allows teams to track model lineage, manage stage transitions, and ensure that deployments are consistent, audited, and easily reversible, which is a fundamental requirement for production-grade MLOps pipelines.

Why this answer

The MLflow Model Registry provides a centralized model store, APIs, and UI to collaboratively manage the full lifecycle of MLflow models. It handles versioning, stage transitions (e.g., Staging to Production), and model annotations. This component is essential for operationalizing machine learning, as it provides a single source of truth for model artifacts and ensures that only validated models are promoted to production environments after passing necessary checks.

Exam trap

Candidates often confuse MLflow Tracking with the Model Registry, failing to distinguish between tracking experiments and managing the formal lifecycle of production-ready model versions.

179
MCQeasy

What is the primary function of the 'Model Signatures' in MLflow?

A.To act as a digital watermark for security.
B.To define the input/output schema for the model.
C.To encrypt the model artifacts.
D.To identify the author of the model.
AnswerB

Model Signatures explicitly declare the data schema, including column names and types for inputs and the expected output. This allows for automated validation, ensuring that the model receives the correct input structure and preventing runtime errors in production environments where data quality is dynamic and unpredictable.

Why this answer

Model Signatures define the expected data types and structure for the inputs and outputs of a machine learning model. This metadata is crucial for data validation and automated infrastructure testing in Databricks. By enforcing this schema, you ensure that the serving layer can validate incoming requests against the model's expectations, which significantly reduces runtime errors and improves the overall reliability of production machine learning applications within the workspace.

Exam trap

Candidates confuse model signatures with model performance metrics or hyperparameters, forgetting that signatures define the explicit data schema for inputs and outputs.

180
MCQeasy

When designing an ML workflow, what is the primary benefit of using MLflow Projects over executing raw scripts?

A.They automatically scale the underlying compute cluster size based on the task.
B.They allow for the automatic versioning and tracking of data snapshots.
C.They facilitate consistent execution by encapsulating environment and dependency definitions.
D.They replace the need for unit testing individual functions within the pipeline.
AnswerC

MLflow Projects use a project specification file to define dependencies, allowing the environment to be recreated reliably. This ensures that the same code runs identically on any environment, which is vital for professional ML workflows where consistency between development, staging, and production environments is mandatory for reliable model results.

Why this answer

MLflow Projects provide a standard format for packaging reusable data science code. By using a YAML-based environment definition, they ensure that the code runs in the exact same environment across different machines. This is critical for ML workflows to guarantee reproducibility, as it eliminates the 'it works on my machine' problem by explicitly defining the dependencies and environment setup required for the project execution in a portable, platform-agnostic manner.

Exam trap

Candidates often mistake MLflow Projects for simple code versioning tools like Git, failing to recognize that their primary purpose is environment and dependency encapsulation to solve reproducibility issues.

181
Multi-Selecthard

Which THREE factors should be considered when choosing the 'workload size' (e.g., Small, Medium, Large) for a Databricks Model Serving endpoint?

Select 3 answers
A.The memory requirements of the model artifact
B.The total number of users in the workspace
C.Expected request latency targets
D.The volume of expected incoming traffic
E.The color scheme of the MLflow UI
AnswersA, C, D

The model artifact size and its runtime memory consumption directly dictate the minimum compute resources needed. If the model requires more RAM than the chosen workload size provides, the endpoint will fail to load or experience frequent crashes. Assessing memory usage during the testing phase is critical for size selection.

Why this answer

Selecting the correct workload size is a trade-off between latency requirements, compute costs, and the model's resource footprint. Larger models with high parameter counts often require 'Large' configurations to prevent memory exhaustion or high tail latency. Conversely, smaller models may perform adequately on 'Small' instances, which are cost-effective.

Monitoring the endpoint's resource utilization metrics is key to right-sizing the deployment and ensuring optimal performance within the budget constraints.

Exam trap

Candidates often select cost or model accuracy instead of operational metrics like memory footprint, traffic volume, and latency targets when sizing endpoints.

182
Multi-Selectmedium

A data scientist is using MLflow tracking on Databricks to log a model training run. They want to capture the model's hyperparameters, evaluation metrics, and the trained model artifact so that the run can be reproduced and the model can be deployed later. Which two MLflow API calls should they use to log the model artifact and its input/output schema? (Choose two.)

Select 2 answers
A.mlflow.log_artifact("model.pkl")
B.mlflow.log_param("max_depth", 10)
C.mlflow.sklearn.log_model(sk_model, "model", signature=signature)
D.mlflow.models.signature.infer_signature(X_train, y_train)
E.mlflow.log_metric("accuracy", 0.95)
AnswersC, D

This call logs a scikit-learn model with a specified signature, which defines the input and output schema. It also captures the model's flavor and dependencies, enabling later loading and deployment. Including the signature allows tools like MLflow Model Serving to validate input data and provide schema hints. This is the correct way to log a model artifact along with its schema in MLflow.

Why this answer

To log a model artifact with its schema, the scientist should use a model-specific logging method like mlflow.sklearn.log_model with a signature argument, and generate that signature using mlflow.models.signature.infer_signature. Together, these capture the model, its flavor, dependencies, and input/output schema, enabling deployment and validation. Generic artifact, metric, or param logging calls do not provide the model and schema metadata.

Exam trap

The trap here is thinking that logging a model file as a generic artifact is sufficient, when MLflow requires a model-specific logging API and a signature for schema enforcement.

183
MCQmedium

A data scientist is training a Random Forest model on a 500GB dataset using Databricks. They notice the training process is slow and memory-intensive on a single worker node. Which approach should they take to optimize the training process?

A.Increase the driver node memory to accommodate the full dataset during training.
B.Convert the dataset to a single massive CSV file stored on DBFS to improve I/O speeds.
C.Use the Spark MLlib Random Forest implementation which natively supports distributed training.
D.Enable local caching for all input features to minimize data shuffling.
AnswerC

Spark MLlib Random Forest is specifically built to handle large datasets by distributing both the data and the computation across the cluster. It parallelizes the construction of decision trees, allowing the model to be trained on datasets that exceed the memory capacity of any individual worker node in the cluster.

Why this answer

Utilizing Spark MLlib's distributed training capabilities allows the Random Forest algorithm to partition data across the cluster nodes rather than relying on a single executor. This significantly reduces the memory overhead per node and parallelizes the tree-building process. Understanding this mechanism is vital for scaling ML workflows on Databricks, as it shifts the bottleneck from local memory constraints to cluster-wide compute resources, facilitating the processing of large-scale datasets efficiently.

Exam trap

Candidates often assume that standard Scikit-Learn code will automatically scale by simply running it on a larger Databricks cluster, failing to recognize that single-node libraries cannot parallelize across Spark workers.

184
MCQmedium

A data scientist needs to deploy a model to Databricks Model Serving. Which component is strictly required to be logged in MLflow to enable the 'Model Serving' feature?

A.The model's training accuracy metrics
B.The model signature defining input and output schema
C.A Unity Catalog registered function
D.A dedicated high-concurrency cluster
AnswerB

The model signature provides the necessary schema metadata for the serving endpoint. This allows Databricks to enforce input validation for all incoming REST API requests. By defining the signature during the log_model call, you ensure the serving container knows how to translate JSON payloads into the correct format.

Why this answer

Databricks Model Serving requires a model artifact to be logged with a signature. The signature defines the expected input schema, which allows the serving endpoint to validate incoming requests. Without a signature, the model cannot be correctly parsed by the serving infrastructure, preventing the deployment from starting.

This ensures that the production inference endpoint operates with expected data formats, maintaining reliability in downstream applications.

Exam trap

Candidates often believe that logging the model object alone is sufficient for serving. They overlook the signature, which is mandatory for the serving endpoint to validate input schemas.

185
MCQhard

A machine learning engineer is using MLflow to track experiments on Databricks. They want to compare multiple runs and identify the best model based on a custom metric called 'weighted_f1'. They have logged this metric using mlflow.log_metric('weighted_f1', value) for each run. When viewing the experiment in the MLflow UI, they notice that the runs are not sorted by 'weighted_f1' and the metric does not appear in the runs table. What is the most likely cause?

A.The metric name 'weighted_f1' contains an underscore, which is not allowed in MLflow metric names.
B.The metric was not logged because the run was not active; mlflow.log_metric() only works within an active run context.
C.The metric was logged, but the MLflow UI runs table does not automatically display all metrics; the engineer must manually add the 'weighted_f1' column to the table.
D.The metric was logged with a step value, causing it to be treated as a time-series metric and not displayed in the runs table by default.
AnswerC

This is correct because the MLflow UI runs table only displays a subset of metrics by default, typically those logged most frequently or a predefined set. To see a custom metric like 'weighted_f1', the user must click on the 'Columns' button and select it. Until then, it won't appear, and sorting by it is not possible. This is a common oversight when working with custom metrics.

Why this answer

The MLflow UI runs table does not show all logged metrics by default; it shows a default set. Custom metrics must be explicitly added as columns to be visible and sortable. The metric is likely logged correctly, but the UI configuration hides it.

This is a frequent source of confusion when comparing runs with custom evaluation metrics.

Exam trap

The trap here is assuming that any logged metric automatically appears in the runs table, when in fact the UI requires manual column selection for custom metrics.

186
MCQmedium

You are training a scikit-learn model with MLflow in a Databricks notebook. The model's preprocessing includes a custom Python function that you wrote in the notebook. You need to register the model to the Databricks Model Registry and later deploy it with Model Serving, ensuring the preprocessing is applied automatically at inference. Which approach should you use?

A.Register the model with the sklearn flavor, and configure a pre-processing hook in the Model Serving endpoint configuration.
B.Log the preprocessing function as a separate artifact using mlflow.log_artifact, and reference it from the model's conda environment.
C.Log the model with mlflow.sklearn.log_model, passing the custom preprocessing function in the signature parameter.
D.Wrap the preprocessing and model in an mlflow.pyfunc.PythonModel subclass, and log it with mlflow.pyfunc.log_model.
AnswerD

A custom PythonModel encapsulates the preprocessing code and the trained model in a single artifact. When logged with mlflow.pyfunc.log_model, MLflow serializes the class and its dependencies into the model directory, so Model Serving loads and executes the preprocessing automatically at inference. This is the supported pattern for custom inference logic in Databricks.

Why this answer

To ensure custom preprocessing runs at inference time, the logic must be packaged inside the logged model artifact. Subclassing mlflow.pyfunc.PythonModel and logging with mlflow.pyfunc.log_model bundles the preprocessing code with the trained model, so Model Serving executes it automatically. Other approaches either misuse parameters, store code without wiring it into scoring, or assume unsupported endpoint hooks.

Exam trap

The trap here is assuming that logging a function as an artifact or passing it to the signature parameter makes MLflow execute it during inference, when only code packaged inside the model artifact is actually run.

187
MCQmedium

A fraud detection team wants their Databricks Model Serving endpoint to log every request and response payload to a Unity Catalog Delta table so analysts can later join predictions with ground-truth labels. Which endpoint capability should they enable?

A.Delta Live Tables pipelines attached to the endpoint's event stream.
B.Model monitoring with a Lakehouse Monitor created on the endpoint's metrics.
C.Verbose cluster logs enabled on the underlying serving compute.
D.Inference tables, configured with the endpoint's request and response logging.
AnswerD

Inference tables capture the request payload, the response, and associated metadata into a Delta table in Unity Catalog. Enabling this on the endpoint gives the fraud team an auditable record of each scored transaction that can be joined later with confirmed fraud labels. This is the native, governed mechanism for payload-level observability on Model Serving endpoints.

Why this answer

Inference tables are the supported way to persist per-request payloads and responses from a Model Serving endpoint into a governed Delta table. Because the table lives in Unity Catalog, downstream jobs can join captured predictions with delayed fraud labels to measure real-world performance. This closes the loop between online scoring and offline evaluation without custom logging code in the model.

Exam trap

The trap here is confusing monitoring tools that summarize metrics with the payload capture mechanism that records raw requests and responses.

188
Multi-Selectmedium

A platform team is rolling out a new Databricks Model Serving endpoint for a churn model. They must ensure the endpoint can be queried by an external application and that only authorized callers can invoke it. Which TWO actions should they take? (Choose two.)

Select 2 answers
A.Expose the endpoint only through a cluster-scoped init script that writes the scoring URL into the application's configuration.
B.Grant the calling principal permission on the served model or endpoint and issue a Databricks personal access token or OAuth token for authentication.
C.Disable authentication on the endpoint so the external application can call the REST API without credentials.
D.Enable inference tables on the endpoint so that requests are logged and therefore implicitly authenticated.
E.Create a service principal, grant it appropriate permissions, and have the external application authenticate as that service principal.
AnswersB, E

Model Serving endpoints are protected by Databricks authentication and Unity Catalog or workspace permissions. Granting the caller permission and supplying a bearer token ensures requests are authenticated and authorized. This combination is the supported way to expose an endpoint to an external application while enforcing access control, satisfying both the reachability and the authorization requirements in the scenario.

Why this answer

Securing an endpoint for external use requires both an authenticated identity and a permission grant. A service principal with an OAuth token is the preferred machine identity, and granting it permission on the endpoint or served model enforces authorization. Using a personal access token for a human or service identity works similarly.

Together these actions let the external application reach the endpoint while ensuring unauthorized callers are rejected.

Exam trap

The trap here is assuming that enabling logging or another observability feature provides access control, when authentication and permissions must be configured explicitly.

189
MCQhard

A machine learning team is using Databricks Feature Store to serve features for a real-time model. They have a feature table that is updated daily with new data. To ensure the online store always has the latest feature values for low-latency inference, which approach should they take?

A.Publish the feature table to an online store using the Databricks Feature Store UI or API, and schedule daily updates.
B.Use the Feature Store's automatic online store synchronization by enabling a Delta Live Tables pipeline.
C.Configure the model to query the offline feature table directly during inference, caching results in memory.
D.Create a materialized view of the feature table in Databricks SQL and use that for online serving.
AnswerA

Publishing to an online store (e.g., DynamoDB, Cosmos DB) enables low-latency lookups. Scheduling daily updates ensures the online store is refreshed with the latest feature values from the offline table. This is the standard pattern for real-time serving with Feature Store, as it synchronizes the online store with the offline source.

Why this answer

To serve features in real time with low latency, the feature table must be published to an online store, which is a key-value store optimized for fast lookups. Scheduling daily updates ensures the online store reflects the latest data. Other approaches like querying the offline table or using materialized views introduce latency and are not designed for online serving.

Thus, publishing and scheduling updates is the correct strategy.

Exam trap

The trap here is assuming that Delta Live Tables or materialized views automatically provide online serving; in reality, you must explicitly publish to an online store.

190
MCQhard

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 column. They then create a training set using create_training_set with the feature table and a label DataFrame. They notice that the training set contains null values for some features, even though the feature table has no nulls. What is the most likely reason for the nulls in the training set?

A.The timestamp column in the feature table is not sorted in ascending order, causing point-in-time lookups to fail and return nulls.
B.The feature table was created without specifying a timestamp column, so Feature Store cannot perform point-in-time lookups and returns nulls.
C.The primary key columns in the feature table and label DataFrame do not match in data type, causing join failures and nulls.
D.The label DataFrame contains timestamps that are earlier than the earliest timestamp in the feature table, so no feature values exist for those times.
AnswerD

Point-in-time lookups retrieve the feature values that were valid at the time of the label event. If the label timestamp is earlier than any feature timestamp in the feature table, there is no feature data available, resulting in nulls. This is a common issue when the feature table does not cover the full time range of the labels.

Why this answer

In point-in-time feature lookups, Feature Store retrieves the most recent feature values as of the label timestamp. If the label timestamp precedes all feature timestamps for a given primary key, no feature value exists, resulting in nulls. This occurs when the feature table's time range does not cover the label events' times, often because the feature data starts later than the labels.

Exam trap

The trap here is assuming that nulls indicate a join failure or data type mismatch, when the real cause is that the label timestamps are earlier than any available feature data.

191
MCQmedium

When evaluating a machine learning model, what is the main purpose of creating a separate evaluation dataset in Databricks?

A.To increase the speed of training by reducing the data size.
B.To prevent overfitting and assess generalization capability.
C.To ensure that the model training pipeline satisfies storage requirements.
D.To provide the necessary training data for the model to converge.
AnswerB

The evaluation dataset is specifically used to check how well the model generalizes to new data. By testing on unseen data, the engineer can detect overfitting and refine the model parameters. This is a critical step in the model development cycle for ensuring reliable predictions in production scenarios.

Why this answer

The evaluation dataset (or validation set) is vital for assessing model performance on data it has not encountered during training. This prevents overfitting, where the model learns the training data by heart but fails to generalize. Using a separate dataset provides a realistic estimate of the model's performance on future, unseen data, which is essential for making informed decisions before deploying the model to production environments.

Exam trap

Test-takers sometimes select options related to increasing training speed or tuning hyperparameters, confusing evaluation datasets with training sets or validation loops.

192
MCQmedium

A machine learning engineer is using Hyperopt with SparkTrials on Databricks to tune a gradient boosting model. They notice that the tuning process is taking longer than expected and want to optimize resource utilization. They have a cluster with 8 worker nodes. Which configuration should they adjust to allow SparkTrials to run more trials in parallel?

A.Increase the max_evals parameter to run more evaluations sequentially
B.Set the spark.task.cpus configuration to a higher value to allocate more CPUs per task
C.Use the Trials class instead of SparkTrials to enable distributed tuning
D.Set the parallelism parameter in SparkTrials to a higher value, up to the number of Spark task slots
AnswerD

The parallelism parameter in SparkTrials controls the maximum number of trials to run concurrently. By default, it is set to the number of Spark executors, but you can increase it up to the total number of task slots. With 8 workers, increasing parallelism can better utilize the cluster and speed up tuning. This is the correct adjustment for resource utilization.

Why this answer

SparkTrials parallelism determines how many trials run concurrently. By default, it equals the number of Spark executors. Increasing it up to the number of task slots allows more trials to run in parallel, better utilizing the cluster and reducing tuning time.

Exam trap

The trap here is confusing max_evals with parallelism; max_evals controls total trials, not concurrent trials, and increasing it won't speed up tuning if parallelism is low.

193
MCQhard

A team trains a model with Databricks Feature Store features and logs the training set using feature_lookups. At inference time, they want the model to automatically retrieve the same feature values from the online store so the serving endpoint does not require the caller to supply those features. What must the team do when logging the model so this automatic lookup works?

A.Wrap the model in a PythonModel that calls the Feature Store client inside its predict method
B.Publish the feature table with a primary key and enable streaming on the source Delta table
C.Log the model with the feature engineering client's log_model and include the feature_lookups used during training
D.Register the model in Unity Catalog and grant the serving endpoint EXECUTE on the registered model
AnswerC

The feature engineering client's log_model records the feature lookups alongside the model artifact, so the model metadata knows which feature tables and lookup keys to use. When the model is served with online store access, the endpoint resolves those features itself, meaning callers only provide the primary keys and the model fetches the remaining feature values automatically.

Why this answer

When a model is logged through the feature engineering client with the same feature lookups used during training, the model metadata carries the information needed to resolve those features from the online store at serving time. Callers then only supply primary keys, and the endpoint assembles the full feature vector automatically, keeping training and inference feature logic consistent.

Exam trap

The trap here is believing that registry access grants or feature table publication enable automatic feature retrieval, when only recorded feature lookups in the logged model provide that behavior.

194
MCQeasy

A data scientist is using MLflow Tracking in Databricks to compare multiple runs of a hyperparameter tuning experiment. They want to quickly identify the run with the lowest validation loss and then register that model version in the MLflow Model Registry. Which MLflow UI feature allows sorting runs by a specific metric to find the best run?

A.The runs table, where you can click on the metric column header to sort runs ascending or descending.
B.The experiment notes field, where you can manually record the best run ID.
C.The model registry page, which automatically sorts models by their latest version's metrics.
D.The run comparison view, which displays all runs side-by-side with their metrics.
AnswerA

The runs table in the MLflow UI lists all runs and allows sorting by any metric column. Clicking the column header sorts runs by that metric, enabling quick identification of the run with the lowest validation loss. This is the most efficient way to find the best run for registration.

Why this answer

The runs table in the MLflow UI provides a sortable list of all runs, with columns for parameters and metrics. Clicking a metric column header sorts runs by that metric, making it easy to spot the run with the lowest validation loss. This is the standard workflow for selecting the best run to register.

Exam trap

The trap here is confusing the run comparison view with the runs table, as both show metrics but only the runs table supports sorting.

195
MCQhard

An ML engineer is configuring a Databricks Job to retrain a model daily. The job must run a notebook that reads from a feature table, trains a model, and registers it to the Model Registry. The engineer wants to ensure that the job fails immediately if the model's accuracy drops below a threshold. Which approach should they use?

A.Configure the job to send an email alert if accuracy is below threshold, but allow the job to succeed.
B.Add a task that runs a Python script to query the MLflow API and raise an exception if accuracy is below threshold.
C.Use Databricks Model Serving to monitor the model's accuracy and automatically roll back if it drops.
D.Set a timeout on the training task so that it fails if accuracy is not reached within a time limit.
AnswerB

Adding a task that checks the model's accuracy via MLflow API and raises an exception will cause the job to fail if the threshold is not met. This is a straightforward way to enforce a quality gate within the job's task graph, ensuring that subsequent tasks or the job itself fail.

Why this answer

To make the job fail when accuracy is below a threshold, the engineer should add a task that evaluates the metric and raises an exception. This task can run after training and before registration, ensuring the job stops and no subpar model is registered. This is a common pattern for implementing quality gates in ML pipelines.

Exam trap

The trap here is confusing monitoring or alerting with job failure; only a task that raises an exception will cause the job to fail.

196
Multi-Selectmedium

Which TWO of the following are primary benefits of using the Databricks Feature Store for machine learning workflows?

Select 2 answers
A.Eliminating training-serving skew by using the same feature definitions for both training and inference.
B.Providing a platform for distributed model training using Spark MLlib exclusively.
C.Enabling discovery and reuse of features across different teams and projects.
D.Automating the deployment of machine learning models to production environments.
E.Directly replacing the need for SQL-based data warehousing in Databricks.
AnswersA, C

By using a centralized Feature Store, the same logic applied to generate training data is utilized during production inference. This consistency is vital to prevent performance degradation caused by discrepancies between training data preparation pipelines and real-time production feature lookup processes, ensuring higher model accuracy.

Why this answer

The Databricks Feature Store facilitates feature reuse across teams and prevents training-serving skew. By centralizing features, organizations ensure that the exact data used during model training is consistently applied during real-time inference. This eliminates the need for redundant feature engineering pipelines and provides a unified lineage, which is essential for auditability and ensuring that models perform reliably across different production environments.

Exam trap

Candidates often choose 'faster training' as a benefit. While Feature Store helps, its primary value is consistency (preventing skew) and collaboration (reusability), not necessarily increasing the speed of the training process itself.

197
Multi-Selectmedium

An ML engineer is configuring a Databricks Job to automate nightly retraining of a model. The job must (1) run only after the upstream feature engineering job succeeds, and (2) notify the team via email if the training task fails. Which TWO configurations satisfy these requirements? (Choose two.)

Select 2 answers
A.Use a schedule with a cron expression that triggers the training task five minutes after the feature engineering job is expected to finish, and enable email alerts on failure.
B.Configure the training task with a depends_on entry referencing the feature engineering task, and add an email notification for the job's failure event.
C.Add a task dependency so the training task depends on the upstream feature engineering task, and configure an email notification on the job for failed runs.
D.Chain the notebooks by calling dbutils.notebook.run from the training notebook to invoke the feature engineering notebook, and rely on the notebook's exception handling to email the team.
E.Set up an MLflow webhook that triggers the training notebook whenever a new model version is registered, and configure the webhook to send email on failure.
AnswersB, C

The depends_on field in a Databricks Job task definition enforces that the referenced upstream task completes successfully before the dependent task runs. Pairing that with a job-level email notification on failure satisfies both the ordering and alerting requirements, making this a correct configuration for the scenario.

Why this answer

Databricks Jobs provide first-class task dependencies via depends_on, which guarantees a downstream task runs only after its upstream task succeeds, and job-level notifications that can email the team on failure. These native features satisfy both the ordering and alerting requirements without custom code or fragile timing assumptions.

Exam trap

The trap here is relying on time-based scheduling or notebook chaining to enforce order, when only a declared task dependency guarantees the upstream job succeeded first.

198
MCQhard

An ML engineer runs an automated hyperparameter sweep with MLflow on a Databricks cluster. The sweep launches 200 runs, and the engineer wants to retrieve, in a notebook, the run ID of the single run that achieved the highest validation accuracy so it can be registered. Which approach correctly identifies that run?

A.Call mlflow.get_run(run_id) for each run created by the sweep and compare the metrics in Python.
B.Use mlflow.list_experiments() and select the experiment with the most runs, then register its latest version.
C.Use mlflow.search_runs() with an experiment ID, order by metrics.validation_accuracy descending, and take the first row's run_id.
D.Read the MLflow experiment's artifact location from DBFS and parse the meta.yaml files to find the highest metric.
AnswerC

search_runs() returns a pandas DataFrame of run metadata and metrics for an experiment. Ordering by the validation accuracy metric in descending order places the best run first, and its run_id column gives the identifier needed for registration. This is the supported programmatic way to query runs and works with the order_by argument using the metrics.<name> syntax.

Why this answer

To find the best run across many, the tracking API must be queried with a metric sort. mlflow.search_runs() supports order_by on metrics.<name> and returns a DataFrame whose first row, when sorted descending, is the top-scoring run. Its run_id can then be passed to registration. Fetching individual runs or reading raw artifact files cannot rank the sweep and relies on unsupported or incomplete data.

Exam trap

The trap here is reaching for get_run() or filesystem parsing to find the best run, when the tracking API's search_runs() is the supported way to sort runs by metric.

199
Multi-Selectmedium

A data scientist is using Databricks Feature Store to build training sets and wants to ensure the features used at training time are consistent with those served at inference time. Which TWO practices help guarantee this consistency? (Choose two.)

Select 2 answers
A.Disable feature lineage tracking to reduce metadata overhead during training.
B.Recompute features with different SQL logic at serving time to optimize latency.
C.Publish the same feature computations into the online store so low-latency serving reads identical values.
D.Copy feature values into a CSV file and load it in the serving notebook.
E.Create a training set with create_training_set so the model records feature lineage and lookups.
AnswersC, E

The online store holds materialized feature values for low-latency lookups and is populated from the same feature tables used for training. Publishing to the online store ensures the inference path retrieves the values defined by the same computation, preventing drift between offline training features and online serving features, which is the core consistency guarantee the Feature Store provides.

Why this answer

Consistency comes from reusing the same feature definitions and lookups across training and serving. Creating a training set with create_training_set preserves lineage so models know which features to retrieve, and publishing the same computations to the online store ensures low-latency serving reads values produced by identical logic, eliminating train/serve skew.

Exam trap

The trap here is believing that reimplementing features for serving speed is acceptable, when it actually creates train/serve skew.

200
MCQmedium

When developing a model, a data scientist uses the MLflow 'pyfunc' flavor to wrap their model. What is the primary benefit of using this approach?

A.It automatically converts the model into a Spark UDF for faster distributed batch inference.
B.It enables the model to be saved and loaded in a consistent, standardized format across different frameworks.
C.It optimizes the model size by removing unnecessary metadata during the serialization process.
D.It provides built-in hyperparameter tuning capabilities for the wrapped model.
AnswerB

Pyfunc is a universal interface that allows any Python-based model to be saved and loaded using the same MLflow APIs. By defining a custom predict method, it masks the specific framework implementation, enabling a uniform deployment interface for models built with disparate libraries like Scikit-Learn, PyTorch, or custom code.

Why this answer

The 'pyfunc' flavor provides a generic, standardized wrapper for models. This is crucial because it allows any model—regardless of the library (scikit-learn, XGBoost, PyTorch)—to be deployed in the same way. By providing a common predict method, 'pyfunc' ensures that downstream serving infrastructure can interact with the model without knowing the underlying library's specific API, which is vital for standardized model deployment pipelines.

Exam trap

Test-takers often assume the pyfunc flavor converts deep learning models into scikit-learn models, rather than understanding it simply provides a uniform wrapper and standard predict interface.

201
Multi-Selectmedium

Which TWO of the following practices are recommended when performing feature engineering on Databricks using Feature Store to ensure consistency between training and inference?

Select 2 answers
A.Hardcode all feature transformation logic directly into the model training notebook.
B.Register feature tables in the Databricks Feature Store with unique primary keys.
C.Calculate features in real-time within the model inference endpoint only.
D.Use the Feature Store client to join features with training data using lookup keys.
E.Avoid using time-based features to ensure the model remains simple.
AnswersB, D

Assigning unique primary keys to feature tables is essential for the Feature Store to perform accurate lookups during the model inference phase. These keys enable the service to retrieve the correct feature values for specific entities, ensuring that the model receives consistent inputs regardless of whether it is training or inferring.

Why this answer

Feature Store ensures that the exact same transformation logic used during model training is accessible during low-latency inference. By utilizing the Feature Store's unified interface, data scientists prevent training-serving skew, which is a common cause of poor model performance in production. This practice promotes reproducibility and streamlines the deployment pipeline by decoupling data preparation from model training code, ensuring that production features are calculated reliably using the same definitions as training features.

Exam trap

Candidates often select manual data joins or custom local scripts, ignoring Feature Store client lookups and primary keys that guarantee consistency.

202
MCQeasy

Which Databricks component should be used to track parameters, code versions, metrics, and output files when running machine learning experiments?

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

MLflow Tracking provides the API and UI to log parameters, code versions, metrics, and artifacts during model training. It is the essential tool for managing experimental data in Databricks, enabling users to keep track of their progress and compare different model versions during the training and hyperparameter tuning cycles.

Why this answer

MLflow Tracking is the primary component for logging the inputs and outputs of machine learning runs. It allows data scientists to organize experiments and compare performance across different iterations. By centralizing this information, teams can ensure reproducibility and visibility into the model development process, which is foundational for maintaining high-quality machine learning workflows and facilitating collaboration within the Databricks environment.

Exam trap

Candidates often confuse MLflow Model Registry with MLflow Tracking, selecting the registry for experiment logging when Tracking is specifically designed for parameters, metrics, and code versioning.

203
MCQhard

A machine learning engineer is training a model using Databricks AutoML. They notice that the generated notebook includes a step that uses Hyperopt for hyperparameter tuning, but the tuning process is taking too long. They want to reduce the search space without sacrificing model performance significantly. Which Hyperopt configuration change should they make?

A.Switch from the default 'TPE' algorithm to 'Random' search.
B.Use a narrower search space by specifying more constrained ranges for hyperparameters, such as reducing the maximum depth of trees or limiting the number of leaves.
C.Change the search algorithm to 'Annealing' and set a high initial temperature.
D.Increase the max_evals parameter to allow more trials.
AnswerB

Constraining hyperparameter ranges directly reduces the search space, allowing Hyperopt to focus on promising regions. This can significantly cut tuning time while often maintaining or even improving performance because it avoids extreme values that may lead to overfitting or long training times. It is a targeted approach to balance speed and accuracy.

Why this answer

Narrowing the hyperparameter search space by constraining ranges reduces the number of possible configurations Hyperopt must evaluate. This directly cuts tuning time and often maintains model performance because it focuses on sensible values. Switching algorithms or increasing trials does not address the root cause of a large search space, and may even increase runtime.

Exam trap

The trap here is thinking that changing the optimization algorithm alone will always speed up tuning, but without reducing the search space, the algorithm may still explore many configurations.

204
Multi-Selecthard

Which TWO of the following are benefits of using the Databricks Feature Store for machine learning workflows?

Select 2 answers
A.It automatically scales the compute resources for training deep learning models.
B.It enables consistent feature definitions across training and inference pipelines.
C.It provides point-in-time joins to prevent target leakage.
D.It automatically retrains models when feature data changes.
E.It converts unstructured image data into structured feature vectors.
AnswersB, C

A primary benefit is the ability to share feature definitions between training and online or batch inference. This consistency ensures that the exact same transformations applied to features during training are reproduced during inference, effectively mitigating the common risk of training-serving skew in production systems.

Why this answer

The Databricks Feature Store facilitates feature reuse across different teams and projects, preventing redundant engineering work. Additionally, it ensures point-in-time correctness by preventing data leakage during training through time-travel capabilities. These features are critical for maintaining consistency between training and inference environments, reducing the likelihood of training-serving skew, and streamlining the overall MLOps lifecycle within the Databricks platform.

Exam trap

Candidates mistakenly believe feature stores only speed up training queries, ignoring their critical role in preventing data leakage and ensuring training-serving consistency.

205
Multi-Selecthard

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

Select 2 answers
A.The training dataset used to fit the model.
B.The MLflow run ID for reference.
C.The Python function code that defines the model's prediction logic.
D.The environment dependencies, such as a conda.yaml or requirements.txt.
E.The model signature, specifying input and output schema.
AnswersC, D

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

Why this answer

The correct answers are the Python function code and the environment dependencies. When logging a custom Python function model, MLflow must save the function code to reconstruct the model. Additionally, the environment dependencies (conda.yaml) ensure that the required libraries are available.

Together, these enable the model to be loaded and served in a different environment. The model signature, training dataset, and run ID are not strictly required for portability.

Exam trap

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

206
MCQmedium

When using Databricks Model Serving, what is the primary benefit of using a 'Provisioned Throughput' endpoint over a 'Serverless' endpoint?

A.It is always the cheapest option for low-traffic models.
B.It provides guaranteed performance and lower latency for heavy workloads.
C.It eliminates the need to provide a model signature.
D.It is the only way to deploy non-Python models.
AnswerB

Provisioned Throughput reserves dedicated resources for the model, which eliminates the variability associated with shared serverless infrastructure. This results in consistent, predictable performance and lower latency, making it the ideal choice for production applications that must handle high-volume traffic with strict performance and reliability requirements.

Why this answer

Provisioned Throughput is designed for high-performance use cases requiring guaranteed performance, such as low-latency requirements or high-throughput scenarios that cannot tolerate fluctuations in resource availability. By reserving dedicated capacity, it provides the predictable performance needed for enterprise-level applications, ensuring that critical models meet their SLAs despite external load variations. This is a crucial choice for models that require consistent performance regardless of traffic volume patterns.

Exam trap

Candidates often select serverless endpoints for everything, forgetting that Provisioned Throughput provides guaranteed performance and lower latency for heavy enterprise workloads.

207
MCQhard

A machine learning team is using Databricks Jobs to orchestrate a multi-step ML pipeline: data ingestion, feature engineering, model training, and batch inference. They need to ensure that if the model training step fails, the batch inference step does not run, and that the entire pipeline can be retried from the failed step. Which Databricks Jobs feature should they use to achieve this?

A.Use a single notebook with all steps and rely on the notebook's built-in error handling to skip inference on failure.
B.Set up a continuous job that always runs all tasks, and use conditional logic in the inference task to check if training succeeded.
C.Configure each task with a dependency on the previous task and set the job to repair runs on failure.
D.Use Databricks Jobs with a cluster that has autoscaling enabled and set the inference task to run only if the training task logs a success metric.
AnswerC

Databricks Jobs supports task dependencies, ensuring that a task runs only after its dependencies succeed. The repair run feature allows retrying a failed run from the point of failure, skipping already successful tasks. This meets the requirement of conditional execution and efficient retry.

Why this answer

Databricks Jobs allows defining tasks with dependencies, so the inference task will only run if the training task succeeds. The repair run feature enables retrying a failed run from the failed task, reusing successful task results. This combination provides both conditional execution and efficient recovery.

Exam trap

The trap here is assuming that a single notebook or continuous job can provide the same level of dependency management and repair capabilities as Databricks Jobs with task dependencies.

208
MCQmedium

A machine learning engineer is configuring a Databricks Model Serving endpoint for a model that requires GPU acceleration. They set the workload size to 'GPU_Medium' but the endpoint fails to deploy. Which of the following is the most likely cause of the failure?

A.The model was not logged with the 'mlflow.pyfunc' flavor.
B.The model's signature does not include GPU-specific metadata.
C.The endpoint was configured with 'min_instances' set to 0.
D.The Databricks workspace does not have GPU instances enabled or available.
AnswerD

Model Serving GPU workload sizes require that the workspace has GPU instances enabled and sufficient quota. If GPU instances are not available or the quota is exceeded, the endpoint deployment will fail. This is a common configuration issue when attempting to use GPU-accelerated serving.

Why this answer

GPU workload sizes for Model Serving require the workspace to have GPU instances enabled and available. If the workspace lacks GPU capacity or the user lacks permissions, deployment fails. Other factors like flavor or signature are unrelated to GPU provisioning.

Ensuring GPU availability is a prerequisite for GPU-accelerated endpoints.

Exam trap

The trap here is focusing on model artifacts like signature or flavor, when the issue is actually about the underlying compute infrastructure and quota for GPU instances.

209
MCQhard

An ML engineer registers a model in Unity Catalog and needs a stable pointer that always resolves to the version currently approved for production, without modifying calling code each time a new version is promoted. Which Model Registry feature should the engineer configure to provide this stable reference?

A.A model version tag recording the approval date
B.A registered model description summarizing the production candidate
C.A model version alias such as 'champion' assigned to the approved version
D.A workspace-level permission grant on the registered model
AnswerC

Aliases are named references that can be reassigned to any model version within a registered model. Serving code can target the alias instead of a version number, so promoting a newly approved version is a matter of moving the alias, and consumers automatically resolve to the newly approved version without any code change or redeployment of callers.

Why this answer

Model version aliases provide exactly the stable, reassignable pointer described: consumers load by alias, and promotion is performed by moving the alias to the newly approved version. Tags, descriptions, and permission grants are metadata or access controls and cannot redirect consumers to a chosen version at load time.

Exam trap

The trap here is assuming that tags or descriptions can be used programmatically to select a version, when only aliases (or stages in older registries) act as resolvable pointers.

210
MCQmedium

Refer to the exhibit. What is the impact of setting 'auto_capture_request_payload' to true?

A.It automatically retrains the model whenever new data is captured.
B.It stores incoming request data in a table for analysis and monitoring.
C.It limits the endpoint to only accept JSON payloads.
D.It encrypts the payload before it reaches the model.
AnswerB

This feature facilitates the collection of inference inputs and outputs into a structured format, such as a Delta table. This allows data scientists to monitor the model's performance in production, conduct drift analysis, and use the data for future fine-tuning or retraining efforts, which is vital for maintaining model accuracy.

Why this answer

Enabling 'auto_capture_request_payload' is a powerful feature for debugging, auditing, and continuous model improvement. It allows teams to log the exact data received by the endpoint, enabling them to analyze prediction inputs, perform retrospective bias analysis, and verify data quality. This is a critical component of a robust MLOps strategy, as it provides the raw data needed to identify the causes of poor predictions and justify model decisions for compliance.

Exam trap

Candidates often assume this setting automatically triggers model retraining or performance alerts. It only logs data; it does not perform automated analytical processing or model updates on the captured payload.

211
MCQeasy

Which Databricks feature provides a managed environment specifically optimized for machine learning libraries like TensorFlow, PyTorch, and XGBoost?

A.Databricks SQL
B.Databricks Runtime for Machine Learning
C.Delta Live Tables
D.Unity Catalog
AnswerB

This runtime provides a pre-built, highly optimized environment that includes major ML libraries like PyTorch, TensorFlow, and XGBoost. It is designed to minimize environment setup time, featuring pre-configured distributed training capabilities and hardware acceleration support, which is critical for scaling machine learning models in production environments.

Why this answer

Databricks Runtime for Machine Learning (ML Runtime) is pre-configured with popular machine learning libraries and optimized versions of deep learning frameworks. It includes pre-installed dependencies and optimized binaries for distributed training, which saves time for data scientists who would otherwise need to manually configure clusters. This runtime simplifies the setup process and ensures compatibility between the infrastructure and the most common data science toolkits used in production machine learning projects.

Exam trap

Candidates confuse the Databricks Runtime for ML with standard Databricks Runtime. They often think standard clusters automatically include optimized ML libraries, which is incorrect for deep learning or specialized frameworks.

212
MCQeasy

What is the primary benefit of using a 'Job Cluster' instead of an 'All-Purpose Cluster' for automated ML workflows?

A.All-purpose clusters are always faster for training large models.
B.Job clusters provide lower costs and better environment isolation.
C.Job clusters allow for interactive debugging of code during runtime.
D.All-purpose clusters are required for scheduling workflows in Databricks.
AnswerB

Job clusters are specifically optimized for automated workflows. By being ephemeral, they reduce costs significantly compared to keeping an all-purpose cluster running. Additionally, because they are isolated from interactive notebooks, they guarantee that the job runs in a predictable environment without side effects from other users or shared session configurations.

Why this answer

Job clusters are ephemeral compute resources that are created for a specific job and terminated immediately after completion. They are significantly more cost-effective because they use specialized pricing and ensure that resources are not idling between runs. Using job clusters also ensures complete environment isolation, preventing interference from other users or interactive processes, which is foundational for ensuring reproducible and reliable machine learning pipeline execution in production environments.

Exam trap

Candidates incorrectly assume all-purpose clusters are better for automated workflows because they remain active, missing that job clusters provide cheaper, ephemeral, and isolated execution.

213
MCQeasy

Which of the following describes the purpose of a 'Validation Set' in the model development cycle?

A.To serve as the final test set for reporting final accuracy.
B.To help tune hyperparameters and avoid overfitting.
C.To increase the training dataset size.
D.To train the model parameters directly.
AnswerB

The validation set provides an unbiased estimate of model performance while tuning hyperparameters. It allows the scientist to select the version of the model that performs best on data it has not seen during the training iterations, which is fundamental to achieving high generalization on future data.

Why this answer

A validation set is used during training to tune hyperparameters and select the best model configuration. By evaluating on unseen data during the training phase, data scientists can prevent overfitting—where the model memorizes the training data rather than learning patterns. This is a crucial step in the ML workflow, as it ensures the model will generalize well to new data after it is deployed to production.

Exam trap

Many test-takers confuse the validation set with the test set, mistakenly believing validation data is used for the final unbiased evaluation rather than hyperparameter tuning.

214
MCQmedium

A data scientist has registered a scikit-learn model in the Databricks Model Registry as `prod.churn_model`. The production endpoint serving this model must automatically roll back to the previously served version if the newly deployed version's error rate exceeds a threshold within one hour of deployment. Which Databricks feature should the data scientist configure to meet this requirement?

A.Use MLflow Model Registry webhooks to trigger a rollback when the endpoint's error rate exceeds the threshold.
B.Set up a Databricks Lakehouse Monitoring quality monitor on the endpoint's inference table with a custom metric and an alert that triggers a rollback via a job.
C.Configure the endpoint to serve the new version with a small percentage of traffic and manually promote it after validating the error rate.
D.Enable automatic model version rollback on the serving endpoint by defining a rollback policy with the error-rate threshold.
AnswerB

This is the correct approach because Databricks Lakehouse Monitoring can compute custom metrics from the endpoint's inference table, and alerts can trigger a Databricks job. That job can then update the endpoint configuration to revert to the previous model version. This provides the required automatic, threshold-based rollback within the specified time frame using native Databricks capabilities.

Why this answer

Automatic rollback based on runtime error rate is not a built-in Model Serving feature. The viable path is to monitor the endpoint's inference table with Lakehouse Monitoring, define a custom metric for error rate, and use an alert to trigger a job that reconfigures the endpoint to the previous version. This leverages Databricks-native monitoring and orchestration to meet the requirement.

Exam trap

The trap here is assuming Model Serving includes built-in automatic rollback policies based on error-rate thresholds, when in fact rollback must be orchestrated through monitoring and jobs.

215
MCQeasy

A data scientist needs to run the same feature-engineering notebook against three different parameter sets in a Databricks Job. She wants each parameter set to execute independently and in parallel, with separate logs. Which Job feature should she use?

A.A job cluster with autoscaling enabled and a single task.
B.A single notebook task with the three parameter sets passed as a JSON string argument.
C.Three separate jobs created from the same notebook, each with its own parameter.
D.A for-each task that iterates over a parameter array and runs the notebook once per element.
AnswerD

A for-each task takes an input array and runs its nested task once per element, optionally in parallel. Each iteration is a separate task run with its own logs and status, which matches the requirement for independent parallel executions with distinct parameter values. The nested notebook receives the current element as a parameter.

Why this answer

The for-each task is designed for iterating a nested task over an input array, producing one task run per element with its own logs and status. That gives the independent, parallel executions the scientist needs while keeping everything in one workflow. Passing a JSON string, creating separate jobs, or relying on autoscaling all fail to produce per-parameter task runs with isolated logs.

Exam trap

The trap here is treating cluster autoscaling or a single parameterized task as a way to run multiple parameter sets, when iteration requires a for-each task over an array.

216
MCQmedium

A user is experiencing 'Out of Memory' (OOM) errors during the evaluation phase of a large XGBoost model on Databricks. What is the most effective way to address this while utilizing the distributed nature of Databricks?

A.Increase the driver node memory indefinitely.
B.Use a Spark-native implementation of the algorithm.
C.Downsample the data until it fits in memory.
D.Convert the data to a single JSON file.
AnswerB

Spark-native implementations, such as the XGBoost classifier in the Spark-MLlib compatible library, distribute the dataset and the training process across the cluster. This allows for parallel processing of data partitions, preventing memory overflows on a single node and enabling the training of models on large-scale datasets efficiently.

Why this answer

Using Spark-based distributed training, such as the `sparkdl` or native XGBoost spark estimator, allows the data to be partitioned across the cluster nodes. This prevents the driver from attempting to hold the entire dataset in memory. By distributing the workload, the system can handle datasets that exceed the memory capacity of a single machine, which is fundamental for scaling machine learning applications on Databricks.

Exam trap

Candidates frequently try to increase driver memory or optimize local code, failing to realize that OOM errors on large datasets are solved by distributing the workload via Spark.

217
MCQeasy

When logging a model using MLflow in Databricks, which component is required to capture the environment dependencies so that the model can be accurately reproduced on a different cluster?

A.The raw input dataset in Parquet format.
B.A conda.yaml or requirements.txt file specifying library versions.
C.The cluster's Spark configuration JSON string.
D.The raw model object without additional metadata.
AnswerB

The conda.yaml or requirements.txt file provides a precise list of dependencies. MLflow uses these files to recreate the environment during model loading or deployment, ensuring that the necessary Python packages and versions are installed, thus maintaining operational consistency between the training environment and the downstream deployment system.

Why this answer

Capturing environment dependencies is essential for reproducibility, as models often rely on specific library versions. MLflow uses the conda.yaml or requirements.txt files to snapshot the Python environment during the log_model process. This ensures that when the model is loaded in a deployment environment, it functions exactly as it did during development, preventing runtime errors caused by version mismatches or missing dependencies in the target production environment.

Exam trap

Test-takers often think logging the model weights alone is enough, forgetting that runtime environments require explicit dependency configuration files.

218
Multi-Selecthard

A team is standing up a real-time Databricks Model Serving endpoint for a fraud model. Requests will carry several numeric features, and the team wants the endpoint to reject malformed payloads with a clear client error rather than silently scoring them, and to avoid cold-start latency during business hours. Which two actions should the team take? (Choose two.)

Select 2 answers
A.Configure a non-zero minimum number of serving instances so replicas stay warm.
B.Set the endpoint's scale-to-zero behaviour so idle capacity is released between requests.
C.Register the model in the workspace Model Registry instead of Unity Catalog.
D.Enable inference tables to persist the request and response payloads.
E.Log the model with an MLflow model signature that declares the input schema and types.
AnswersA, E

Keeping a minimum instance count above zero holds provisioned, model-loaded replicas ready at all times. Requests arriving during business hours are handled immediately rather than waiting for a container to start and load artifacts, which removes the cold-start delay. This is the standard control for latency-sensitive endpoints that must respond predictably even after periods of low traffic.

Why this answer

Declaring an MLflow model signature gives the endpoint a schema contract so invalid payloads are refused before scoring, and holding a minimum instance count above zero keeps replicas loaded so requests are not delayed by provisioning. Together these satisfy both the fail-fast validation goal and the warm-capacity latency goal, whereas scale-to-zero, inference tables and registry choice affect cost or governance only.

Exam trap

The trap here is treating scale-to-zero as a pure win, when it directly conflicts with a requirement to avoid cold starts.

219
MCQhard

A team serves a model with Databricks Model Serving and wants to send production traffic to a newly registered model version while keeping the ability to revert instantly if quality degrades. They prefer not to edit the endpoint configuration to switch versions. Which approach best fits this requirement?

A.Update the endpoint to reference the new model version by number and rely on the previous version remaining in the registry.
B.Deploy a separate endpoint per model version and update the client to choose which endpoint to call.
C.Create a model alias such as Champion in Unity Catalog, point the served entity at that alias, and move the alias between versions to promote or roll back.
D.Use the workspace model registry and transition the model version between Staging and Production stages to switch traffic.
AnswerC

Aliases are mutable pointers to a model version, and a served entity can reference an alias instead of a fixed version. Moving the alias from the old version to the new one shifts traffic without editing the endpoint, and moving it back reverts instantly. This matches the requirement to promote and roll back without configuration changes.

Why this answer

Serving through a Unity Catalog alias decouples the endpoint configuration from the specific model version. Promotion and rollback become operations on the alias, so traffic shifts to the new version or back to the previous one without editing or redeploying the endpoint, which is exactly the instant-revert capability the team needs.

Exam trap

The trap here is believing that stage transitions or version pinning can switch production traffic, when the served entity must reference an alias to allow promotion and rollback without a configuration change.

220
MCQmedium

When deploying a model using Model Serving, how does Databricks ensure that the environment remains consistent between the training workspace and the serving environment?

A.By requiring the user to provide a Dockerfile
B.By capturing the model's dependencies during log_model
C.By strictly enforcing the use of the latest stable libraries
D.By running the model on the same training cluster
AnswerB

MLflow automatically logs the environment dependencies, including Python packages and versions, when log_model is called. The serving infrastructure reads this metadata to rebuild the environment in the container. This ensures that the code runs in an environment identical to the one used during training and testing phases.

Why this answer

Databricks uses Conda or virtual environment dependencies captured during the MLflow logging process. When the model is logged, the environment details, including library versions, are saved. During deployment, the serving infrastructure creates a container that replicates this environment.

This practice is crucial for avoiding 'dependency hell', where models fail in production due to subtle library version mismatches compared to the original training environment.

Exam trap

Candidates frequently think Databricks automatically installs local cluster libraries into serving endpoints, forgetting that dependencies must be explicitly captured during the log_model process.

221
MCQhard

A machine learning engineer is training a model on a Databricks cluster and wants the training code to run inside a container that they control, with the same Python libraries available on every node. They also want the environment recorded with the MLflow run for reproducibility. Which Databricks capability should they use?

A.A Databricks container services custom Docker image specified for the cluster.
B.A Databricks Repos checkout of the training code in the workspace.
C.An init script that pip installs a requirements file on each node at startup.
D.Cluster libraries installed from PyPI scoped to the notebook.
AnswerA

Container services let you supply a Docker image that defines the OS-level and Python environment, and every node in the cluster runs that same image. This gives deterministic libraries across driver and workers. Combined with MLflow logging of the run, the environment is both controlled and recorded, meeting the reproducibility requirement.

Why this answer

An engineer-controlled, node-consistent runtime is exactly what container services provides: a custom Docker image is used by all nodes, so library and OS versions are fixed. MLflow then records the environment alongside the run, giving both control and traceability. Cluster libraries, init scripts, and Repos each address only part of the problem without delivering an immutable image.

Exam trap

The trap here is treating cluster libraries or init scripts as equivalent to a container image, when only an image guarantees the same OS and Python environment on every node.

222
MCQhard

A machine learning engineer has an existing Databricks Model Serving endpoint named churn-endpoint serving version 3 of a model. The team has validated version 5 and wants to direct live traffic to it while keeping the deployment reversible if quality degrades. What is the most appropriate action?

A.Delete the endpoint and create a new one with a different name that serves model version 5
B.Update the served entity in the endpoint configuration to reference model version 5, allowing rollback by re-pointing to version 3
C.Transition model version 5 to Production in the Model Registry and assume the endpoint automatically follows the stage change
D.Keep the endpoint on version 3 and write a scheduled job that calls version 5 and overwrites predictions in the serving table
AnswerB

Updating the served entity to the new model version URI performs a managed rolling deployment while preserving the ability to revert by re-pointing to the earlier version. This keeps the change reversible and uses the endpoint's native configuration, matching both the traffic redirection and rollback requirements without extra infrastructure.

Why this answer

The endpoint serves whichever model version URI its configuration references, so updating the served entity to version 5 redirects live traffic through a managed rollout and keeps rollback simple by re-pointing to version 3. Deleting and recreating, batch overwrites, and registry stage changes do not achieve reversible live traffic redirection.

Exam trap

The trap here is believing that a Model Registry stage transition automatically changes which model version a serving endpoint uses.

223
Multi-Selectmedium

A machine learning engineer is preparing to deploy a scikit-learn model as a Databricks Model Serving endpoint. The model expects a pandas DataFrame with specific column names and types. Which two actions should the engineer take to ensure the endpoint correctly validates and processes inference requests? (Choose two.)

Select 2 answers
A.Convert the model to the `mlflow.pyfunc` flavor using a custom wrapper that hardcodes the expected column order.
B.Set the endpoint's `workload_size` to Large so the endpoint can coerce incoming data types automatically.
C.Provide a representative `input_example` when logging the model so MLflow can infer and store the input schema.
D.Log the model with an explicit `ModelSignature` that captures the training DataFrame's column names and data types.
E.Enable inference tables on the endpoint so that incoming requests are automatically reformatted to match the model's schema.
AnswersC, D

Passing an `input_example` gives MLflow a concrete sample to infer the input schema and store it alongside the model. Even when an explicit signature is used, an input example helps document expected payloads and can be used to validate the schema. Together with the signature, it ensures the endpoint knows the correct column names and types. This is a recommended practice for reliable deployments.

Why this answer

Logging the model with an explicit `ModelSignature` and a representative `input_example` ensures the Serving endpoint knows the exact column names and types to expect. The signature drives request validation, while the input example documents and helps infer the schema. Together they prevent malformed requests from reaching the model and keep training and serving schemas aligned.

Exam trap

The trap here is assuming that endpoint sizing or inference tables can fix schema mismatches, when schema enforcement comes from the logged MLflow signature.

224
MCQhard

A team operates a Databricks Model Serving endpoint with min_instances set to 0 and max_instances set to 4. During a nightly batch job, the endpoint receives a burst of requests and some clients observe elevated latency. The team wants to keep costs low during idle periods while reducing cold-start latency during bursts. Which configuration change best achieves this?

A.Set max_instances to 8 so the endpoint can scale further during the burst.
B.Set min_instances to 4 so the endpoint always matches the maximum capacity.
C.Set min_instances to 1 and leave max_instances at 4 so at least one instance is always warm.
D.Enable scale-to-zero by setting both min_instances and max_instances to 0 and rely on queueing.
AnswerC

Keeping min_instances at 1 preserves a warm replica that can answer requests immediately, eliminating scale-from-zero cold starts while max_instances still caps cost during spikes. This balances the cost-saving goal during idle periods with the latency goal during bursts, because only one instance runs continuously rather than four.

Why this answer

Model Serving endpoints scale between min_instances and max_instances. With min_instances at 0, the endpoint scales to zero when idle and must cold-start a replica when traffic resumes, causing the observed latency. Setting min_instances to 1 keeps a single warm replica available for immediate responses while still allowing scale-out up to max_instances during bursts, achieving both cost and latency goals.

Exam trap

The trap here is confusing the roles of min_instances and max_instances, assuming a higher maximum alone removes cold-start latency.

225
MCQhard

A team's Model Serving endpoint occasionally returns errors when the upstream feature store is slow. They want the endpoint to retry transient failures and reduce cold-start latency for bursty traffic. Which combination of endpoint settings best addresses both concerns?

A.Enable inference tables and route all traffic through a single replica to simplify retry logic.
B.Increase the endpoint's workload size to Large and disable request timeouts on the client.
C.Configure a non-zero min_instances for warm capacity and implement client-side retry with backoff for transient upstream errors.
D.Set min_instances to zero and enable scale-to-zero to lower cost during idle periods.
AnswerC

Keeping at least one instance warm avoids provisioning delay during bursts, directly reducing cold-start latency. Retrying transient failures with exponential backoff in the calling application or model code handles the intermittent feature store slowness. Together these settings address both the latency and reliability concerns described, making this the balanced operational choice.

Why this answer

Warm capacity via a non-zero minimum instance count prevents the provisioning delay that causes cold-start latency during bursts. Because the endpoint itself does not automatically retry upstream feature store calls, retry with backoff belongs in the client or model logic. Combining warm replicas with retry logic addresses latency and transient failures without sacrificing scalability or observability.

Exam trap

The trap here is assuming the serving endpoint automatically retries upstream dependency failures, when that resilience must be implemented by the caller or model code.

Page 2

Page 3 of 5

Page 4

All pages

Practice Databricks-ML-Assoc by domain

Target a specific domain to shore up weak areas.

See all domains with question counts →