Courseiva

Databricks Certified Machine Learning Associate (Databricks-ML-Assoc) — Questions 76–150

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

Page 1

Page 2 of 5

Page 3
76
MCQmedium

When designing a feature engineering pipeline in Databricks, why should you use the Feature Store instead of standard Delta tables?

A.Delta tables do not support versioning of data.
B.Feature Store provides automatic point-in-time joins to prevent data leakage.
C.Delta tables require external storage, whereas Feature Store is local-only.
D.Feature Store is the only way to perform SQL queries in Databricks.
AnswerB

Point-in-time joins are critical for preventing data leakage during model training. The Feature Store automatically handles these joins, ensuring that features are computed using only data available at the time of the event, which is essential for accurate model evaluation and performance in real-world scenarios.

Why this answer

Feature Store enables feature reuse and point-in-time correctness. Standard Delta tables do not automatically manage feature metadata or linkage between training data and inference features. By using the Feature Store, teams prevent training-serving skew, a common cause of model degradation.

It also provides a centralized catalog for discovery, which improves collaboration and prevents duplicate engineering efforts across different machine learning projects within the organization.

Exam trap

Candidates often assume Feature Store is just for storage, missing the critical point that its primary advantage is point-in-time joins to prevent data leakage during training.

77
MCQmedium

Which Databricks feature allows you to monitor and manage the lineage of data from the source to the final model prediction?

A.MLflow Tracking
B.Unity Catalog
C.Databricks Delta Live Tables
D.Databricks Model Serving
AnswerB

Unity Catalog offers end-to-end lineage tracking, showing the movement and transformation of data across the platform. It maps the dependencies between upstream datasets, feature tables, and downstream machine learning models, providing a complete audit trail that is essential for governance, impact analysis, and troubleshooting production ML pipelines.

Why this answer

Unity Catalog provides comprehensive data lineage capabilities that track how data flows through tables, jobs, and models. By visualizing this lineage, data scientists and engineers can understand the dependencies between raw data, feature tables, and trained models. This is crucial for debugging, impact analysis, and meeting compliance requirements, as it allows users to trace a model's input data back to its origins within the Databricks ecosystem.

Exam trap

Candidates often confuse MLflow tracking with Unity Catalog, assuming that experiment logs provide full data lineage, whereas Unity Catalog is the specific tool designed for end-to-end data flow tracking.

78
Multi-Selecthard

Which TWO of the following are common pitfalls when using 'Pandas UDFs' for distributed inference on large datasets in Databricks?

Select 2 answers
A.Memory exhaustion due to large batch sizes in the UDF.
B.The inability to use Spark SQL functions inside the UDF.
C.High serialization overhead between the JVM and Python process.
D.Spark automatically parallelizes all non-vectorized Python code.
E.Pandas UDFs are only available for Scala-based models.
AnswersA, C

Pandas UDFs process data in batches of Pandas DataFrames. If the batch size is too large for the worker's memory, the node will crash with an OutOfMemoryError. Developers must tune the batch size and monitor memory usage to ensure that each partition fits comfortably within the assigned heap memory.

Why this answer

Pandas UDFs are powerful but can lead to memory pressure if the data batches are too large, or cause performance degradation if the serialization overhead becomes significant. Choosing the right batch size is critical for balancing throughput and memory usage. Furthermore, developers often overlook the fact that UDFs run inside Python processes managed by Spark, meaning that heavy dependencies or inefficient code can lead to node-level OOM errors if not carefully optimized.

Exam trap

Many candidates underestimate the overhead of data serialization between the JVM and Python processes, often choosing suboptimal batch sizes that cause either memory spikes or excessive communication latency.

79
MCQeasy

Which of the following is an advantage of using Delta Lake for the data storage layer in an ML workflow?

A.It automatically cleans up old model versions from the MLflow registry.
B.It enables time travel to reproduce historical training data sets.
C.It eliminates the need for feature engineering by auto-generating features.
D.It ensures that the model training code runs on a single node.
AnswerB

Delta Lake's time-travel feature allows users to query data as it existed at a specific point in time. This is critical for reproducing training experiments, as it ensures that the training dataset is identical to the one used in previous runs, regardless of ongoing data updates or transformations.

Why this answer

Delta Lake provides ACID transactions and time-travel capabilities, which are essential for ML workflows. Being able to access previous versions of data (time travel) allows data scientists to reproduce exact training results, ensuring consistency across experiments. This reliability is foundational for auditing and maintaining high-quality models, as it guarantees that the data used for training is well-versioned, consistent, and resilient to failures during concurrent read/write operations common in big data environments.

Exam trap

Candidates often confuse Delta Lake's time-travel feature with model versioning, failing to recognize that time-travel specifically preserves historical training datasets.

80
MCQeasy

A data scientist wants to track the performance of a model training run in Databricks. They use MLflow to log parameters and metrics. After the run, they need to view all runs for the experiment in a web-based interface. Which URL should they navigate to?

A.https://<databricks-instance>/#job/<job_id>
B.https://<databricks-instance>/#setting/account
C.https://<databricks-instance>/#mlflow/experiments/<experiment_id>
D.https://<databricks-instance>/#notebook/<notebook_id>
AnswerC

The MLflow experiments UI in Databricks is accessible at the URL pattern '#mlflow/experiments/<experiment_id>'. This page lists all runs for the specified experiment, allowing you to compare metrics, parameters, and artifacts. It is the standard way to view experiment results in the Databricks workspace.

Why this answer

The MLflow experiments UI is accessed via the '#mlflow/experiments/<experiment_id>' URL. This interface displays all runs for the experiment, including logged parameters, metrics, and artifacts, enabling comparison and analysis of model training results.

Exam trap

The trap here is confusing the MLflow experiments UI with other Databricks workspace URLs like jobs or notebooks, which serve different purposes.

81
MCQmedium

When developing a machine learning model on Databricks, why is it recommended to use 'mlflow.log_param' for tracking model configurations like learning rate?

A.It automatically optimizes the hyperparameter for the next run.
B.It enables easy comparison of experiment runs in the MLflow UI.
C.It encrypts the model to prevent unauthorized access.
D.It is required to save the model artifact to DBFS.
AnswerB

Logging parameters provides a structured way to store the settings of every experiment. The MLflow UI allows users to filter and sort runs based on these logged parameters, making it trivial to compare how different configurations impacted model metrics, which is crucial for identifying the most effective hyperparameter settings.

Why this answer

Tracking hyperparameters with log_param allows for full transparency and reproducibility of the experiment. When comparing model versions later, these parameters are indexed in the MLflow UI, enabling data scientists to correlate specific settings with performance outcomes. This is essential for iterative experimentation, as it provides a structured history that makes it easy to identify which configuration settings resulted in the best model performance, facilitating a data-driven approach to model optimization.

Exam trap

Many students confuse `mlflow.log_param` with `mlflow.log_metric`, incorrectly believing hyperparameters are logged as dynamic evaluation outputs.

82
MCQeasy

When logging a model, you decide to store a 'data_version' tag. What is the benefit of this practice?

A.It automatically triggers a new training job whenever the underlying Delta table is updated.
B.It allows for easy filtering and tracking of model performance across different data versions.
C.It compresses the model artifact size by referencing the data instead of embedding it.
D.It creates an immutable copy of the dataset within the model registry.
AnswerB

Tags are indexed in MLflow, allowing you to filter runs and model versions by specific criteria. If you tag models with a data version, you can quickly group and compare performance across different snapshots of the data, which is crucial for understanding how data drift affects model accuracy over time.

Why this answer

Tagging models with data versions is a fundamental practice for data lineage. Since model performance is highly dependent on the underlying training data, tracking the exact version of the dataset used allows for better reproducibility and debugging. This enables engineers to trace a model back to the specific raw data state that produced it, which is essential for compliance and impact analysis when retraining models on updated datasets.

Exam trap

Candidates often confuse 'data_version' with 'model_version'. They incorrectly assume it is for version control of the model code itself rather than tracking the specific dataset snapshot used for training.

83
Multi-Selecthard

A machine learning engineer is using Databricks Feature Store to create a training dataset for a model that predicts customer lifetime value. The feature table includes a timestamp key. Which TWO statements are true regarding point-in-time correctness when creating the training set? (Choose two.)

Select 2 answers
A.The training set will include feature values that were recorded after the label event time if they are available.
B.The training set creation process uses the timestamp key to join features as of the label event time, preventing data leakage.
C.If multiple feature values exist for an entity at the same timestamp, the training set will randomly select one.
D.A timestamp key must be specified in the feature table to enable point-in-time lookups.
E.The training set will automatically include the latest feature values for each entity, regardless of the timestamp.
AnswersB, D

Feature Store uses the timestamp key to perform an as-of join, ensuring that for each label event, only feature values with timestamps up to that event are used. This prevents leakage and simulates real-time inference conditions. This is the core benefit of point-in-time correctness.

Why this answer

Point-in-time correctness in Feature Store requires a timestamp key and uses it to join features as of the label event time. This prevents data leakage by ensuring only past data is used. The other options incorrectly describe behavior that would either ignore timestamps or introduce future data, which are not how Feature Store operates.

Exam trap

The trap here is assuming that Feature Store automatically uses the latest feature values or that it includes future data, when it actually enforces strict temporal joins.

84
MCQhard

Refer to the exhibit. A model is failing to deploy to Databricks Model Serving. The error log indicates 'Schema Mismatch'. Based on the JSON signature provided, what is the most likely cause of the deployment failure?

A.The model environment is missing.
B.The input data types do not match the expected integer/double types.
C.The output type is too large to process.
D.The model version is not registered.
AnswerB

Databricks Model Serving validates incoming requests against the MLflow model signature. If the 'age' field is provided as a string or if the 'income' field is missing, the request fails immediately. This protection mechanism ensures that the model only receives inputs that conform to the format used during training.

Why this answer

The error occurs because the input data sent to the serving endpoint does not match the defined signature. The signature strictly enforces types; if the incoming request sends a string instead of an integer for 'age', or if a field is missing, the serving layer rejects the payload. Validating the schema against the expected MLflow signature is critical for preventing runtime inference errors when integrating with external client applications.

Exam trap

Candidates often confuse model deployment issues with infrastructure errors, failing to realize that Schema Mismatch is specifically caused by a discrepancy between the input data types and the signature.

85
MCQmedium

A machine learning engineer needs to track model parameters, metrics, and artifacts across distributed training runs executed on Databricks. Which component of Databricks Machine Learning should they use to manage and organize this experiment metadata?

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

MLflow tracking is the primary component for capturing experiment metadata, logging metrics, parameters, and artifacts during distributed training runs. It organizes all experiment iterations natively within the Databricks workspace for collaborative machine learning lifecycle management.

Why this answer

MLflow tracking provides an API and UI for logging parameters, code versions, metrics, and output files when running machine learning code. It is fully integrated with Databricks to seamlessly record metadata from distributed jobs, enabling reproducibility, model comparison, and centralized artifact storage across multiple cloud environments and teams.

Exam trap

Exam takers frequently confuse MLflow Model Registry with MLflow Tracking, picking the registry for logging raw parameters and metrics during active training runs.

86
Multi-Selectmedium

A data scientist needs to perform hyperparameter tuning using Hyperopt. Which THREE components are essential to successfully implement an automated tuning run on a Databricks cluster?

Select 3 answers
A.A defined objective function that minimizes or maximizes a metric.
B.A search space defining the range and distribution of hyperparameters.
C.A pre-trained model checkpoint to initialize the search.
D.An optimization algorithm (e.g., fmin, tpe.suggest).
E.A dedicated GPU cluster for every single trial run.
AnswersA, B, D

The objective function is the core of the tuning process. It takes parameters as input, trains the model, and returns a scalar value (e.g., loss or accuracy) that Hyperopt aims to optimize. Without this function, the algorithm cannot evaluate the effectiveness of different parameter configurations during the search.

Why this answer

Successful hyperparameter tuning with Hyperopt requires a well-defined objective function, a search space, and an optimization algorithm. Integration with MLflow is also critical to track the performance of every trial. By combining these three elements, the scientist can efficiently navigate the search space to find optimal model parameters, while ensuring that the results are logged and manageable within the Databricks MLflow tracking workspace.

Exam trap

Test-takers frequently forget that Hyperopt requires an explicit optimization algorithm like tpe.suggest along with the objective function and search space, incorrectly assuming the objective function runs itself.

87
MCQmedium

A data scientist trains a scikit-learn model in a Databricks notebook and logs it with MLflow. She now needs to promote the exact model artifact to the Databricks Model Registry so that it can be served. Which MLflow API call accomplishes this promotion?

A.mlflow.tracking.MlflowClient().create_registered_model(name)
B.mlflow.register_model(model_uri, name)
C.mlflow.sklearn.save_model(model, path)
D.mlflow.log_artifact(model, artifact_path='model')
AnswerB

mlflow.register_model() takes the run-relative URI of the logged model (for example runs:/<run_id>/model) and a registered model name, then creates or updates the registered model entry in the workspace Model Registry. It is the canonical way to promote an artifact produced by mlflow.sklearn.log_model into the registry, and it returns a ModelVersion object for later stage or alias transitions.

Why this answer

Registering a logged model means creating a named entry in the Model Registry that points at a specific run artifact. The mlflow.register_model() function performs exactly that linkage by accepting the run-relative model URI and the desired registered model name, returning a version that can then be transitioned to a stage or alias for serving. Saving, creating an empty registered model, or logging an artifact each perform only one piece of the workflow and leave no registered version.

Exam trap

The trap here is assuming that logging or saving a model artifact automatically creates a registry entry, when registration is a distinct API call that links an artifact URI to a registered model name.

88
Multi-Selectmedium

A data scientist needs to prepare a model for deployment in a highly regulated environment. Which TWO tasks must they complete to ensure the model meets auditability requirements?

Select 2 answers
A.Registering the model in the MLflow Model Registry.
B.Deleting all training logs after deployment.
C.Documenting the lineage from the model to the training data.
D.Hard-coding model weights in the inference script.
E.Using a local Git repository for versioning.
AnswersA, C

The Model Registry provides a centralized, versioned history of the model's evolution. It acts as the system of record for auditors to verify when models were created, who approved them, and what version is currently deployed, which is essential for meeting compliance standards in highly regulated industries and project environments.

Why this answer

Auditability in regulated industries requires proof of origin and transparency. Registering the model in the MLflow Model Registry provides a clear version history and change logs, while linking the model back to the specific run, training data, and notebook ensures full lineage. These steps are mandatory for compliance, ensuring that any model prediction can be traced back to its training source, which is critical for legal and business accountability.

Exam trap

Candidates often select general workspace backup features or standard model performance metrics, forgetting that auditability strictly requires formal model registration and data lineage tracking.

89
MCQmedium

A data scientist is building a pipeline using MLflow. Which TWO of the following tasks should be performed to ensure experiment reproducibility and auditability?

A.Log the git commit hash using mlflow.set_tag().
B.Manually copy the training data into the MLflow model folder.
C.Capture the execution environment using log_model(conda_env=...).
D.Disable the automatic logging feature to save memory.
E.Use a global variable for all experiment parameters.
AnswerA, C

Logging the git commit hash directly links the model to the exact state of the source code. This is a best practice for tracking changes over time, as it allows developers to revert to specific training configurations and understand the lineage of the model artifacts within the MLflow Tracking server.

Why this answer

Reproducibility in machine learning requires strict tracking of code versions, dependencies, and parameters. By logging the source code version (git hash) and the specific Python environment (conda.yaml or requirements.txt), the scientist ensures that any collaborator can recreate the exact training state later. These practices are fundamental to the Databricks ML lifecycle, ensuring that models can be retrained or audited for compliance during the deployment phase.

Exam trap

Candidates frequently overlook logging the environment (conda_env) or source code (git hash), thinking that logging metrics alone is sufficient for full reproducibility of a machine learning experiment.

90
MCQmedium

A machine learning engineer needs to capture every request and response payload sent to a Databricks Model Serving endpoint so that the team can later join predictions with ground-truth labels for monitoring. Which Databricks feature should they enable on the endpoint?

A.Model signature enforcement
B.Inference tables
C.Endpoint access logs in the workspace audit log
D.MLflow model logging to the run's artifact store
AnswerB

Inference tables automatically log request and response payloads from a Model Serving endpoint into a Delta table in Unity Catalog. Each row records the timestamp, request, response, and metadata, enabling downstream joins with ground-truth labels and monitoring of data drift or model quality. Enabling inference tables is the supported way to capture payloads for later analysis.

Why this answer

Inference tables are the Databricks Model Serving feature that persists request and response payloads to a Delta table. Enabling them allows teams to join predictions with ground-truth labels over time, monitor drift, and debug production behavior. Signature enforcement, MLflow artifact logging, and audit logs serve different purposes and do not capture payloads.

Exam trap

The trap here is assuming that enabling the model signature or auditing the endpoint is equivalent to logging inference payloads, when only inference tables persist request and response data.

91
MCQmedium

A data science team is using Databricks Jobs to orchestrate a machine learning pipeline. The pipeline includes a task that trains a model and a subsequent task that evaluates the model. The evaluation task must access the model version produced by the training task. Which mechanism should the team use to pass the model version between tasks?

A.Write the model version to a Delta table and have the evaluation task read it.
B.Store the model version in a file in DBFS and have the evaluation task read it.
C.Use MLflow's tracking API to query the latest model version in the evaluation task.
D.Use task values to pass the model version as a string between tasks.
AnswerD

Databricks Jobs support task values, which allow tasks to pass small amounts of data (like a model version number) to downstream tasks. The training task can set a task value with the model version, and the evaluation task can retrieve it using dbutils.jobs.taskValues.get(). This is the recommended way to pass dynamic values between tasks in a workflow.

Why this answer

Task values are the native Databricks Jobs feature for passing small data between tasks. The training task can set a task value with the model version, and the evaluation task retrieves it using dbutils.jobs.taskValues.get(). This avoids ambiguity and external storage, ensuring the correct version is used.

Exam trap

The trap here is assuming that querying the latest model version is equivalent to the version produced by the training task, which can be incorrect if other runs occur.

92
MCQhard

A team deploys a model to a Databricks Model Serving endpoint and enables inference tables. After a week, they notice that the inference table contains request and response payloads but the payload columns are empty for many rows, while status codes are 200. What is the most likely explanation?

A.The endpoint was serving a different model version than the one with the inference table enabled.
B.The model signature was not logged, so Databricks could not map payloads to columns.
C.The endpoint's autoscaling scaled to zero, so requests were not logged.
D.The inference table's payload logging was disabled or the payload size exceeded the logging limit, so only metadata was recorded.
AnswerD

Inference tables can be configured to log metadata only, and payloads that exceed the maximum logged size are truncated or omitted. When status codes are 200 but payload columns are empty, the most likely cause is that payload logging is disabled in the endpoint configuration or that requests exceeded the size threshold, leaving only metadata rows.

Why this answer

Inference tables have a payload logging setting that can be enabled or disabled, and payloads above a size threshold are not fully recorded. When status codes are successful but payload columns are empty, the cause is almost always that payload logging is off or the requests exceeded the size limit. Reviewing the endpoint's inference table configuration and the payload sizes resolves the issue.

Exam trap

The trap here is assuming that any inference table row includes payloads, when payload logging is a separate setting and large payloads may be truncated or omitted.

93
MCQhard

Refer to the exhibit. A machine learning engineer deployed an MLflow model to Databricks Model Serving, but inference requests are failing with the error shown in the exhibit. How should the engineer resolve this issue?

A.Increase the timeout threshold parameter in the Databricks Model Serving endpoint configuration settings.
B.Update the inference client payload to explicitly cast the 'user_age' field to an integer or long type before sending the request.
C.Restart the underlying model serving worker nodes to clear stale type caches in the serving runtime container.
D.Switch the serving endpoint scaling policy from automatic to manual provisioning to bypass schema validation checks.
AnswerB

Model serving validates input data against the logged MLflow model signature. Ensuring the client payload casts 'user_age' to the expected long type resolves the schema mismatch and allows the serving container to successfully process the request.

Why this answer

Databricks Model Serving strict signature validation enforces data types defined during model logging. When incoming payloads contain mismatched types, such as double instead of long, requests fail. The engineer must re-log the model with a correct signature or cast incoming payload data types to match the expected schema.

Exam trap

Users often try to fix type mismatch errors by changing the model code itself, rather than adjusting the inference payload to match the strict schema enforced by the model signature.

94
Multi-Selectmedium

A data science team is preparing to deploy a custom machine learning model to Databricks Model Serving. Which TWO steps are required to ensure the model can successfully load and serve predictions using MLflow? Choose 2 answers.

Select 2 answers
A.Log the model using mlflow.sklearn.log_model() or equivalent flavor with a defined input example and model signature.
B.Manually install all Python dependencies on every serving endpoint worker node via a custom startup script.
C.Register the logged model version to the Unity Catalog or Workspace Model Registry and transition it to the Production stage or alias.
D.Export the model artifact into a raw Hadoop Distributed File System directory without using the MLflow format.
E.Configure Apache Spark streaming jobs to continuously push payload batches into the model serving container endpoint.
AnswersA, C

Logging models with explicit signatures and input examples allows Databricks Model Serving to automatically validate incoming REST API request payloads against the expected schema, preventing runtime type errors and ensuring reliable scoring execution in production.

Why this answer

Deploying models to Databricks Model Serving requires logging the model with a valid signature and environment specification, and registering it to the Unity Catalog or Workspace Model Registry. These steps ensure the serving infrastructure can automatically provision the correct scoring environment, handle incoming JSON payloads, and validate data types against expected schemas.

Exam trap

Examinees often forget that logging the model with a signature and registering it with a production stage or alias are both mandatory dual prerequisites for serving.

95
MCQhard

Refer to the exhibit. A user attempts to load a model using the MLflow Python API, but the load fails. Based on the JSON snippet, what is the most likely issue?

A.The model name is misspelled in the load request.
B.The model is not in a ready state for inference.
C.The user lacks permissions to read the model.
D.The version number provided is outdated.
AnswerB

The 'PENDING_REGISTRATION' status explicitly indicates that the model object is currently undergoing registration procedures. It has not been fully ingested by the Model Registry service, meaning the artifact repository is not yet ready to serve the model for loading or inference operations until the transition completes.

Why this answer

The model status is listed as 'PENDING_REGISTRATION'. Models in this state are not ready for use because they are still being processed or finalized by the backend. MLflow will prevent loading models that haven't successfully completed registration.

The user must wait for the registration process to complete, changing the status to a ready state, before the model artifact can be successfully loaded and used for inference.

Exam trap

Candidates often assume the error is due to authentication or missing permissions. They fail to check the model status, which clearly indicates it is still in a pending state.

96
MCQeasy

What is the benefit of using the MLflow 'signature' when logging a model?

A.It encrypts the model weights to prevent unauthorized access.
B.It defines the input and output schema for the model.
C.It automatically scales the cluster size based on input volume.
D.It allows the model to be trained on multiple data sources simultaneously.
AnswerB

The model signature provides a clear contract for the model's expected input schema and output schema. This is essential for ensuring that inference applications pass correctly formatted data to the model, which helps catch errors during testing and ensures stable, predictable behavior when the model is deployed to production.

Why this answer

A model signature defines the expected schema of the input data and the structure of the model's output. By logging this, Databricks validates that data sent to the model for inference matches the expected format. This prevents runtime errors in production where incorrectly shaped data could crash the model or lead to silent, invalid predictions, significantly increasing the reliability of deployment pipelines.

Exam trap

Candidates often think a signature is for performance optimization or model encryption, missing its critical role as a schema validator that ensures input data matches the model's requirements.

97
MCQmedium

A data scientist is using Databricks Feature Store to build a training set for a model that predicts customer churn. The feature table contains a column `customer_id` and several features, and the label is stored in a separate Delta table. The data scientist wants to ensure that the exact same feature values used during training are available at inference time. Which approach correctly uses Databricks Feature Store to create the training set?

A.Use `fs.create_training_set()` with the feature table and label DataFrame, specifying `customer_id` as the lookup key.
B.Perform a manual join between the feature table and the label table using Spark, then log the resulting DataFrame as an MLflow artifact.
C.Export the feature table to a CSV file and merge it with the label data using pandas, then log the model with MLflow.
D.Use `fs.log_model()` with the feature table name and specify the label column; the method automatically creates the training set.
AnswerA

The `create_training_set` method of the FeatureStoreClient joins feature tables with labels using the specified lookup key, producing a training set that includes the feature values and lineage. This ensures consistency because the same feature computation is used for both training and inference.

Why this answer

The `create_training_set` method is specifically designed to join feature tables with labels using a lookup key, preserving feature lineage and ensuring that the same feature computations are used during training and inference. This prevents training-serving skew and simplifies deployment.

Exam trap

The trap here is confusing the training set creation with model logging; `log_model` is for logging models that will use Feature Store features at inference, not for creating the training set.

98
MCQhard

Which strategy is most effective for managing model drift in a production Databricks environment?

A.Manually check the model accuracy once a year
B.Re-deploy the model with new data every hour
C.Log inference data to Delta tables for analysis
D.Use a static model that never changes
AnswerC

Logging inference inputs and predictions to Delta tables creates an audit trail that enables monitoring. This data can be analyzed to measure drift in input features or model outputs. This is the industry-standard approach in Databricks for building a feedback loop that informs when a model needs to be updated.

Why this answer

Managing model drift requires active monitoring of input data and output predictions. Setting up Databricks Model Serving with feature tables allows for logging of inference requests and responses to a Delta table. By comparing these production distributions against the training data using tools like Great Expectations or custom SQL queries, teams can detect shifts in data patterns that necessitate retraining or model adjustments to maintain performance.

Exam trap

Candidates often select real-time model re-training or offline batch metrics aggregation, missing that logging inference data to Delta tables is the core requirement for drift analysis.

99
Multi-Selecthard

Which THREE of the following are benefits of using Databricks Workflows for ML model retraining?

Select 3 answers
A.Integration with MLflow to track parameters and metrics for each automated run.
B.Native support for triggering jobs based on data arrival in specific locations.
C.Built-in automated hyperparameter tuning within the workflow orchestrator itself.
D.Capability to send notifications upon success or failure of the pipeline.
E.Automatic translation of Python code into SQL for faster execution.
AnswersA, B, D

Workflows seamlessly integrates with MLflow, ensuring that every automated retraining job generates a traceable experiment record. This allows teams to analyze the performance of new iterations against historical baselines, which is essential for maintaining model quality and debugging failures in automated production pipelines over long periods.

Why this answer

Databricks Workflows provides a robust orchestration layer to automate the entire ML lifecycle. By automating retraining, teams ensure models remain relevant as data changes over time. Reliability features like retries and failure alerts reduce the operational burden on data scientists, allowing them to focus on model improvement while the infrastructure ensures that production pipelines are consistently refreshed without manual intervention.

Exam trap

Candidates often incorrectly select 'automatic model retraining' as a native feature, whereas Workflows provides the orchestration to trigger retraining, not the automated model logic itself.

100
MCQhard

A team maintains a Databricks Model Serving endpoint for a fraud model. Compliance requires that every request and response be logged to a Delta table for auditing and later analysis. The endpoint is already configured and serving traffic. What should the team do to capture this data with the least additional infrastructure?

A.Configure the endpoint to emit metrics to a monitoring dashboard and export the dashboard data nightly
B.Write a client wrapper that logs each request and response to a Delta table before returning the prediction
C.Attach an event log delivery to the serving endpoint and parse the logs into a Delta table with a scheduled job
D.Enable inference tables on the endpoint so requests and responses are automatically logged to a Delta table
AnswerD

Inference tables are a built-in Model Serving feature that automatically logs the request payloads and model responses to a Delta table in Unity Catalog. Enabling them requires no extra pipelines or clusters and directly satisfies the auditing requirement, making it the least-infrastructure solution for capturing endpoint traffic.

Why this answer

Inference tables are the native Model Serving mechanism that records request and response payloads into a Delta table, giving complete server-side auditing without extra infrastructure. Client-side logging, dashboard metrics, and event logs each capture only partial or operational data, so they cannot satisfy the requirement to log every request and response for the fraud endpoint.

Exam trap

The trap here is confusing operational endpoint logs and metrics with inference tables, which are the feature that actually captures request and response payloads.

101
Multi-Selectmedium

A team is using Databricks Feature Store to create a feature table that will be used for both batch training and online inference. They need to ensure the feature table supports point-in-time lookups for training and low-latency reads for serving. Which TWO of the following statements are correct about meeting these requirements? (Choose two.)

Select 2 answers
A.Point-in-time lookups require the feature table to be partitioned by the timestamp key.
B.The feature table must be published to an online store to support low-latency online inference.
C.Online stores are automatically created when a feature table is registered, requiring no additional configuration.
D.Point-in-time lookups are automatically handled by the feature table's primary key and timestamp key during training.
E.The feature table must be stored in Parquet format to enable low-latency reads.
AnswersB, D

Databricks Feature Store can publish feature tables to an online store (e.g., DynamoDB, Cosmos DB, or online tables) to serve features with low latency. Without publishing, the feature table is only available for batch reads from Delta, which is not suitable for real-time serving. Publishing creates a synchronized online copy that Model Serving can query.

Why this answer

To support both batch training and online inference, the feature table must be published to an online store for low-latency reads, and point-in-time lookups are handled using the primary key and timestamp key during training set creation. Parquet storage and automatic online store creation are not requirements, and partitioning is optional.

Exam trap

The trap here is assuming that online stores are created automatically or that a specific file format is required for low-latency reads, when publishing is an explicit step.

102
MCQmedium

What is the primary advantage of using Databricks Model Serving over deploying a model on a standalone web server?

A.It allows you to write the model logic in any programming language including C++.
B.It provides managed, auto-scaling infrastructure with built-in model versioning.
C.It is cheaper than a dedicated server regardless of the model usage patterns.
D.It removes the need to perform any data preprocessing before inference.
AnswerB

Managed serving provides auto-scaling and high availability without the user needing to manage underlying Kubernetes clusters or server infrastructure. Integration with the Model Registry ensures version consistency, simplifying the deployment pipeline and ensuring that production endpoints are reliable, secure, and always running the latest validated model version.

Why this answer

Databricks Model Serving provides a managed, serverless infrastructure that scales automatically based on load and provides low-latency inference. It integrates directly with the MLflow Model Registry, ensuring that the model version deployed is exactly the one tested. This managed approach handles complex infrastructure concerns like auto-scaling, high availability, and authentication, reducing operational overhead compared to manual deployments on standalone servers, which require custom management of dependencies, security, and scaling.

Exam trap

Candidates often think Model Serving is only about low latency, failing to recognize that the primary benefit is the managed, serverless auto-scaling infrastructure integrated with MLflow.

103
MCQmedium

A data scientist is training a scikit-learn model on a Databricks cluster with autoscaling enabled. They observe that each epoch takes significantly longer than expected, and the Spark UI shows very low CPU utilization across the worker nodes. The dataset is small enough to fit in memory on a single node. What is the most likely cause of the slow training?

A.The cluster is using a runtime version that does not support scikit-learn, forcing a fallback to single-threaded execution.
B.The cluster's autoscaling policy is aggressively terminating worker nodes, causing the training to restart.
C.The model is being trained on the driver node only, and the worker nodes are idle because the training code does not distribute the workload.
D.The data is stored in DBFS, and reading it for each epoch introduces network latency that throttles training.
AnswerC

When you train a scikit-learn model using standard APIs like .fit(), the computation runs on the driver node. Worker nodes remain idle, resulting in low cluster CPU utilization and slow training. To leverage the cluster, you would need to use distributed training libraries such as Spark ML or Horovod, or parallelize hyperparameter tuning.

Why this answer

The correct answer is that the model is being trained on the driver node only, leaving worker nodes idle. In Databricks, standard scikit-learn training runs on the driver unless you explicitly distribute it. The low CPU utilization on workers and slow epochs confirm that the workload is not parallelized.

To speed up training, you could use Spark ML, Horovod, or parallelize hyperparameter tuning with Hyperopt.

Exam trap

The trap here is assuming that any Databricks cluster automatically distributes scikit-learn training across workers, when in fact standard scikit-learn runs only on the driver.

104
MCQeasy

A data scientist is building a feature pipeline and wants to avoid recomputing expensive aggregations on every run. They need the computed feature table to be queryable by other notebooks and jobs, refreshed on a schedule, and stored in Delta Lake. Which Databricks capability should they use to define and materialize these features?

A.A Unity Catalog volume holding Parquet files of the computed features.
B.Feature Store feature tables created with FeatureStoreClient.create_table.
C.A Delta Live Tables pipeline with expectations defined on each feature.
D.An MLflow experiment with logged artifacts containing the feature vectors.
AnswerB

The Databricks Feature Store is designed exactly for this: you compute features once, write them as Delta tables with a primary key and timestamp column, and consumers join them at training or inference time. It supports scheduled refreshes through jobs and lineage back to the source data, satisfying discoverability, reuse, and Delta storage in one mechanism.

Why this answer

Reusable, scheduled, queryable features in Delta format are the core purpose of the Databricks Feature Store. Feature tables are Delta tables with declared primary keys and timestamps, enabling point-in-time lookups and training-serving consistency. Other options either provide generic storage or pipeline tooling without the feature-management semantics the scenario calls for.

Exam trap

The trap here is conflating any Delta storage or pipeline tool with a feature store, when only feature tables provide keys, time columns, and point-in-time joins.

105
MCQhard

A machine learning engineer is using MLflow to track experiments for a model that uses a custom Python function to preprocess data. They want to ensure that the model can be deployed consistently across environments. Which MLflow component should they use to package the preprocessing logic along with the model?

A.MLflow Model Registry
B.MLflow Tracking
C.MLflow Projects
D.MLflow Models with a custom Python function
AnswerD

MLflow Models allow you to define a custom Python function that encapsulates preprocessing and prediction logic, and log it as a model artifact. This ensures that the preprocessing steps are packaged with the model and executed consistently during deployment. The custom function can be specified using the python_function flavor, enabling seamless integration.

Why this answer

To bundle custom preprocessing with a model, MLflow Models should be used, specifically by defining a custom Python function that includes both preprocessing and prediction steps. This function is then logged as part of the model, ensuring that any deployment loads the complete pipeline. This approach guarantees consistency across environments and avoids separate preprocessing code.

Exam trap

The trap here is thinking that the Model Registry automatically packages preprocessing logic, when it only manages model versions and metadata.

106
MCQhard

Which THREE factors should be considered when selecting a model for deployment in a production Databricks environment?

A.The average inference latency for a single prediction.
B.The number of lines of code in the training notebook.
C.The interpretability requirements of the end users.
D.The hardware resource requirements for inference.
E.The number of times the model was saved to DBFS.
AnswerA, C, D

Latency is critical for user-facing applications. If a model takes too long to respond, it may be unusable for real-time applications. Understanding the latency requirements of the business use case and ensuring the model meets them is essential for successful deployment and positive user experience in a production scenario.

Why this answer

Deployment involves balancing performance, cost, and maintainability. Latency (performance), interpretability (business requirement), and resource requirements (cost/scalability) are the three pillars of a production-ready model. Failing to consider any of these can lead to models that work well in a notebook but fail to meet business needs or exceed operational budgets, causing significant issues during the transition from experimentation to production.

Exam trap

Candidates often overlook non-technical factors like interpretability, focusing strictly on performance metrics like accuracy, which is insufficient for production requirements where business stakeholders need model transparency.

107
MCQmedium

A data scientist wants to share an MLflow experiment with a teammate. What is the most direct way to ensure the teammate can access the metrics and parameters?

A.Export the experiment data as a CSV and email it to the teammate.
B.Move the experiment notebook to the teammate's private folder.
C.Update the 'Permissions' for the experiment in the Databricks UI.
D.Hardcode the teammate's user ID into the logging script.
AnswerC

Databricks provides a native interface to manage access to experiments. Updating permissions is the correct, secure, and professional way to share experiment results. It allows team members to see all logs, metrics, and parameters within the platform, fostering effective collaboration and ensuring that everyone is working from the same source of truth.

Why this answer

MLflow Experiments are stored within the Databricks workspace and follow standard permission models. By adjusting the 'Permissions' settings on the experiment, the data scientist can grant 'Can View' or 'Can Manage' access to the teammate. This centralized access management ensures that team members can collaboratively review experiment results, compare performance metrics across different runs, and verify the reproducibility of models without needing to manually share raw files or screenshots.

Exam trap

Many students suggest exporting notebooks or downloading CSVs of metrics to share results, ignoring the direct permission management capabilities available natively within the Databricks UI.

108
MCQhard

A team has an existing Databricks Model Serving endpoint serving `prod.ml.fraud_model` version 3. They register version 4, which uses a new feature set, and want to shift only 10% of traffic to version 4 while keeping version 3 for the rest. Their endpoint currently has a single served entity for version 3. What is the most appropriate approach?

A.Register version 4 under a new model name and point the existing served entity at the new model name.
B.Add a second served entity for version 4 to the same endpoint and configure traffic splitting between the two served entities.
C.Update the existing served entity's entity_version to 4 and rely on the endpoint's automatic gradual rollout.
D.Create a second endpoint for version 4 and configure a load balancer outside Databricks to split traffic 10/90 between endpoints.
AnswerB

Databricks Model Serving supports multiple served entities on one endpoint with configurable traffic percentages. Adding a served entity for version 4 and setting its traffic share to 10% achieves the canary rollout while version 3 continues to receive the remaining traffic.

Why this answer

Traffic splitting in Databricks Model Serving is achieved by defining multiple served entities on a single endpoint and assigning each a traffic percentage. Adding a served entity for version 4 at 10% and leaving version 3 at 90% implements the desired canary rollout. Swapping the served entity version, using an external load balancer, or renaming the model do not provide the controlled split.

Exam trap

The trap here is assuming that updating a served entity to a new version performs a gradual rollout, when in fact it replaces the served version entirely.

109
MCQhard

An ML engineer needs to deploy a model for real-time inference with automatic scaling and a REST endpoint that requires token-based authentication. The model artifacts are already registered in the Databricks Model Registry. Which Databricks capability should be used?

A.MLflow's built-in model serving command, which deploys the model to a local REST server on the cluster and exposes it through the workspace URL.
B.A Databricks Job with a continuous trigger that runs a notebook hosting a Flask application on the driver node.
C.Databricks Model Serving, which creates a scalable REST endpoint for registered model versions with built-in authentication and autoscaling.
D.Databricks SQL endpoint with an AI function that calls the registered model for each row in a query.
AnswerC

Databricks Model Serving is designed to expose registered model versions as REST endpoints, handling autoscaling, availability, and authentication through Databricks tokens or service principals. It integrates directly with the Model Registry, so the engineer can enable serving on a version and get a secured endpoint without managing infrastructure.

Why this answer

Databricks Model Serving provides managed, autoscaling REST endpoints for registered model versions, with authentication handled through Databricks tokens or service principals. It is the native capability for real-time inference and requires no custom Flask hosting, cluster networking, or manual scaling logic, unlike the other options.

Exam trap

The trap here is treating a continuous job or MLflow's local serve command as production serving, when only Model Serving provides managed autoscaling and token-secured endpoints.

110
MCQeasy

Which of the following is a core characteristic of 'Model Serving' in Databricks?

A.It is used strictly for batch processing of large datasets.
B.It automatically scales to handle incoming request volume.
C.It requires the user to manually manage Kubernetes clusters.
D.It stores training data for the model to use at runtime.
AnswerB

Model serving is built to be auto-scaling. It monitors incoming traffic and adjusts the number of instances accordingly, ensuring that the endpoint remains responsive during spikes in demand while optimizing costs during periods of low activity, which is essential for maintaining a reliable production-grade machine learning service.

Why this answer

Model Serving in Databricks allows you to deploy models from the Model Registry as low-latency REST endpoints. These endpoints automatically scale based on demand and handle the underlying infrastructure. This enables data scientists to easily expose their models as services for applications, ensuring high availability and consistent performance without needing to manage the complexities of server configuration, manual load balancing, or capacity provisioning.

Exam trap

Students often think manual cluster scaling or writing custom load-balancing scripts is required for production deployments, forgetting that Databricks Model Serving handles scaling automatically.

111
MCQmedium

A data scientist is training a model on a large dataset using the Databricks 'pandas_udf' functionality. They notice that the function is failing when processing specific partitions. What is the most likely cause?

A.The cluster does not have enough worker nodes.
B.The data within the partitions contains types that are incompatible with Apache Arrow.
C.The Python version on the driver is different from the worker nodes.
D.The model is too large to fit in the driver memory.
AnswerB

Pandas UDFs rely on Apache Arrow for efficient data transfer between the JVM and Python. If the input data contains complex types that cannot be mapped to an Arrow schema, the serialization process will fail. This is a common issue when using custom objects or unsupported nested structures in Spark DataFrames.

Why this answer

Pandas UDFs (User Defined Functions) operate on Apache Arrow-formatted data batches. When a specific partition is too large or contains unexpected data types that cannot be serialized or deserialized into Arrow, the UDF will fail. Understanding data distribution and ensuring type compatibility is essential when working with vectorized UDFs to ensure stability and performance during distributed model training and inference tasks.

Exam trap

Candidates often blame the cluster configuration or memory limits, overlooking that Pandas UDFs rely on Apache Arrow, which fails if the data types in the partition are unsupported.

112
MCQmedium

An ML engineer is orchestrating an end-to-end machine learning pipeline using Databricks Jobs. The pipeline consists of data preparation, distributed hyperparameter tuning with Hyperopt, and model registration. The engineer needs to pass the best-performing model's run ID from the Hyperopt task to the subsequent model registration task dynamically. Which mechanism should the engineer use in Databricks Jobs to achieve this?

A.Store the run ID in a shared Delta table inside the workspace and query it from the downstream task.
B.Write the run ID to a text file in DBFS root and read it back in the downstream task.
C.Use dbutils.jobs.taskValues to set the run ID in the producer task and get the value in the consumer task.
D.Pass the run ID as a static parameter defined in the JSON job configuration before execution begins.
AnswerC

Task values provide a robust, native API to set key-value pairs in one workflow task and retrieve them in subsequent tasks. This avoids external storage overhead and integrates directly into the Databricks Jobs execution context and UI.

Why this answer

Databricks Jobs task values allow tasks to pass small amounts of data, such as strings or numeric metrics, downstream to other tasks within the same workflow. Using dbutils.jobs.taskValues.set inside the Hyperopt notebook and dbutils.jobs.taskValues.get in the registration notebook enables seamless dynamic orchestration without relying on external storage solutions.

Exam trap

Candidates often assume they need to read and write temporary state files to DBFS or external cloud storage between tasks, forgetting that native task values are specifically engineered for this exact inter-task communication pattern.

113
Multi-Selecthard

An ML engineer is using Databricks Jobs to orchestrate a machine learning pipeline that includes data ingestion, feature engineering, model training, and batch scoring. The engineer wants to ensure that the pipeline is reproducible, handles failures gracefully, and allows for easy debugging of individual tasks. Which TWO features of Databricks Jobs should the engineer leverage to meet these requirements? (Choose two.)

Select 2 answers
A.Notebook parameters to pass dynamic values between tasks.
B.Git integration to version-control notebooks and reference specific commits.
C.Repair runs to re-execute only failed or skipped tasks without rerunning successful ones.
D.Task dependencies to define the order of execution and enable conditional branching.
E.Job clusters that are created for each run and terminated upon completion.
AnswersC, D

Repair runs allow you to rerun only the tasks that failed or were skipped, preserving the results of successful tasks. This is essential for graceful failure handling and efficient debugging, as the engineer can fix an issue and repair the run without redoing the entire pipeline. It directly addresses the requirement to handle failures and debug individual tasks.

Why this answer

Task dependencies define execution order and conditional branching, ensuring that downstream tasks like training run only after upstream tasks succeed and enabling failure handling. Repair runs allow re-executing only failed or skipped tasks, which is critical for debugging and recovering from failures without rerunning the entire pipeline. Together, these Databricks Jobs features provide orchestration, graceful failure handling, and efficient debugging.

Exam trap

The trap here is focusing on code versioning or cluster configuration as the primary means of orchestration and failure recovery, when the core Job features for those needs are dependencies and repair runs.

114
MCQhard

A data scientist is using Databricks AutoML to train a classification model on a dataset with a highly imbalanced target variable. They want to ensure the model evaluation focuses on the minority class. Which evaluation metric should they prioritize when interpreting AutoML results?

A.Mean squared error (MSE)
B.Accuracy
C.F1 score
D.Area under the ROC curve (AUC)
AnswerC

F1 score is the harmonic mean of precision and recall, making it sensitive to both false positives and false negatives. For imbalanced datasets, it better reflects performance on the minority class because it emphasizes correctly identifying positive cases. Thus, prioritizing F1 helps ensure the model performs well on the minority class.

Why this answer

F1 score balances precision and recall, making it suitable for imbalanced classification where the minority class is of interest. AUC and accuracy can be misleading, and MSE is for regression. Prioritizing F1 ensures the model captures the minority class effectively.

Exam trap

The trap here is choosing accuracy or AUC because they are commonly used, without considering their insensitivity to class imbalance.

115
MCQhard

Refer to the exhibit. A developer encounters this error while trying to register a model in the Unity Catalog. What does this error signify about the model deployment process?

A.The model has not been trained on enough data.
B.The model lacks a defined input and output schema.
C.The user does not have permission to write to the catalog.
D.The model file size exceeds the registry's limit.
AnswerB

The model signature provides the schema (types and shapes) for the model's inputs and outputs. Unity Catalog requires this metadata to enforce schema validation for all registered models, ensuring that any application or service consuming the model provides data in the correct format, thereby reducing integration bugs.

Why this answer

The error indicates that the model's input and output schema are undefined, preventing the Unity Catalog from verifying data compatibility during inference. A model signature acts as a contract between the model and its consumers. Without it, the model serving environment cannot guarantee that incoming data matches the expected structure, which is a requirement for production-grade models to prevent runtime failures and ensure safe, reliable deployments in a shared enterprise environment.

Exam trap

Students often assume Unity Catalog registration errors are caused by permission issues or cluster failures, overlooking missing model signatures and schemas.

116
MCQeasy

A data scientist is training a scikit-learn model on Databricks and wants to automatically log parameters, metrics, and models without writing explicit MLflow logging code. Which approach should they use?

A.Use the Databricks AutoML feature to train the model.
B.Manually log parameters and metrics using mlflow.log_param and mlflow.log_metric, and log the model with mlflow.sklearn.log_model.
C.Enable MLflow autologging by calling mlflow.sklearn.autolog() before training.
D.Configure the cluster to use MLflow integration by setting the environment variable MLFLOW_AUTOLOGGING=true.
AnswerC

MLflow autologging for scikit-learn automatically captures parameters, metrics, and models when you call fit(). Calling mlflow.sklearn.autolog() enables this for all subsequent scikit-learn training runs. This satisfies the requirement without manual logging code. Autologging works seamlessly within Databricks notebooks and is the recommended approach for quick experimentation.

Why this answer

MLflow autologging for scikit-learn is enabled by calling mlflow.sklearn.autolog() before training. This automatically logs parameters, metrics, and the model without explicit logging calls. It is the standard way to achieve automatic tracking in Databricks.

Other options either require manual code, are for different purposes, or are not valid configurations.

Exam trap

The trap here is confusing Databricks AutoML with MLflow autologging; AutoML builds models, while autologging tracks them.

117
MCQmedium

When deploying a model to a production environment, why is it critical to create a dedicated 'staging' environment before the 'production' environment?

A.To increase the cost of the deployment infrastructure.
B.To perform end-to-end integration testing in a production-like environment.
C.To hide the model from the model registry.
D.To store backup copies of the training dataset.
AnswerB

Staging environments are designed to replicate the production environment as closely as possible. This allows for testing the entire pipeline, including data connectivity, API endpoints, and model performance, ensuring that any issues are detected and resolved before the model is exposed to actual production traffic and users.

Why this answer

A staging environment acts as a vital quality gate that mirrors the production configuration. By testing the model in a staging environment, developers can identify integration issues, resource bottlenecks, and environmental discrepancies without impacting actual end-users. This practice reduces risk, ensures the model behaves predictably under load, and allows for thorough regression testing, which is essential for maintaining high availability and reliability in mission-critical machine learning applications.

Exam trap

Candidates often think staging environments are meant solely for hyperparameter tuning or final model training, ignoring their role as integration testing gates.

118
MCQhard

A data scientist deploys a model to a Databricks Model Serving endpoint and enables inference tables. After a week, they want to analyze prediction drift by joining the logged requests with ground-truth labels that arrive later. Which statement describes how they should access the inference table data for this analysis?

A.Read the endpoint's driver logs from the cluster's log delivery location, parse the JSON entries, and join them with the labels table.
B.Query the inference table using the Delta table name shown in the endpoint's Serving UI, then join it with a labels table on a request identifier.
C.Call the endpoint's `/metrics` REST API to export inference records, then load them into a Spark DataFrame for joining with labels.
D.Enable model monitoring on the endpoint and rely on its automatically generated drift metrics, which replace the need to join with ground-truth labels.
AnswerB

Inference tables are stored as Delta tables in Unity Catalog or the Hive metastore, and the endpoint's UI exposes the fully qualified table name. Users can query them with SQL or Spark and join to downstream label tables using the request ID column that Databricks includes. This enables drift analysis and model monitoring. The table contains request payloads, responses, and metadata such as timestamps and model version.

Why this answer

Inference tables persist request and response payloads as Delta tables, with a fully qualified name visible in the endpoint UI. Analysts can query them directly and join with delayed ground-truth labels using the included request ID and timestamps. This supports drift and accuracy analysis without custom logging.

Lakehouse Monitoring can build on these tables for automated metrics.

Exam trap

The trap here is assuming inference data is only available through monitoring dashboards or REST metrics, rather than as a queryable Delta table.

119
MCQmedium

A machine learning engineer is deploying a scikit-learn model to a Databricks Model Serving endpoint. The model was logged with MLflow using the default signature and input example. After deployment, the engineer notices that the endpoint's REST API expects a JSON payload in a specific format. Which MLflow artifact is used by Model Serving to determine the expected input format for the endpoint?

A.The conda.yaml file, which lists the Python dependencies.
B.The requirements.txt file, which pins package versions.
C.The MLmodel file's signature field, which contains the input schema.
D.The input_example.json file, which provides a sample input.
AnswerC

The MLmodel file is generated by MLflow and includes a signature field that defines the input and output schema. Model Serving reads this to validate and parse incoming requests, ensuring the JSON payload matches the expected columns and types. This enables automatic request validation and correct inference.

Why this answer

Model Serving relies on the MLflow model's signature, stored in the MLmodel file, to understand the expected input schema. This signature includes column names, data types, and shapes, allowing the endpoint to validate and parse JSON requests correctly. Without a signature, the endpoint may not enforce input validation, leading to errors.

The signature is essential for seamless deployment.

Exam trap

The trap here is assuming that the input example or dependency files define the API input format, when actually the model signature in the MLmodel file is the authoritative source.

120
MCQhard

When logging a PyTorch model to the MLflow Model Registry, which component must be explicitly defined to allow the model to be loaded in an environment where the original code structure might not exist?

A.The hardware specification of the training cluster.
B.The environment dependencies, often captured via a requirements.txt or conda.yaml file.
C.A list of all users who have access to the model.
D.The full raw dataset used for training.
AnswerB

Capturing dependencies is vital for reproducibility. MLflow serializes the current Python environment configuration, allowing the target environment to recreate the exact package versions used during training. This prevents 'it works on my machine' scenarios by guaranteeing that the inference service has the exact library versions required by the model.

Why this answer

When saving a model, especially deep learning models like PyTorch, the 'conda_env' or 'pip_requirements' must be explicitly captured. This ensures that the environment (dependencies and versions) is portable. Without defining these, the model might fail to load in other environments due to version mismatches or missing packages, making the model unusable for inference in production or shared staging environments.

Exam trap

Test-takers mistakenly think deep learning model architectures are fully self-contained, overlooking the need to explicitly define pip requirements or conda environments for portable PyTorch inference.

121
MCQhard

A data scientist registers an MLflow model whose `conda.yaml` lists several Python packages. When they create a Databricks Model Serving endpoint from this model, the deployment fails during environment build. Which action is most likely to resolve the failure while preserving the model's dependency requirements?

A.Remove all pinned package versions from the `conda.yaml` so the environment builder can pick any compatible release.
B.Increase the endpoint's workload size to Large so the environment builder has more memory to resolve the dependency graph.
C.Add the missing or incompatible packages to the endpoint's environment by specifying them in the model's `requirements.txt` or adjusting the `conda.yaml` to versions available in the Databricks runtime.
D.Convert the model to a different flavor, such as replacing scikit-learn with a PyTorch implementation, so the dependencies are no longer needed.
AnswerC

Model Serving builds the environment from the dependency specification captured with the model. If a package is missing or pinned to a version that cannot be resolved, the build fails. Correcting the `requirements.txt` or aligning `conda.yaml` entries with versions available in the Databricks runtime lets the builder resolve the environment while still installing the libraries the model needs, preserving the model's required dependencies.

Why this answer

Model Serving reconstructs the model's environment from the dependency files captured at logging time. When a required package is absent or a pinned version cannot be resolved, the build fails. Adjusting the `requirements.txt` or `conda.yaml` to include the necessary packages at versions compatible with the Databricks runtime lets the environment build succeed while keeping the dependencies the model genuinely needs.

Exam trap

The trap here is assuming that enlarging the endpoint's workload size will fix any deployment error, when environment build failures stem from the dependency specification rather than compute capacity.

122
MCQhard

A team observes that their Databricks Model Serving endpoint occasionally returns HTTP 429 responses during bursty traffic, even though the endpoint shows low average CPU utilization. They want to reduce these throttling errors without over-provisioning capacity. Which action is most appropriate?

A.Switch the endpoint to a smaller workload size so individual replicas handle requests faster.
B.Enable scale-to-zero and rely on autoscaling to handle bursts.
C.Increase the endpoint's `max_instances` and tune the autoscaling concurrency target so replicas scale out faster during bursts.
D.Increase the endpoint's `min_instances` so that more replicas are always warm.
AnswerC

HTTP 429 responses from Model Serving typically indicate that the per-replica request queue is saturated even though average CPU is low, because bursts arrive faster than replicas can accept them. Raising `max_instances` allows more replicas to spin up, and tuning the concurrency target makes the autoscaler react sooner, absorbing bursts before requests are rejected.

Why this answer

Throttling at low average CPU points to concurrency saturation during short bursts. Allowing the endpoint to scale to more replicas and configuring autoscaling to react to concurrency sooner lets the endpoint absorb spikes before requests are rejected. This addresses the root cause without permanently over-provisioning capacity during steady-state periods.

Exam trap

The trap here is equating low average CPU with sufficient capacity, when 429s during bursts are caused by concurrency queue saturation rather than sustained compute pressure.

123
MCQeasy

A data scientist has a custom Python model wrapped in an MLflow pyfunc flavor and needs to serve it on Databricks Model Serving. The model's preprocessing requires a library that is not part of the default serving environment. What is the correct way to make that dependency available to the endpoint?

A.Upload the library wheel to DBFS and reference its path in the endpoint's environment variables.
B.Log the model with the required library listed in the model's conda environment or pip requirements so it is captured in the model artifact.
C.Add the library as a cluster library on the all-purpose cluster where the model was trained.
D.Install the library interactively on the driver node before creating the endpoint.
AnswerB

MLflow records dependencies when the model is logged, and Model Serving rebuilds the environment from those captured requirements. Adding the library to the model's conda environment or pip requirements at log time ensures the endpoint installs it during container build. This is the supported, reproducible mechanism for custom dependencies in served models.

Why this answer

Model Serving reconstructs the runtime environment from the dependency specification stored with the logged model. To bring in a library beyond the default environment, the dependency must be captured in the model's conda environment or pip requirements when the model is logged, which guarantees the endpoint installs it reproducibly. Cluster-level installs and storage paths do not reach the serving container.

Exam trap

The trap here is assuming the serving environment inherits packages from the cluster that trained the model, when the endpoint instead rebuilds dependencies solely from what was recorded with the logged model.

124
MCQhard

A data scientist is using MLflow to track experiments on Databricks. They notice that the metrics logged during a run are not appearing in the MLflow UI. The run is part of an experiment with many runs. What is the most likely cause for the missing metrics?

A.The metrics were logged with a step value that is not monotonically increasing, causing MLflow to ignore them.
B.The metrics were logged to a different experiment than the one currently selected in the MLflow UI.
C.The metrics were logged as strings instead of numeric values, so MLflow silently drops them.
D.The metrics were logged using mlflow.log_metric but the run was not properly ended, so they are still buffered.
AnswerB

If metrics are logged to a run under a different experiment, they will not appear when viewing the current experiment. The MLflow UI filters runs by experiment ID. The data scientist likely set a different experiment via mlflow.set_experiment or environment variable, so the metrics are stored elsewhere. This is the most common cause of missing metrics in the UI.

Why this answer

Metrics are associated with a specific run, and runs belong to an experiment. If the run was created under a different experiment than the one selected in the MLflow UI, its metrics will not be visible. This often happens when the experiment is changed mid-session or when using a different tracking URI.

Checking the experiment ID of the run resolves the issue.

Exam trap

The trap here is assuming that metrics are lost due to logging errors, when the most common issue is simply viewing the wrong experiment in the UI.

125
MCQhard

When configuring a Databricks Workflow to automate a machine learning pipeline, which TWO actions are necessary to ensure the pipeline is robust and manageable?

A.Embed all data processing and training logic into a single, massive notebook cell.
B.Use Databricks Workflow tasks to modularize data preparation, training, and evaluation.
C.Configure email notifications to alert team members on job failure or success.
D.Hardcode all file paths and cluster configuration settings directly in the code.
E.Run all pipeline stages on the same shared interactive cluster to save costs.
AnswerB, C

Separating pipeline stages into individual tasks allows for independent execution and retries. This modularity enables developers to monitor each component's success or failure independently, resulting in a cleaner architecture where issues in data cleaning do not require the entire training job to be restarted, improving workflow efficiency significantly.

Why this answer

Robust ML workflows require modularity and error handling. Defining distinct tasks for data preparation, model training, and evaluation allows for granular retries and easier debugging. Furthermore, enabling notifications ensures that failures are addressed promptly.

By using job parameters and dependencies, you create a declarative pipeline that is consistent across environments, reducing the risk of manual configuration errors during deployment cycles and improving overall reliability of the production machine learning system.

Exam trap

Candidates frequently assume that simply running a notebook is sufficient, neglecting the need for modular task separation and automated alerting, which are essential for long-term production reliability and maintenance.

126
MCQeasy

A data scientist wants to compare the accuracy, F1 score, and training duration of several model training runs side by side in a single table, and visually inspect how a hyperparameter affected the metric across runs. Which MLflow capability should be used?

A.The Databricks Jobs UI, where each task run records the metrics emitted by the notebook and displays them in a comparison chart.
B.The MLflow Tracking Server's REST API, which must be queried programmatically to retrieve and compare run metrics.
C.The Databricks Model Registry, where each model version lists its metrics and can be compared against other versions in a table.
D.The MLflow Experiment page, where runs can be selected and compared using the metrics table and chart views.
AnswerD

The MLflow Experiment UI lists all runs with their parameters, metrics, and tags, and supports selecting multiple runs for side-by-side comparison. It also provides chart views that plot a metric against a parameter, which directly answers the need to compare accuracy, F1, and duration and to see hyperparameter effects.

Why this answer

The MLflow Experiment page aggregates all runs with their parameters and metrics, supports selecting multiple runs for a side-by-side table, and offers chart views that plot metrics against parameters. This is the native way to compare accuracy, F1, and training duration and to visualize hyperparameter effects without writing custom code.

Exam trap

The trap here is confusing the Model Registry, which manages versions and stages, with the experiment UI, which is built for comparing runs and metrics.

127
MCQmedium

Which Databricks feature should be used to provide a managed, secure, and scalable endpoint for real-time inference of models logged in the Model Registry?

A.Databricks Jobs running the model in a scheduled notebook.
B.Databricks Model Serving endpoints.
C.A standard interactive cluster running a Flask server.
D.Delta Live Tables pipelines.
AnswerB

Model Serving endpoints are purpose-built for low-latency, real-time model inference. They manage the containerization and infrastructure deployment automatically, ensuring that models are accessible via secure REST APIs. This is the optimal Databricks-native solution for deploying models into production environments that require immediate, scalable prediction capabilities.

Why this answer

Databricks Model Serving provides a fully managed, low-latency API endpoint for model inference. It abstracts away the infrastructure requirements, enabling horizontal scaling and high availability. It is the standard service for deploying models in production, as it integrates directly with the Model Registry, allowing teams to push production-ready models to endpoints with minimal configuration and secure access controls.

Exam trap

Candidates often confuse workspace notebooks or MLflow tracking servers with deployment endpoints, incorrectly choosing tools used for development instead of production serving.

128
MCQmedium

A data scientist is training a model using MLflow on Databricks. They need to ensure that the model artifacts, environment dependencies, and signature are automatically captured to facilitate seamless deployment to Databricks Model Serving. Which command should they use within the training script?

A.mlflow.save_model()
B.mlflow.log_artifact()
C.mlflow.sklearn.log_model()
D.mlflow.set_tracking_uri()
AnswerC

This specific flavor integration logs the model along with its signature, environment, and dependencies. By providing these details, Databricks Model Serving can automatically create a production-ready endpoint. This ensures that the serving environment mirrors the training environment, maintaining consistent model inference behavior across the entire machine learning lifecycle.

Why this answer

The mlflow.spark.log_model or mlflow.sklearn.log_model functions are critical for capturing the model flavor, environment, and signature. By automatically logging these components, Databricks Model Serving can identify the required dependencies and input schema, allowing for a standardized deployment process. This automation is essential for reducing manual configuration errors and ensuring that the model behaves identically in production as it did during the training phase.

Exam trap

Candidates often select generic MLflow logging functions or manually upload files, forgetting that only specific log_model methods automatically capture the required environment dependencies and schema necessary for Databricks Model Serving.

129
MCQmedium

A data scientist has registered a scikit-learn model in Unity Catalog as `ml_prod.churn.model_v3` and wants the Databricks Model Serving endpoint to automatically pick up newly registered model versions as they are promoted to the `champion` alias. Which configuration should the data scientist use when creating the serving endpoint?

A.Serve the model using the alias-qualified path `ml_prod.churn.model_v3@champion`.
B.Export the model with `mlflow.sklearn.save_model` to a DBFS path and point the endpoint at that directory.
C.Serve the model by its explicit version number, `ml_prod.churn.model_v3/3`, and re-create the endpoint after each promotion.
D.Serve the model by its registered name only, `ml_prod.churn.model_v3`, and rely on Databricks to always use the latest version.
AnswerA

Databricks Model Serving supports Unity Catalog alias-qualified model paths. Pointing the endpoint at `model_v3@champion` causes the serving infrastructure to resolve the alias at request time, so when a new version is promoted to the `champion` alias, the endpoint automatically serves the updated artifact without endpoint reconfiguration or downtime.

Why this answer

Alias-qualified paths in Unity Catalog let a serving endpoint follow a movable pointer. When a new model version is registered and the `champion` alias is reassigned to it, the endpoint resolves the alias and begins serving the new artifact. This enables zero-touch promotion workflows, keeps governance in Unity Catalog, and avoids endpoint recreation or explicit version pinning.

Exam trap

The trap here is assuming that a bare registered model name automatically resolves to the latest version, when Databricks Model Serving requires an explicit version or alias-qualified path.

130
MCQmedium

Which workflow step is essential before promoting a model from 'Staging' to 'Production' in the MLflow Model Registry?

A.Deleting the original training dataset to save storage space.
B.Validating the model performance on a hold-out test set.
C.Manually updating the production database credentials in the script.
D.Restarting the cluster to clear the memory of the training environment.
AnswerB

Validation on a representative hold-out dataset confirms that the model generalizes well to unseen data. This step prevents the deployment of overfitted models that might perform well on training data but fail in production, acting as a critical quality gate that maintains the reliability of the overall MLOps system.

Why this answer

Validation against a held-out test set is a mandatory step before any model promotion. This ensures that the model meets performance requirements and hasn't regressed compared to the currently deployed version. This gated approach, combined with the Model Registry's staging transitions, provides a controlled environment for testing, ensuring that only verified, high-quality models enter the production ecosystem, thus mitigating business risk and maintaining model predictive accuracy in critical applications.

Exam trap

Students often select administrative tasks like registering the model name or creating clusters as the essential step, forgetting that rigorous validation on a hold-out test set is mandatory first.

131
MCQeasy

When logging a machine learning model using MLflow, which component is required to capture the environment dependencies (such as library versions) to ensure the model can be reproduced in a different Databricks workspace?

A.The model's training accuracy metrics.
B.A saved requirements file or conda environment definition.
C.The raw training dataset used during training.
D.The Spark configuration file (spark-defaults.conf).
AnswerB

A requirements file or conda definition explicitly lists every package and version dependency used during the training process. MLflow uses these files during the model deployment phase to reconstruct an identical environment, ensuring that the model's inference logic executes correctly without missing dependencies or incompatible library versions.

Why this answer

The MLflow 'conda.yaml' or 'requirements.txt' file is the standardized mechanism for tracking environment dependencies. By logging these alongside the model artifact, MLflow creates a reproducible environment signature. This is critical for MLOps, as it ensures that the model runs against the exact versions of libraries it was trained on, preventing runtime errors caused by mismatched dependency versions across different development, staging, and production environments.

Exam trap

Test-takers frequently assume that the trained model binary or weights alone are sufficient for cross-workspace reproduction, forgetting that environment dependencies must be explicitly captured in configuration files like conda.yaml.

132
MCQeasy

A data scientist is using Databricks Feature Store to create a feature table for a recommendation model. They want to ensure that the same feature computation logic is used both during training and at inference time to avoid training-serving skew. Which Feature Store capability directly addresses this requirement?

A.Feature Store allows features to be computed once and reused across training and batch or online serving through a unified feature computation function.
B.Feature Store provides a point-in-time lookup that ensures training data reflects the state of features at the time of each label event.
C.Feature Store enforces schema validation on feature tables, rejecting any inference request that does not match the training schema.
D.Feature Store automatically versions feature tables and tracks lineage from source data to model.
AnswerA

By defining a feature computation function and using it to populate the feature table, the same transformation logic is applied when materializing features for training and when serving features online. This shared logic is the primary mechanism Feature Store provides to prevent training-serving skew, because the model consumes identically computed features in both contexts.

Why this answer

Databricks Feature Store reduces training-serving skew by letting you define a feature computation function that is used both to create the feature table for training and to compute features at inference time. This unified logic ensures that the model sees features derived from the same transformations in both phases.

Exam trap

The trap here is confusing schema validation or point-in-time correctness with the shared computation logic that actually prevents training-serving skew.

133
MCQmedium

An ML engineer needs to give an external application a stable HTTPS URL to call a registered model served by Databricks Model Serving. The application must authenticate with a token and must not be able to modify the endpoint configuration. Which approach best meets these requirements?

A.Grant the external application a service principal with a token and assign it only the permissions required to query the serving endpoint.
B.Expose the endpoint through a public network with no authentication so the external application can call it directly with the URL alone.
C.Embed the model's artifacts in the external application and call the model locally instead of using the serving endpoint.
D.Share the serving endpoint's URL and provide the external application with a Databricks personal access token belonging to a workspace admin.
AnswerA

Databricks Model Serving endpoints expose a stable HTTPS URL that clients can call with bearer-token authentication. Using a dedicated service principal scoped to query permissions satisfies authentication without granting configuration rights, honoring least privilege. This gives the external application a durable, callable endpoint while ensuring it cannot alter the endpoint or reach unrelated workspace resources, which is exactly what the scenario requires.

Why this answer

Model Serving endpoints are invoked over a stable HTTPS URL using bearer-token authentication. Issuing the external application a service principal token scoped to query the endpoint satisfies the authentication requirement while preventing configuration changes, since the principal lacks management permissions. Sharing an admin token over-privileges the client, and the remaining choices either bypass the endpoint or remove authentication entirely.

Exam trap

The trap here is treating any working token as acceptable, when the requirement that the client cannot modify the endpoint makes a narrowly scoped service principal the only suitable credential.

134
MCQmedium

A data scientist is training a scikit-learn model in a Databricks notebook and wants to automatically log parameters, metrics, and the model artifact to an MLflow experiment without writing explicit log calls. They have already installed the required libraries. Which approach should they use?

A.Register the model in the MLflow Model Registry immediately after training, which will retroactively populate the experiment with all training details.
B.Use the MLflow UI to create an experiment and then manually log each parameter and metric using mlflow.log_param and mlflow.log_metric.
C.Set the Spark configuration spark.databricks.mlflow.autolog to true in the cluster settings.
D.Call mlflow.sklearn.autolog() before starting the training run.
AnswerD

MLflow's autologging for scikit-learn captures parameters, metrics, and the fitted model automatically when autolog is enabled before training. In Databricks, this integrates with the active experiment, eliminating manual logging calls. The scenario requires minimal code changes, and autolog satisfies that by hooking into the training process.

Why this answer

Autologging in MLflow, when invoked for a specific library like scikit-learn, automatically records parameters, metrics, and the model artifact for each run. It requires calling the appropriate autolog function before training. This is the intended method in Databricks to reduce boilerplate and ensure consistent tracking.

The other options either involve manual steps or non-existent configurations.

Exam trap

The trap here is assuming that autologging can be enabled through a cluster-level Spark setting, when it actually requires a library-specific call in the notebook.

135
MCQmedium

Refer to the exhibit. Why is the 'signature' parameter included in the log_model call?

A.To encrypt the model artifacts before saving them to DBFS.
B.To enforce input data schema validation during model inference.
C.To specify the hyperparameters used to train the model.
D.To compress the model into a smaller binary file for faster deployment.
AnswerB

Signatures provide a contract between the model and the input data. By logging this schema, the model can automatically check if incoming request payloads match the expected feature names and types. This prevents type-mismatch errors that typically crash inference services when bad data is sent.

Why this answer

The model signature defines the expected schema for inputs and outputs. Providing a signature allows Databricks to perform runtime validation of data types, ensuring that the model receives data in the format it expects. This prevents runtime errors during inference and allows for automated documentation and improved user experience within the MLflow Model Registry, which is crucial for scalable model deployment in production.

Exam trap

Candidates often confuse 'signature' with model versioning or metadata logging, failing to realize its primary function is runtime schema enforcement to prevent type mismatches during inference requests.

136
Multi-Selectmedium

A machine learning engineer is preparing to deploy a registered model to a Databricks Model Serving endpoint. Before creating the endpoint, the engineer wants to confirm the deployment prerequisites are satisfied. Which two conditions are required for a successful endpoint creation? (Choose two.)

Select 2 answers
A.The model version has a logged MLflow model artifact with a valid model signature
B.The model version is transitioned to the Production stage in the Model Registry
C.The endpoint name matches the registered model name exactly
D.A dedicated all-purpose cluster is running and attached to the endpoint
E.The serving environment can be reconstructed from the model's logged dependencies
AnswersA, E

Model Serving requires a logged MLflow model artifact it can load, and a model signature defines the expected input and output schema. Without a signature, the endpoint cannot validate incoming request payloads, so a properly logged model with a signature is a genuine prerequisite for successful endpoint creation.

Why this answer

A successful endpoint deployment depends on a loadable MLflow model artifact with a defined signature and a reconstructable dependency environment, because the service must build a container and validate request schemas. Registry stage, attached clusters, and name matching are not technical prerequisites and do not affect whether the endpoint can be created and brought to a ready state.

Exam trap

The trap here is treating Model Registry stages as deployment gates, when serving actually keys off the model version URI and logged artifacts.

137
MCQeasy

When logging a model using MLflow, what does the 'artifacts' parameter allow a user to include?

A.A list of all users who have access to the model.
B.Additional files and dependencies required for model inference.
C.A copy of the raw training dataset.
D.The credentials used to authenticate the training job.
AnswerB

The artifacts parameter is intended for bundling extra code, configuration files, or helper objects that are necessary for the model to run correctly. By packaging these with the model, you guarantee that the inference environment contains everything required, avoiding errors caused by missing dependencies when the model is moved to production.

Why this answer

The 'artifacts' parameter allows users to bundle additional files, such as custom scripts, configuration files, or data samples, along with the model. This is crucial for custom model implementations where the model relies on external code or auxiliary data to function correctly. Including these artifacts ensures that the model environment is self-contained, promoting portability and preventing failures when the model is deployed on a different cluster.

Exam trap

Candidates often assume artifacts are only for model weights, forgetting that the parameter is specifically designed to include auxiliary files like custom scripts or configuration files for inference.

138
MCQmedium

A data scientist is training a model using MLflow on Databricks and needs to ensure that all parameters and metrics are logged for every training run. Which approach ensures the most reliable logging of artifacts and metrics during model training?

A.Manually call mlflow.log_metric for every individual iteration inside the training loop.
B.Configure the MLflow tracking URI to point to an external database before initiating the training.
C.Invoke mlflow.autolog() at the beginning of the notebook cell prior to training.
D.Use the model.save() method instead of MLflow tracking for better persistence.
AnswerC

Invoking mlflow.autolog() enables automatic logging for supported libraries like Scikit-learn, PyTorch, or XGBoost. This captures parameters, metrics, and models without manual intervention. It is the best practice for ensuring full visibility into experiment runs, supporting the Databricks requirement for reliable and reproducible machine learning experimentation.

Why this answer

Using mlflow.autolog() is the recommended practice for capturing model metadata, hyperparameters, and metrics automatically in Databricks. This approach minimizes boilerplate code and ensures consistency across experiments, reducing human error. It is vital for reproducibility and model governance within the Databricks environment, as it captures the framework-specific details required for later model registration and deployment without requiring manual tracking of every individual metric.

Exam trap

Candidates often manually log metrics using mlflow.log_metric, which is error-prone and incomplete. They fail to realize that autologging captures framework-specific artifacts essential for later model registration and deployment.

139
MCQhard

A team registers a model in Unity Catalog as main.ml.churn_model and wants production scoring jobs to always load the newest approved version without editing job code when a new version is promoted. The team uses the MLflow Python client inside a Databricks job. Which model URI should the scoring code use?

A.runs:/<run_id>/model
B.models:/main.ml.churn_model/Production
C.models:/main.ml.churn_model@champion
D.models:/main.ml.churn_model/3
AnswerC

Unity Catalog model aliases are referenced with the @alias syntax, and the alias is a mutable pointer that promotion workflows update. When the team assigns the champion alias to a new version, the scoring job automatically resolves to that version on its next run without any code change. This satisfies the promotion-without-edit requirement and is the recommended pattern for Unity Catalog models.

Why this answer

Unity Catalog registered models support aliases such as champion, which act as movable pointers to a version. Referencing the model with models:/catalog.schema.model@alias lets consumers load whatever version currently holds the alias, so promotion is a metadata operation rather than a code change. Numeric versions and run IDs are immutable, and stage-based URIs belong to the legacy workspace registry rather than Unity Catalog.

Exam trap

The trap here is carrying over legacy stage names like Production into Unity Catalog URIs, when Unity Catalog models are promoted through aliases instead.

140
MCQhard

Refer to the exhibit. The logs indicate a persistent connection failure for a Databricks Model Serving endpoint. What is the most likely cause?

A.The model artifacts are missing.
B.The endpoint is overloaded or incorrectly configured.
C.The input data format is incorrect.
D.The model version is archived.
AnswerB

Connection refused and timeouts are classic symptoms of an endpoint being overwhelmed or improperly configured to accept incoming traffic. This suggests that the current resources assigned to the serving endpoint are insufficient to manage the request load, requiring an increase in instances or a change to the scaling configuration.

Why this answer

A 'Connection refused' error coupled with a request timeout typically indicates that the serving endpoint is either overloaded, configured incorrectly with insufficient resources, or facing network connectivity issues. Since the error persists despite retries, it points to a failure in the endpoint infrastructure or scaling capacity, which requires an investigation of the endpoint's resource allocation and the network configuration within the Databricks workspace to restore service reliability.

Exam trap

Candidates often attribute connection failures to code syntax bugs rather than investigating infrastructure limits, endpoint overload, or misconfigured scaling resources.

141
MCQhard

A team wants to route production traffic to a new model version while keeping risk low. They configure a Databricks Model Serving endpoint with two served entities: `champion` (entity_version 5) and `challenger` (entity_version 6). They want 95% of requests to hit `champion` and 5% to hit `challenger`. Which configuration accomplishes this?

A.Set `traffic_config` with routes assigning `traffic_percentage` 95 to `champion` and 5 to `challenger`.
B.Deploy two separate endpoints and use a client-side load balancer to send 95% of calls to the champion endpoint.
C.Set `scale_to_zero_enabled` to true only on `challenger` so it receives proportionally fewer requests.
D.Set `workload_size` to `Small` on `champion` and `Large` on `challenger` to bias traffic toward the larger entity.
AnswerA

Databricks Model Serving supports `traffic_config` with a `routes` array, where each entry names a served entity and specifies an integer `traffic_percentage`. Summing to 100 across routes enables canary or A/B routing. Setting 95 for champion and 5 for challenger delivers the desired split. This is the supported mechanism for gradual rollout without redeploying the endpoint.

Why this answer

Databricks Model Serving uses `traffic_config` with a `routes` list, where each route references a served entity by name and assigns an integer `traffic_percentage`. Summing route percentages to 100 achieves the desired 95/5 split. Other configuration fields like workload size and scale-to-zero govern resources and scaling behavior, not request distribution.

Exam trap

The trap here is confusing resource-allocation settings such as workload size or scale-to-zero with traffic-routing settings, which are configured separately in `traffic_config`.

142
MCQhard

A machine learning engineer registers a model in the Databricks Model Registry and wants to serve it with low-latency online inference. The model's Python dependencies include a custom private library that is not publicly available. Which deployment approach should the engineer use to ensure the private library is available at inference time?

A.Deploy the model to a Databricks model serving endpoint and specify the private library as an environment variable in the endpoint configuration.
B.Register the model with mlflow.pyfunc.log_model and set the pip_requirements parameter to the name of the private library as published on PyPI.
C.Upload the private library to DBFS and reference its path in the model's Python code using dbutils.fs, then rely on the serving endpoint to mount DBFS automatically.
D.Package the private library as a wheel file, include it in the model's conda environment or requirements, and log the model with that dependency so the serving endpoint installs it.
AnswerD

Databricks model serving builds the inference environment from the logged model's declared dependencies, such as a conda.yaml or requirements.txt. Including the private library as a wheel file in the model artifact and referencing it in the environment allows the endpoint to install it during container build, making it available to the model's predict function.

Why this answer

To serve a model with a private dependency, the dependency must be included in the model's environment specification. Packaging the private library as a wheel file and referencing it in the conda environment or requirements ensures the serving endpoint installs it during environment construction, so the model can import it at inference time.

Exam trap

The trap here is assuming that model serving can dynamically fetch private code from DBFS or environment variables, when in reality dependencies must be baked into the environment at build time.

143
MCQmedium

Which component in Databricks is used to manage the lineage of machine learning data, ensuring that you can trace a model back to the exact version of the data it was trained on?

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

Unity Catalog is the centralized governance platform for data and AI on Databricks. It enables automated lineage, allowing users to trace models back to their training data sources. This visibility is essential for ensuring reproducibility, auditing, and compliance within the organization's machine learning and data engineering workflows.

Why this answer

Unity Catalog provides comprehensive lineage and governance for data and AI assets. It tracks how data is transformed and used, linking datasets to the models they trained. This lineage is vital for auditing, compliance, and debugging, as it allows teams to verify that models were trained on the correct, compliant, and current version of the data, maintaining high standards of data integrity in AI workflows.

Exam trap

Candidates often confuse data governance and lineage tools with MLflow tracking. While MLflow tracks experiment artifacts and parameters, Unity Catalog is specifically designed for enterprise-wide data governance and asset lineage.

144
MCQmedium

A machine learning engineer is building a training pipeline in Databricks. They want each run to record the exact Git commit hash, the versions of scikit-learn and MLflow used, and the input data path so the run can be reproduced later. Which MLflow tracking capability should they use to capture this information with the least custom code?

A.mlflow.register_model() to create a model version that stores the Git commit hash and data path in its description.
B.mlflow.log_artifact() to upload a text file containing the Git commit hash, library versions, and data path.
C.mlflow.set_tags() combined with MLflow's automatic logging of the source Git commit and environment.
D.mlflow.log_params() to log the Git commit hash, library versions, and data path as run parameters.
AnswerC

MLflow automatically captures the source Git commit hash and the active conda environment when a run starts, and custom metadata such as a data path can be attached with set_tags. Tags are searchable and displayed separately from parameters and metrics, so the engineer gets reproducibility data with almost no code while keeping the run UI clean.

Why this answer

MLflow Tracking automatically records source information, including the Git commit when the run executes from a repository, and the environment details. Tags provide a searchable place for custom metadata such as the input data path. Together they deliver reproducibility context without custom parsing code, unlike parameters, artifacts, or registry entries that are meant for different purposes.

Exam trap

The trap here is assuming that any run metadata must be logged manually as a parameter or artifact, rather than using MLflow's built-in source and environment tracking plus tags.

145
MCQeasy

A data scientist wants to package a training script with its Python dependencies and parameters so that the same code can be rerun on a different Databricks cluster or shared with a colleague and reproduced exactly. Which MLflow component is designed for packaging and reproducing project code in this way?

A.MLflow Projects
B.MLflow Tracking
C.MLflow Models
D.MLflow Model Registry
AnswerA

MLflow Projects package code with an MLproject file that declares entry points, parameters, and environment dependencies such as a conda environment or Docker image. Running the project recreates the specified environment and executes the entry point, so the same code and dependencies can be reproduced on another cluster or shared with a colleague and produce consistent results.

Why this answer

MLflow Projects are the packaging mechanism: an MLproject file names entry points, parameters, and the environment, and running the project recreates that environment to execute the code. This makes training scripts portable and reproducible across clusters and users, which is exactly the requirement described.

Exam trap

The trap here is confusing MLflow Models, which package trained model artifacts, with MLflow Projects, which package the code and environment needed to run training.

146
MCQmedium

When performing hyperparameter tuning using Hyperopt with SparkTrials on Databricks, what is the primary advantage of using SparkTrials over the standard Trials object?

A.SparkTrials automatically selects the best hyperparameters.
B.SparkTrials allows for the distribution of training jobs across multiple workers.
C.SparkTrials provides built-in visualization of the parameter space.
D.SparkTrials forces the use of a GPU-enabled cluster.
AnswerB

SparkTrials distributes the trials across the Spark cluster, allowing multiple hyperparameter configurations to be tested concurrently. This dramatically shortens the search time for complex models, making it a critical tool for scaling machine learning experiments in environments where compute resources are available but time-to-market is the primary constraint.

Why this answer

SparkTrials enables the parallel execution of hyperparameter trials across the Spark cluster. By distributing the training tasks, it significantly reduces the time required to complete large grid or random searches. Understanding this distinction is essential for optimizing the development lifecycle, as it prevents the bottleneck of sequential execution on a single node, which is unfeasible for complex models or large datasets common in professional enterprise scenarios.

Exam trap

Candidates often think SparkTrials is just for faster training, failing to realize its main purpose is distributing hyperparameter trials across workers to parallelize the search process.

147
MCQmedium

A data scientist is using Databricks to train a deep learning model. They need to monitor training loss and accuracy in real-time. Which tool is best suited for this task?

A.Databricks File System (DBFS) logs.
B.MLflow log_metric API.
C.Spark UI metrics tab.
D.Unity Catalog lineage.
AnswerB

The MLflow log_metric API allows for step-wise tracking of performance metrics. This is the standard way to monitor deep learning models in Databricks, as it provides a clean, web-based UI to plot the training curves and compare the performance of different runs in real-time during the development process.

Why this answer

MLflow's logging API allows users to log metrics at each step of the training loop. By calling `mlflow.log_metric()` during the epochs of a deep learning model, the scientist can visualize the training progress in the MLflow UI. This real-time feedback loop is essential for detecting issues like vanishing gradients or overfitting early in the development lifecycle, preventing wasted compute hours on non-converging or poor-performing models.

Exam trap

Candidates may mistakenly choose general logging tools or platform-level monitoring, overlooking the specific MLflow API designed for tracking granular model metrics during the training loop.

148
MCQmedium

A data scientist has trained a scikit-learn model and wants to log it to MLflow with a custom signature that includes input and output schema. Which MLflow method should they use to log the model along with the signature?

A.mlflow.register_model(model, "model")
B.mlflow.sklearn.log_model(model, "model", signature=signature)
C.mlflow.log_artifact(model, "model")
D.mlflow.log_model(model, "model", signature=signature)
AnswerB

mlflow.sklearn.log_model is the correct method to log a scikit-learn model. It accepts a signature parameter, which can be created using mlflow.models.infer_signature or manually. This logs the model along with the schema, enabling validation and serving. It is the standard way to persist scikit-learn models in MLflow with additional metadata such as input/output types.

Why this answer

The data scientist needs to log a scikit-learn model with a signature. MLflow provides flavor-specific functions like mlflow.sklearn.log_model that accept a signature parameter. This logs the model with the schema, enabling proper validation and serving.

The generic mlflow.log_model is not directly used for scikit-learn, mlflow.log_artifact lacks model metadata, and mlflow.register_model is for registration, not logging. Therefore, mlflow.sklearn.log_model is correct.

Exam trap

The trap here is using the generic log_model or log_artifact instead of the flavor-specific function that supports signatures.

149
MCQmedium

A data scientist is training a machine learning model on Databricks and needs to log parameters, metrics, and model artifacts. Which tracking component should be used to ensure the reproducibility of the experiment runs?

A.Databricks Feature Store
B.MLflow Model Registry
C.MLflow Tracking
D.Delta Lake Versioning
AnswerC

MLflow Tracking provides a robust API and UI for logging parameters, code versions, metrics, and output artifacts. It serves as the primary tool for experiment management, allowing users to organize runs into experiments, compare results visually, and maintain a historical audit trail of model development workflows.

Why this answer

MLflow Tracking is the core component for logging parameters, code versions, metrics, and output files when running machine learning code. By recording these artifacts, teams can compare multiple runs, track model lineage, and ensure that experiments are reproducible across different environments. Integrating MLflow into the workflow is essential for transitioning from local notebook experimentation to production-ready MLOps pipelines within the Databricks ecosystem.

Exam trap

Candidates select general storage solutions like DBFS or standard cloud buckets, overlooking the dedicated MLflow tracking component designed specifically for reproducibility.

150
MCQmedium

A machine learning engineer is using MLflow on Databricks to track an experiment. They want to record the model's hyperparameters and evaluation metrics, but they do not want to save the trained model artifact. Which MLflow API calls should they use?

A.mlflow.start_run() and mlflow.end_run()
B.mlflow.log_artifact() and mlflow.log_model()
C.mlflow.set_tag() and mlflow.set_experiment()
D.mlflow.log_param() and mlflow.log_metric()
AnswerD

mlflow.log_param() records a single hyperparameter key-value pair for the current run, and mlflow.log_metric() records a numeric evaluation metric. These calls fulfill the requirement without saving any model artifact, as they only write metadata to the tracking server. They are the standard MLflow APIs for logging parameters and metrics independently of model serialization.

Why this answer

The scenario requires logging hyperparameters and metrics without saving model artifacts. MLflow provides dedicated functions for this: log_param for individual parameters and log_metric for metrics. These write to the tracking server and do not create artifacts.

Other functions either create artifacts or manage run lifecycle, neither of which meets the specific requirement.

Exam trap

The trap here is assuming that any MLflow logging function will automatically save the model, or that model artifacts are saved by default when logging metrics.

Page 1

Page 2 of 5

Page 3

All pages

Practice Databricks-ML-Assoc by domain

Target a specific domain to shore up weak areas.

See all domains with question counts →