Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Databricks Certified Machine Learning Professional Databricks-Machine-Learning-Professional Exam Questions

Last updated: · 14 practice questions with answers and explanations

Page: 1 / 6 Total 60 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Model Development

Skill tested: Construct Spark ML pipelines with compatible feature transformers and estimators.

A retailer trains a binary classifier from several hundred million labeled transactions stored in Delta tables. The workflow must tokenize a free-text product description, one-hot encode a categorical channel, assemble the features, and fit a logistic regression model. The data volume is too large for a single machine, and preprocessing must be persisted with the fitted model so batch scoring applies identical transformations. Which design best meets these requirements?

Correct Answer: B. Use Spark ML transformers for tokenization, categorical indexing and encoding, and vector assembly, followed by a Spark ML logistic regression estimator in a Pipeline.
Explanation:

A Spark ML Pipeline chains distributed transformers and an estimator, so the same fitted preprocessing stages can be applied during batch scoring. The distributed logistic regression estimator can train against data too large for one machine. Driver-side pandas processing and collecting the table violate the scale constraint. Independently fitting partition models and averaging coefficients is not equivalent to fitting the intended logistic regression objective and does not provide the required standard pipeline behavior.

Question 2

New Single answer

Topic: Model Development

Skill tested: Choose Spark ML or single-node inference based on scoring volume and latency.

A fraud team has a trained Spark ML classifier and must score a daily batch containing 900 million transactions. The model uses standard Spark ML features and fits comfortably within the cluster's available memory when distributed. The scoring job has a four-hour completion window, and the team wants to avoid moving the entire input dataset to a single host. Which inference approach is most appropriate?

Correct Answer: B. Use the Spark ML model's transform operation on a distributed DataFrame and write the predictions as a batch result.
Explanation:

Distributed Spark ML batch scoring keeps the large input distributed and uses the trained model's transformer interface across the cluster. The stated four-hour window is compatible with a batch job, so per-record real-time requests add unnecessary service and network overhead. Driver-side conversion or collection creates a single-node bottleneck and may exhaust memory. The scenario specifies a Spark ML model and very high volume, making distributed transformation the appropriate inference path.

Question 3

New Multiple answers

Topic: Model Development

Skill tested: Configure Spark ML cross-validation and evaluation for distributed hyperparameter selection.

A credit-risk team is comparing logistic regression regularization settings using a Spark ML pipeline. The training set is large enough for distributed training, and the team needs a reproducible model-selection process that evaluates candidate parameters with a binary classification metric. Runtime is limited, so the team wants to avoid an unnecessarily expensive search. Which TWO actions best satisfy these requirements? Select TWO.

Correct Answer: A. Use a bounded parameter grid with TrainValidationSplit when one train/validation partition is an acceptable lower-cost selection method.; E. Use CrossValidator with a deliberately bounded parameter grid and a BinaryClassificationEvaluator configured for the chosen metric.
Explanation:

CrossValidator evaluates the parameter grid across folds and, with a BinaryClassificationEvaluator, selects according to a classification metric; limiting the grid controls its substantial computational cost. TrainValidationSplit is a valid lower-cost alternative when the team accepts a single holdout split rather than cross-validation. It does not perform K-fold validation. A regression evaluator is not appropriate simply because predictions include numeric probabilities, and Spark does not automatically discover a parameter grid.

Question 4

New Multiple answers

Topic: Model Development

Skill tested: Scale Python feature engineering with partitioned pandas functions and safe model loading.

An engineering team must apply a Python feature transformation to a large Spark DataFrame. The transformation requires a fitted object that is too large to broadcast safely, but each partition can process its rows independently once the object is available. The code currently loads the object once per row inside a scalar Python UDF, causing poor throughput. The team wants distributed processing and fewer repeated loads without collecting data to the driver. Which TWO changes are most appropriate? Select TWO.

Correct Answer: A. Use a pandas UDF or mapInPandas-style partition processing where suitable, and avoid reloading the object for every row.; E. Use a partition-oriented pandas function API and load the fitted object once for each iterator or partition invocation.
Explanation:

Partition-oriented pandas function APIs allow Python code to process batches or iterators of rows, reducing per-row invocation overhead. Loading the fitted object once within the worker-side partition or iterator scope avoids repeated initialization while keeping the data distributed. Collecting to the driver defeats scale, and driver globals are not shared memory across executor processes. Combining all partitions into one task would remove parallelism and create a scalability bottleneck.

Question 5

New Single answer

Topic: Model Development

Skill tested: Select vertical or horizontal scaling based on distributed training bottlenecks.

A team trains a single-node gradient-boosting model in a Databricks cluster. Training has become slow as both the training data and feature count grow. Profiling shows one worker is saturated, the model implementation does not distribute a single fit across multiple workers, and the workload fits within the memory of a larger supported node. The team cannot change algorithms before the next release. Which scaling change is most likely to improve training time?

Correct Answer: D. Increase the size of the node used by the single-node training process, subject to workload and cost limits.
Explanation:

Because the training implementation performs a single-node fit and does not distribute that fit, adding worker nodes or Spark executors will not parallelize its core computation. A larger node can provide more CPU and memory to the process, making vertical scaling the relevant immediate option, provided the workload fits and the increased cost is acceptable. Fitting unrelated models per partition does not produce a valid replacement for training on the full dataset.

Question 6

New Single answer

Topic: Model Development

Skill tested: Integrate Optuna trial execution with MLflow tracking for distributed tuning.

A machine-learning group wants to tune a model with Optuna across multiple Databricks workers. Each trial should record its parameters and evaluation metric in MLflow, and the team needs one optimization process to coordinate trials rather than having workers independently create competing studies. Which design is most appropriate?

Correct Answer: D. Use a shared Optuna storage backend for the study, have distributed workers execute trials against that study, and log trial details and metrics with MLflow.
Explanation:

A shared study backend lets distributed workers coordinate trial assignments and results within the same Optuna study. MLflow can track each trial's parameters, metrics, artifacts, and related run information, while Optuna performs the search. Independent in-memory studies do not coordinate and can duplicate work; MLflow tracking does not itself generate Optuna parameter proposals. Creating a separate study for each trial defeats study-level optimization.

Question 7

New Single answer

Topic: Model Development

Skill tested: Choose data-parallel or model-parallel execution for the workload's partitioning structure.

A research team is implementing a neural network whose parameter set is too large for one accelerator's memory. The model itself must be split across multiple accelerators, while each accelerator can process its portion of the computation for the same training examples. The team already has enough aggregate memory and does not need to replicate the full model on every worker. Which parallelization strategy most directly addresses the stated limitation?

Correct Answer: D. Model parallelism, by placing different portions of the model computation or parameters on different workers.
Explanation:

Model parallelism partitions a model's computation or parameters across devices, addressing the constraint that the complete model cannot fit on one accelerator. Data parallelism generally replicates the full model and splits examples, so it does not resolve the stated per-device model-memory limit. Hyperparameter parallelism runs separate trials, and inference batching affects scoring throughput rather than the memory footprint of one training model.

Question 8

New Single answer

Topic: MLOps

Skill tested: Map Databricks lifecycle components to controlled model promotion between environments.

A regulated organization uses separate development, test, and production environments. Developers must be able to iterate on notebooks and code, automated validation must run before promotion, and production must receive only an explicitly approved version of the source and model. The organization wants environment transitions to be repeatable rather than copying notebooks and artifacts manually. Which lifecycle design is best?

Correct Answer: B. Use version-controlled source with Databricks Repos and automated deployment, run validation in the test environment, then promote the approved code and governed model to production.
Explanation:

Version-controlled source and automated deployment make code transitions reproducible, while test-stage validation and explicit approval provide a control point before production. A governed model artifact can be promoted in a manner consistent with the organization's environment process. Editing production first reverses the intended release flow. Automatic promotion skips approval, and manual notebook copying lacks reliable provenance and repeatability.

Question 9

New Multiple answers

Topic: MLOps

Skill tested: Write notebook unit tests and distinguish them from cross-component integration tests.

A team has extracted feature-cleaning logic into functions used by a Databricks notebook. The functions accept small in-memory inputs, while the complete workflow reads governed Delta data, computes features, trains a model, logs it, and later serves predictions. Developers want fast feedback on function behavior and a separate check that the components work together in a test environment. Which TWO testing practices are appropriate? Select TWO.

Correct Answer: A. Create unit tests that pass representative inputs to individual functions and assert expected outputs, including boundary cases.; C. Run an integration test in a controlled test environment that exercises the relevant data, feature, training or model-loading, and inference interfaces together.
Explanation:

Unit tests should isolate individual functions and verify outputs for selected inputs, making them fast and useful during development. An integration test should exercise interactions across pipeline boundaries in a controlled environment, including the relevant data and model interfaces. Notebook rendering alone does not validate end-to-end behavior. Production-only testing is risky and does not isolate functions; endpoint queries test deployed behavior rather than individual helper functions.

Question 10

New Multiple answers

Topic: MLOps

Skill tested: Design isolated Databricks environments with controlled identity, storage, and deployment.

A company serves models to external customers and must prevent development users from accessing production data or changing production deployments. Its teams need separate development and production workspaces, automated releases, and auditability of governed model artifacts. The company also wants to avoid relying on a developer's personal credentials for deployment. Which TWO design choices best support these requirements? Select TWO.

Correct Answer: C. Use separate workspaces and environment-specific permissions, with production data access restricted to approved identities.; D. Use a controlled deployment identity for automation and grant it only the permissions required for the release process.
Explanation:

Separate workspaces and environment-specific access controls limit the blast radius of development activity and protect production data and deployments. A non-personal deployment identity supports auditable automation and avoids dependence on an employee's credentials; its privileges should be least-privilege. Shared notebook secrets and broad administrator rights undermine security and accountability. Uncontrolled copying of production data creates an unnecessary exposure rather than a safe testing strategy.

Question 11

New Single answer

Topic: MLOps

Skill tested: Use governed feature tables and lineage to keep training and serving features consistent.

A lending platform computes customer aggregates for model training and real-time prediction. The team has found that independently reimplementing the aggregates in serving code creates training-serving skew. The organization uses Unity Catalog and wants discoverable, governed feature data with lineage, while still allowing models to consume consistent features. What is the best approach?

Correct Answer: A. Centralize reusable feature definitions in governed feature tables or an equivalent supported feature workflow, and use the corresponding feature lookup or retrieval path for model use.
Explanation:

Centralized, governed feature definitions improve reuse, discoverability, and lineage, and supported feature lookup workflows help maintain consistency between training and inference. Separate implementations create the very skew the scenario describes. Notebook variables are neither durable nor a governed shared feature source. Embedding observed feature values in a model would not provide current customer aggregates at inference time.

Question 12

New Single answer

Topic: MLOps

Skill tested: Select appropriate MLflow tracking and registry components for model reproducibility.

A data-science team runs experiments in multiple workspaces and needs to compare metrics, parameters, and artifacts, then identify a specific approved model version for deployment. Workspace-local experiment records are insufficient for the organization's audit process, and the model must be managed with governed access. Which approach best addresses both experiment tracking and model lifecycle needs?

Correct Answer: B. Use a shared MLflow tracking arrangement for experiment records and Unity Catalog model registration for governed model versions and access.
Explanation:

MLflow tracking captures experiment parameters, metrics, and artifacts as runs, supporting comparison and reproducibility. Unity Catalog model registration provides governed model version management and access controls suitable for an approved deployment lifecycle. Notebook output and comments are not dependable tracking or governance mechanisms. An endpoint name does not replace experiment lineage, and a personal unmanaged directory provides weak access control and auditability.

Question 13

New Single answer

Topic: Model Deployment

Skill tested: Choose canary rollout controls for gradual production model traffic.

A high-traffic recommendation service is moving from model version 12 to version 13. The team wants to expose the new version to a small portion of requests, monitor latency and business metrics, and increase exposure only if the initial results are acceptable. They need to reduce the risk of a full cutover, and the service can route requests to multiple serving configurations. Which rollout strategy best fits?

Correct Answer: D. Use a canary rollout by directing a limited share of traffic to the new version, monitoring it, and adjusting or reverting based on results.
Explanation:

A canary rollout exposes the new version to limited production traffic first, allowing the team to observe real serving behavior and business metrics before expanding exposure. This matches the requirement to reduce risk through gradual traffic allocation and preserve the ability to respond to regressions. An immediate replacement and a full blue-green cutover both shift all traffic at once. Offline training metrics cannot reveal every production behavior.

Question 14

New Multiple answers

Topic: Model Deployment

Skill tested: Register and query a custom PyFunc model with artifacts in Unity Catalog.

A team packages a custom Python prediction object as an MLflow PyFunc model. The model needs a tokenizer artifact at inference time, and the company requires governed model registration in Unity Catalog. An application will invoke the deployed model through a serving REST endpoint, and deployment credentials must not be embedded in the model code. Which TWO implementation choices are appropriate? Select TWO.

Correct Answer: B. Log the tokenizer as a model artifact and implement the PyFunc model's loading and prediction behavior to use that artifact.; D. Register the model in Unity Catalog under an authorized catalog, schema, and model name, following the required access controls.
Explanation:

MLflow PyFunc models can include logged artifacts, and the model loading logic can retrieve the packaged tokenizer from the model artifact directory when the serving environment loads the model. Registering the model in Unity Catalog provides the governed model identity and access controls required by the scenario. Local filesystem dependencies are not reliably available in the serving environment, and embedding endpoint credentials in source code is unsafe. REST requests must use the endpoint's supported authentication and input format.