Databricks Certified Machine Learning Associate · Domain 4 · 12% of exam

Model Deployment

Drill 17 practice questions focused entirely on Model Deployment for the Databricks Databricks-ML-Associate exam. Tap an answer for instant feedback and a full explanation — no sign-up, always free.

Verified answer17 questions
Question 1 of 17

A data scientist has a scikit-learn model that expects a pandas DataFrame and returns a prediction plus a probability score. They want to distribute batch inference across a large Spark DataFrame by grouping records by 'region' and applying the model to each group's data as a pandas DataFrame using groupBy().applyInPandas(). What must be provided for this to execute correctly on Spark?

Reviewed for accuracy · Report an issue
Question 2 of 17

A retail analytics team needs to score customer churn predictions for its entire 40-million-row customer base once every night. The results are written to a Delta table that a BI dashboard reads the next morning. There is no requirement for sub-second response times, and no external application calls the model interactively. Which deployment paradigm best fits this workload?

Reviewed for accuracy · Report an issue
Question 3 of 17

A data scientist has registered a model as `main.ml.churn_model` (version 3) in Unity Catalog. They want to programmatically create a Databricks Model Serving endpoint from a notebook using the MLflow Deployments SDK so the model can serve real-time requests. Which approach correctly references the Unity Catalog model in the endpoint configuration?

Reviewed for accuracy · Report an issue
Question 4 of 17

A data scientist has a Databricks Model Serving endpoint that currently routes 100% of traffic to version 3 of a registered Unity Catalog model. The team has just trained version 4 and wants to safely evaluate it in production by sending only 10% of live requests to the new version while the remaining 90% continues to hit version 3. What is the recommended way to accomplish this on the existing Model Serving endpoint?

Reviewed for accuracy · Report an issue
Question 5 of 17

A data scientist has deployed a scikit-learn classifier as a Databricks Model Serving endpoint backed by a model registered in Unity Catalog. A downstream application team wants to send inference requests over HTTP. Which approach correctly sends a single-record request to the endpoint's REST API?

Reviewed for accuracy · Report an issue
Question 6 of 17

A fraud-detection team must score individual credit-card transactions and return a prediction to the payment application within tens of milliseconds, one transaction at a time, as each purchase occurs. The model is already registered in Unity Catalog. Which deployment paradigm should the team use to meet this requirement?

Reviewed for accuracy · Report an issue
Question 7 of 17

A data science team has deployed a fraud-detection model to a Databricks Model Serving endpoint. The model is only queried during business hours, and the team wants to minimize compute costs during nights and weekends when no requests arrive, while still being able to serve requests automatically when traffic resumes. Which endpoint configuration best meets this requirement?

Reviewed for accuracy · Report an issue
Question 8 of 17

A data scientist has trained a scikit-learn model on a single node and registered it with MLflow. They now need to score 500 million rows stored in a Spark DataFrame. They want to apply the model's predictions column-by-column using vectorized operations that process batches of rows as pandas Series for maximum throughput, without grouping the data. Which approach best fits this requirement?

Reviewed for accuracy · Report an issue
Question 9 of 17

A data engineer needs to score a 500-million-row Spark DataFrame using a scikit-learn model that was logged with MLflow and registered in Unity Catalog as `main.ml.churn_model` with the alias `champion`. The scoring must run as a distributed batch job on a Spark cluster, and the model expects several feature columns already present in the DataFrame. Which approach correctly applies the registered model for distributed batch inference?

Reviewed for accuracy · Report an issue
Question 10 of 17

A data engineer registered a scikit-learn model in Unity Catalog and wants to score a 200-million-row Delta table stored in the lakehouse. Latency is not a concern, but the job must finish within a scheduled nightly window and leverage the full cluster. Which approach best fits these requirements?

Reviewed for accuracy · Report an issue
Question 11 of 17

A data engineer needs to score a large Spark DataFrame in a nightly batch job using a model that was registered in Unity Catalog as `prod.ml.churn_model` with the alias `champion`. They plan to use `mlflow.pyfunc.spark_udf` to distribute inference across the cluster. Which code snippet correctly loads the model into a Spark UDF for this batch scoring task?

Reviewed for accuracy · Report an issue
Question 12 of 17

A data engineer needs to score a 200-million-row Spark DataFrame using a registered scikit-learn model in Unity Catalog. Before prediction, each row must be enriched by calling a preprocessing function that depends on grouping records by 'store_id' to compute a rolling group-level statistic that the model expects as a feature. The engineer wants the enrichment and prediction to run in a single distributed pass. Which approach best satisfies these requirements?

Reviewed for accuracy · Report an issue
Question 13 of 17

A data engineer needs to score 500 million records in a nightly Spark batch job using an MLflow model registered in Unity Catalog. Each record must first be grouped by 'store_id' so that a store-specific normalization step (implemented as custom Python logic requiring the full group in memory) is applied before the model's predictions are generated. Which approach correctly handles the per-group preprocessing and inference in a distributed manner?

Reviewed for accuracy · Report an issue
Question 14 of 17

A data engineer needs to score 40 million records nightly using a scikit-learn model logged with MLflow and registered in Unity Catalog. Each prediction depends only on that row's feature values (no grouping or per-group state), and the input DataFrame is a Spark DataFrame. The team wants the simplest approach that distributes the scoring across the cluster without writing custom grouping logic. Which approach should they use?

Reviewed for accuracy · Report an issue
Question 15 of 17

A data engineering team must score 40 million customer records once every night using a model registered in Unity Catalog. The scoring output feeds a downstream reporting table, and there is no requirement for sub-second per-record latency. The team wants the most efficient and cost-appropriate way to run this workload on Databricks. Which approach should they choose?

Reviewed for accuracy · Report an issue
Question 16 of 17

A data engineer needs to score incoming IoT sensor readings in near-real-time. Records arrive continuously in a Delta table, and the team wants each new micro-batch to be scored by a model registered in Unity Catalog, with predictions written continuously to an output Delta table. Which approach correctly implements this streaming inference pipeline?

Reviewed for accuracy · Report an issue
Question 17 of 17

A data engineering team ingests transaction events into a Delta table that is continuously updated. They want to score each incoming micro-batch of records in near real time using a model that was logged with MLflow and registered in Unity Catalog. They plan to read the Delta table as a streaming DataFrame and apply the model. Which approach correctly enables continuous scoring of the streaming data with the registered model?

Reviewed for accuracy · Report an issue

More Databricks-ML-Associate practice

Keep going with the other Databricks Certified Machine Learning Associate domains, or take a full timed mock exam.

← Back to Databricks-ML-Associate overview