Courseiva

CCNA Databricks Machine Learning Questions

75 of 79 questions · Page 1/2 · Databricks Machine Learning topic · Answers revealed

1
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

2
Multi-Selecthard

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

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

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

Why this answer

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

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

Exam trap

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

3
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

4
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

5
MCQeasy

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

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

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

Why this answer

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

Thus, mlflow.register_model is the appropriate choice.

Exam trap

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

6
Multi-Selecthard

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

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

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

Why this answer

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

Exam trap

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

7
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

8
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

9
MCQhard

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

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

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

Why this answer

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

Exam trap

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

10
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

11
Multi-Selecthard

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

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

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

Why this answer

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

Exam trap

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

12
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

13
MCQmedium

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

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

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

Why this answer

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

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

Exam trap

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

14
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

15
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

16
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

17
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.

18
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.

19
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.

20
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.

21
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.

22
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.

23
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.

24
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.

25
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.

26
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.

27
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.

28
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.

29
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.

30
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.

31
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.

32
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.

33
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.

34
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.

35
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.

36
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.

37
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.

38
MCQmedium

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

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

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

Why this answer

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

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

Exam trap

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

39
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

40
Multi-Selecthard

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

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

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

Why this answer

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

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

Exam trap

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

41
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

42
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

43
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

44
MCQmedium

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

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

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

Why this answer

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

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

Exam trap

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

45
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

46
Multi-Selecthard

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

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

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

Why this answer

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

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

Exam trap

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

47
Multi-Selecthard

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

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

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

Why this answer

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

Exam trap

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

48
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

49
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

50
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

51
Multi-Selectmedium

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

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

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

Why this answer

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

Exam trap

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

52
Multi-Selectmedium

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

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

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

Why this answer

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

Exam trap

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

53
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

54
MCQhard

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

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

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

Why this answer

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

Exam trap

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

55
MCQeasy

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

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

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

Why this answer

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

Exam trap

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

56
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

57
MCQmedium

A data scientist is using MLflow to train a scikit-learn model on Databricks. They call mlflow.sklearn.autolog() before fitting the model. After the run completes, they need to retrieve the automatically logged model and load it for batch inference in a separate notebook. Which approach correctly retrieves the logged model for loading?

A.Access the model directly from the DBFS path '/dbfs/FileStore/models/<run_id>' and load it using joblib.load().
B.Read the model from the Delta table that MLflow automatically creates in the default database when autologging is enabled.
C.Use the MLflow run ID to construct the artifact URI 'runs:/<run_id>/model' and pass it to mlflow.sklearn.load_model().
D.Query the MLflow tracking server's REST API endpoint '/api/2.0/mlflow/runs/get' and extract the model binary from the response.
AnswerC

mlflow.sklearn.autolog() logs the trained model to the run's artifact path under 'model'. The run ID uniquely identifies the run, and the artifact URI 'runs:/<run_id>/model' is the standard way to reference that logged model. Passing it to mlflow.sklearn.load_model() correctly loads the model for inference.

Why this answer

With MLflow autologging, the trained model is saved as an artifact in the run's artifact directory under the name 'model'. To load it later, you need the run ID and the artifact path. The 'runs:/' URI scheme provides a portable reference to the run's artifacts, and mlflow.sklearn.load_model() correctly interprets that URI to reconstruct the model.

Exam trap

The trap here is assuming that autologging stores models in a fixed DBFS location or a Delta table, when it actually logs them as artifacts tied to the run ID.

58
MCQeasy

A data engineer is working with a large Delta table and wants to optimize it for machine learning feature engineering. They frequently filter data by a column named 'event_date' and join on a column named 'user_id'. Which Delta Lake feature should they use to improve query performance?

A.Enabling change data feed (CDF).
B.Using OPTIMIZE with file compaction.
C.Partitioning by 'user_id'.
D.Z-ORDER BY on 'user_id' and 'event_date'.
AnswerD

Z-ORDER BY co-locates related data in the same set of files, improving data skipping for queries that filter on the specified columns. By clustering on 'user_id' and 'event_date', queries that filter by 'event_date' and join on 'user_id' can skip irrelevant files, reducing I/O and speeding up feature engineering. This is the recommended optimization for such access patterns.

Why this answer

Z-ORDER BY clusters data on the specified columns, enabling efficient data skipping for filters and joins. Since the engineer filters by 'event_date' and joins on 'user_id', Z-ORDER on both columns will significantly improve performance. Partitioning on high-cardinality 'user_id' is inefficient, and CDF or simple compaction do not address the need for co-locating related data.

Exam trap

The trap here is assuming that partitioning always improves performance, but for high-cardinality columns it can create too many small files and worsen performance.

59
MCQhard

A machine learning engineer is using Databricks Feature Store to create a training dataset. They want to ensure that the features used during training are exactly the same as those served at inference time. Which Feature Store capability should they rely on?

A.Point-in-time lookups when creating the training set
B.Feature freshness monitoring
C.Automatic feature scaling during training
D.Online store for low-latency feature retrieval
AnswerA

Point-in-time lookups ensure that the training dataset is constructed using feature values as they existed at the time of each label event, preventing data leakage. This mirrors the feature values that would be available at inference time, ensuring consistency between training and serving. It is a core capability of Databricks Feature Store for time-series correctness.

Why this answer

Databricks Feature Store provides point-in-time lookups to create training datasets that reflect the state of features at the time of each label. This prevents leakage and ensures that the same feature values would be available at inference. Other options are either not Feature Store capabilities or do not address training-serving skew.

Exam trap

The trap here is thinking that the online store alone guarantees consistency, but training-serving consistency also requires point-in-time correctness during training set creation.

60
MCQmedium

Refer to the exhibit. A data scientist is attempting to deploy a model using the MLflow client. The error above occurs during the deployment script. What is the most likely cause of this failure?

A.The cluster does not have the necessary MLflow libraries installed.
B.The model has not been registered in the Model Registry with the specified name and version.
C.The user lacks permissions to read the model version from the Registry.
D.The model version is still in the 'Archived' state and cannot be accessed.
AnswerB

The RestException explicitly confirms that the registry lookup failed for the provided name and version. This indicates a mismatch between the deployment configuration and the actual state of the registry. The user must verify the registration status via the UI or list_model_versions to confirm existence.

Why this answer

This error indicates that the specified model version does not exist in the Registry, either because it was never registered, was deleted, or the name/version number was referenced incorrectly. In a Databricks context, verify that the model has been successfully logged and registered using mlflow.register_model. This is critical for deployment pipelines as it validates that the artifact exists before the serving infrastructure attempts to load the model file.

Exam trap

Candidates often assume that simply training a model makes it available for serving. They overlook the mandatory step of explicitly registering the model in the MLflow Model Registry first.

61
MCQhard

A data scientist registered a model in Unity Catalog and now wants to serve it as a low-latency REST endpoint for an application. They need automatic scaling, a secure endpoint URL, and the ability to update the served model version without redeploying infrastructure. Which Databricks capability should they use?

A.A SQL warehouse with a user-defined function wrapping the model.
B.An all-purpose cluster running an MLflow model server manually.
C.Model Serving with a served entity pointing at the registered model version.
D.A Databricks job that runs a notebook on a schedule to score requests.
AnswerC

Databricks Model Serving creates managed REST endpoints that automatically scale, provide a secure URL, and can be configured with a served entity that references a Unity Catalog model and version. Updating the served version changes what the endpoint serves without rebuilding infrastructure, which matches the requirements for low latency, security, and version flexibility in this scenario.

Why this answer

Model Serving provides managed, autoscaling REST endpoints backed by registered model versions. Configuring a served entity that references a Unity Catalog model and version gives a secure URL and lets the team change the served version without rebuilding the endpoint, satisfying low-latency, secure, and updatable serving needs in one capability.

Exam trap

The trap here is treating scheduled batch jobs or SQL warehouses as substitutes for a managed low-latency serving endpoint.

62
MCQmedium

When a data scientist needs to share an MLflow experiment with a team member, what is the best practice for ensuring collaborative access within Databricks?

A.Exporting the experiment to a CSV file and emailing it.
B.Granting appropriate permissions on the experiment within the MLflow UI.
C.Moving the experiment to a public folder in DBFS.
D.Giving everyone admin access to the workspace.
AnswerB

Granting permissions within the Databricks UI ensures secure and efficient collaboration. This allows team members to view or manage the experiment directly, maintaining data governance and auditability. It is the recommended practice for teams, as it centralizes access management and ensures that experiment results remain securely contained within the workspace.

Why this answer

Sharing experiments is done by managing permissions on the experiment object itself. In Databricks, you can grant specific permissions (e.g., CAN_VIEW, CAN_MANAGE) to individual users or groups. This allows for controlled collaboration where team members can see experiment results without necessarily having the ability to modify or delete them, adhering to the principle of least privilege while fostering efficient teamwork during the development process.

Exam trap

Candidates often assume that sharing a notebook automatically grants access to the associated experiments. They fail to realize that experiment permissions are managed separately within the MLflow UI.

63
MCQmedium

A data scientist wants to speed up the process of finding the optimal hyperparameters for a machine learning model. Which Databricks-supported library is optimized for distributed hyperparameter tuning?

A.Pandas
B.Hyperopt
C.Matplotlib
D.MLflow Tracking
AnswerB

Hyperopt is a library designed specifically for distributed hyperparameter optimization. When combined with SparkTrials on Databricks, it allows for massive parallelization of hyperparameter search, enabling efficient exploration of complex model parameter spaces by distributing trials across available cluster nodes, which is essential for deep learning and boosting models.

Why this answer

Hyperopt is a widely used Python library for distributed hyperparameter optimization. In Databricks, it integrates seamlessly with Spark, allowing the distribution of trial runs across a cluster of nodes. This dramatically reduces the time required to search through large hyperparameter spaces, enabling data scientists to train more complex models and achieve better performance in a fraction of the time compared to serial tuning.

64
Multi-Selecthard

A data scientist is using Databricks Feature Store to create a feature table for a recommendation model. They want to ensure that the feature table can be used for both training and batch scoring, and that it supports point-in-time correctness. Which two actions must they take when creating the feature table? (Choose two.)

Select 2 answers
A.Set the table as a streaming table.
B.Define a primary key for the feature table.
C.Partition the feature table by the primary key.
D.Specify a timestamp key for point-in-time correctness.
E.Enable time travel on the feature table.
AnswersB, D

Defining a primary key is essential for a feature table in Databricks Feature Store. The primary key uniquely identifies each entity (e.g., user_id, item_id) and is used to join features to training data and for online serving. Without a primary key, the feature table cannot be properly registered or used for lookups, and point-in-time correctness relies on the key to match features to the correct entity at the correct time.

Why this answer

To create a feature table in Databricks Feature Store that supports training, batch scoring, and point-in-time correctness, the data scientist must define a primary key and a timestamp key. The primary key identifies entities for joins, and the timestamp key enables time-aware joins to prevent leakage. Other actions like enabling time travel manually, partitioning, or using streaming tables are not required and may be unnecessary or counterproductive.

Thus, the correct choices are defining a primary key and specifying a timestamp key.

Exam trap

The trap here is assuming that time travel must be manually enabled or that partitioning is required, rather than focusing on the key definitions.

65
MCQhard

What is the primary technical limitation when deploying an MLflow model that has custom Python dependencies not included in the standard Databricks Runtime?

A.The model will automatically install the missing libraries.
B.The model will be rejected by the registry.
C.The serving container will fail due to missing runtime libraries.
D.The model cannot be used with MLflow.
AnswerC

If the model's environment specification does not include all necessary Python libraries, the container environment will lack the code required to execute the model's logic. This results in runtime errors or container startup failures because the serving engine cannot resolve the imports required by the model's execution code.

Why this answer

When using custom libraries, the inference environment must be able to install and manage these dependencies. MLflow handles this by utilizing environment specifications (like Conda or pip requirements). If these dependencies are not explicitly defined or cannot be resolved at deployment time, the serving container will fail to start.

This highlights the importance of properly managing the environment specification to ensure the target serving infrastructure has the necessary software components available.

Exam trap

Many test-takers blame code syntax errors for deployment failures, missing that missing runtime environment dependencies cause serving containers to fail at startup.

66
MCQmedium

A machine learning engineer needs to track hyperparameter tuning runs and log artifacts using MLflow inside a Databricks Notebook. Which approach should be used to ensure runs are automatically nested under a parent run?

A.Call mlflow.start_run() inside a loop without any arguments while an active run exists.
B.Utilize mlflow.start_run(nested=True) inside the hyperparameter optimization loop while a parent run is active.
C.Set the MLFLOW_PARENT_RUN_ID environment variable manually before invoking mlflow.start_run().
D.Configure the MLflow client to use a hierarchical tracking URI scheme before logging parameters.
AnswerB

The nested=True argument tells MLflow to create a child run under the currently active parent run context. This maintains proper organization in the tracking UI, allowing clean grouping of multiple training iterations associated with a single overarching optimization experiment.

Why this answer

Using `mlflow.start_run()` with a `nested=True` parameter ensures that child runs are correctly organized beneath an active parent run within the MLflow tracking server. This hierarchical structuring is essential for organizing complex hyperparameter optimization sweeps, enabling data scientists to easily compare child performance metrics against the overarching parent experiment trial in the Databricks UI.

Exam trap

Candidates often run multiple mlflow.start_run() calls without nesting, leading to cluttered dashboards. They fail to use the nested parameter, which is specifically designed for hierarchical hyperparameter tuning organization.

67
MCQmedium

A machine learning engineer is deploying a model using MLflow Model Serving on Databricks. They want to ensure the endpoint can handle bursts of traffic and automatically scale. Which configuration should they set when creating the served model?

A.Enable 'autoscaling' by setting the 'autoscale' flag to true in the served model configuration.
B.Set the 'scale_to_zero_enabled' parameter to true to allow the endpoint to scale down to zero when idle.
C.Set the 'workload_size' parameter to 'Large' to handle high traffic volumes.
D.Configure the 'min_replicas' and 'max_replicas' parameters to define the scaling range for the endpoint.
AnswerD

MLflow Model Serving on Databricks uses the min_replicas and max_replicas parameters to control automatic scaling. Setting a minimum ensures baseline capacity, while the maximum allows the endpoint to scale out during traffic bursts. This configuration enables the serving infrastructure to dynamically adjust replicas based on load.

Why this answer

To handle traffic bursts with automatic scaling, you must configure the min_replicas and max_replicas parameters. These define the range within which the serving infrastructure can dynamically add or remove replicas based on incoming request load, ensuring the endpoint scales out during peaks and scales in during lulls.

Exam trap

The trap here is confusing the workload_size parameter, which controls per-replica resources, with the replica count parameters that enable horizontal scaling.

68
MCQmedium

A machine learning engineer is using Databricks Feature Store to create a feature table for a model that predicts customer churn. The feature table includes customer demographics and transaction history. The engineer wants to ensure that the model can access the latest feature values during online inference. What should the engineer do?

A.Enable change data feed on the feature table to capture updates.
B.Set up a Databricks SQL warehouse to query the feature table.
C.Publish the feature table to an online store using the Databricks Feature Store API.
D.Use MLflow to log the feature table as a model artifact.
AnswerC

Publishing the feature table to an online store makes the features available for low-latency lookups during online inference. The Databricks Feature Store supports online stores like Amazon DynamoDB or Azure Cosmos DB, enabling real-time serving of feature values. This is required to ensure the model can access the latest features at inference time.

Why this answer

To serve features for online inference, the feature table must be published to an online store. Databricks Feature Store provides APIs to publish feature tables to low-latency databases, enabling the model to retrieve the latest feature values in real time. This is a key step when deploying models that require online features, ensuring consistency between training and serving.

Exam trap

The trap here is confusing Delta Lake features like change data feed with online serving capabilities, which require a dedicated online store.

69
MCQhard

Which approach is most efficient for handling high-cardinality categorical features in a machine learning model while maintaining compatibility with standard Databricks model serving?

A.One-hot encoding the features inside the model inference function.
B.Using the Feature Store to store pre-computed embeddings.
C.Converting features to strings and letting the model handle them natively.
D.Running a Spark job on every prediction request to re-encode the features.
AnswerB

Storing pre-computed embeddings in the Feature Store is the most efficient way to handle high-cardinality features. It offloads the transformation logic from the real-time inference request, allowing the model to receive dense, meaningful representations. This significantly reduces latency and ensures consistent model performance in a production environment with high-cardinality data inputs.

Why this answer

Using Feature Store to pre-compute and transform high-cardinality features allows you to store them as embeddings or encoded vectors. This shift moves the expensive computation from the inference phase to an offline batch process, significantly reducing latency. This approach is compatible with standard model serving, as the model only receives the pre-calculated features, ensuring consistent and performant real-time inference within the Databricks ecosystem.

Exam trap

Candidates often suggest performing real-time one-hot encoding or dynamic embedding generation during inference, which causes massive latency issues.

70
MCQmedium

A data scientist is using MLflow on Databricks to track experiments. After running several training jobs, they notice that the run metrics are recorded but the model artifact is missing when they view the run details. They logged the model using the default MLflow API. What is the most likely cause?

A.The model was too large to be stored in the MLflow artifact store, so it was automatically skipped.
B.The model was logged using mlflow.sklearn.log_model, but the run was not ended, so artifacts are not persisted.
C.The MLflow tracking server was not configured to log artifacts, so only metrics were recorded.
D.The model artifact was logged outside of the active MLflow run context, so it was not associated with the run.
AnswerD

MLflow associates artifacts with the active run. If log_model is called without an active run context, the model is saved to the artifact store but not linked to any run. The run metrics appear because they were logged within a run, but the model artifact is missing from that run's details. To fix, ensure logging occurs inside a with mlflow.start_run() block.

Why this answer

The model artifact is missing because log_model was called outside an active MLflow run, so it was not linked to the run. Metrics were logged within the run, explaining their presence. To ensure artifacts are associated, all logging calls must occur inside a run context created by mlflow.start_run().

This is a common oversight when refactoring code or using helper functions.

Exam trap

The trap here is assuming that logging a model automatically associates it with the most recent run, when MLflow requires an active run context.

71
MCQmedium

What is the primary function of the 'Model Registry' in the Databricks ML ecosystem?

A.To store raw training datasets for feature engineering
B.To provide a centralized platform for model lifecycle management
C.To execute distributed hyperparameter tuning experiments
D.To monitor real-time inference drift in production
AnswerB

The Model Registry acts as the central governance point for models. It provides functionalities for versioning, stage transitions (e.g., Staging to Production), and centralized model documentation, which is essential for ensuring that only approved, validated models are deployed into production environments within a controlled organizational workflow.

Why this answer

The Model Registry provides a centralized hub for managing the full lifecycle of a machine learning model. It allows teams to track versions, manage model stages (Staging, Production, Archived), and facilitate collaboration. By serving as a 'source of truth' for model status, it ensures that stakeholders can confidently transition models from development to production while maintaining complete audit trails and lineage of all changes applied to the model artifacts.

Exam trap

Candidates confuse the Model Registry with the MLflow Tracking UI. Tracking is for experiment metadata, whereas the Registry is specifically for managing the deployment lifecycle and model promotion stages.

72
MCQmedium

A machine learning engineer is using MLflow Tracking on Databricks to compare multiple runs. They want to programmatically retrieve the best run based on a metric called 'rmse' from an experiment. Which MLflow API call should they use?

A.`mlflow.get_experiment_by_name()` and then filter runs by metric
B.`mlflow.get_run()` with the run ID of the best run
C.`mlflow.list_run_infos()` and manually iterate to find the minimum 'rmse'
D.`mlflow.search_runs()` with `order_by=['metrics.rmse ASC']`
AnswerD

`mlflow.search_runs()` returns a pandas DataFrame of runs and supports ordering by metrics. Using `order_by=['metrics.rmse ASC']` sorts runs by the 'rmse' metric in ascending order, so the first row is the run with the lowest RMSE. This is the correct programmatic way to retrieve the best run.

Why this answer

`mlflow.search_runs()` is designed to query runs within an experiment and can order results by metrics. By specifying `order_by=['metrics.rmse ASC']`, the run with the lowest RMSE appears first. This is efficient and programmatic, unlike manually iterating runs or using functions that retrieve single runs or experiment metadata.

Exam trap

The trap here is assuming that `mlflow.get_run()` or `mlflow.list_run_infos()` can directly sort or filter runs by metrics, when they either require a known run ID or lack metric data.

73
MCQeasy

A data scientist has registered a model in the Databricks Model Registry and wants to deploy it as a REST API endpoint for real-time inference. Which Databricks feature should they use?

A.Databricks Jobs
B.MLflow Tracking
C.Databricks SQL Analytics
D.MLflow Model Serving
AnswerD

MLflow Model Serving in Databricks provides a fully managed, scalable endpoint for real-time inference of models registered in the Model Registry. It handles deployment, scaling, and monitoring, and exposes a REST API. This directly matches the requirement to serve a registered model as a REST endpoint without managing infrastructure.

Why this answer

For real-time inference of registered models, Databricks offers MLflow Model Serving, which creates a managed REST endpoint. It integrates with the Model Registry, allowing you to serve specific model versions with automatic scaling. Other options are for analytics, tracking, or batch processing, not for serving models as APIs.

Exam trap

The trap here is confusing model tracking or batch scoring with real-time serving; MLflow Tracking records experiments but does not serve models.

74
MCQhard

Refer to the exhibit. A user attempts to transition a model to production, but the code fails with the provided error. What is the most likely cause?

A.The cluster does not have sufficient permissions to read the model.
B.The model has not been registered in the Model Registry.
C.The model version is archived and cannot be transitioned.
D.The model artifact is missing from the underlying DBFS storage.
AnswerB

The error indicates the registry cannot find the entity 'production_model'. This signifies that no model with that specific name exists within the registry. The user must first register the model or ensure they are pointing to the correct registered model name before calling transition operations.

Why this answer

The error indicates that the Model Registry cannot locate the model name provided. In Databricks, models must be registered before they can be transitioned to specific stages like 'Production'. The user likely misspelled the model name or is attempting to reference a model that has not yet been registered within the current workspace environment.

Verifying the Model Registry UI will confirm the correct naming conventions and existing model registrations.

Exam trap

Users often assume that logging a model with mlflow.log_model automatically registers it in the Model Registry. They forget that registration is a separate, explicit step required for lifecycle management.

75
MCQmedium

Which approach is most efficient for tracking hyperparameter tuning metrics across thousands of runs on Databricks?

A.Logging results to a text file.
B.Using MLflow Experiments UI.
C.Printing metrics to the notebook logs.
D.Manually updating a spreadsheet.
AnswerB

The MLflow Experiments UI is designed specifically for this use case. It allows users to group, sort, and filter runs based on metrics and parameters, making it easy to compare thousands of runs. It is the most effective way to gain insights and find the optimal model configuration quickly.

Why this answer

Using the MLflow Search API or the Experiments UI is the standard approach to manage and analyze large volumes of experiment results. These tools provide filtering, sorting, and visualization capabilities that allow data scientists to quickly identify the best performing models from thousands of candidates. This efficiency is necessary for iterative machine learning, where the ability to derive insights from vast amounts of experiment data drives faster and more accurate model development.

Exam trap

Candidates often choose manual logging inspection or flat file exports instead of leveraging the built-in filtering and visualization capabilities of the MLflow UI and Search API.

Page 1 of 2 · 79 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Databricks Machine Learning questions.