Home / ML Associate practice test / Model Deployment

Free · 8 questions with explanations

Model Deployment: Databricks Machine Learning Associate Practice Questions

Exam-style questions on Model Deployment. Pick your answer, then open the explanation to see why it's right — and why the other options are wrong.

1 Model Deployment

A batch scoring script constructs JSON requests for a custom model endpoint using pandas rows. The team wants the recommended DataFrame request format that preserves column ordering. Which payload style should they prefer?

  1. Ainputs, because every pandas-based model endpoint expects tensors even when the model signature is tabular
  2. Binstances, because row-oriented tensor payloads are the default for all MLflow pyfunc table models
  3. Cdataframe_split, because Databricks recommends the split-oriented pandas format and it preserves column order
  4. Ddataframe_records, because records orientation guarantees column order more strongly than split orientation
  5. Epredictions, because endpoint requests should mirror the response wrapper used by Databricks serving APIs
Show answer & explanation

Correct answer: C

WHY C: For pandas-style tabular scoring requests, Databricks recommends dataframe_split and notes that it preserves column ordering better than records orientation. WHY NOT A: inputs is for tensor-style payloads. WHY NOT B: instances is also for tensor-oriented inputs. WHY NOT D: records does not guarantee column order. WHY NOT E: predictions is the response wrapper, not the request format.

2 Model Deployment

A serving endpoint for a custom model is already deployed. The engineer wants to call it from an application for real-time inference. Which statement is correct?

  1. AThe application should send a scoring request to the serving endpoint invocation URL using a supported request format and valid authentication
  2. BThe application must query the Unity Catalog model registry directly, because registry versions expose prediction methods over HTTP
  3. CThe application must always call the endpoint through Databricks SQL, because REST access is supported only for foundation models
  4. DThe application should poll the training run artifacts in MLflow, because deployed endpoints do not accept external prediction requests
  5. EThe application must upload a notebook to the endpoint with every request so the serving system can reconstruct the model context
Show answer & explanation

Correct answer: A

WHY A: Real-time inference on a Databricks serving endpoint is performed by sending authenticated requests to the endpoint invocation API using supported payload formats. WHY NOT B: The registry stores versions but is not the online scoring API. WHY NOT C: REST invocation is supported for custom model endpoints. WHY NOT D: MLflow artifacts are not the serving interface. WHY NOT E: Notebooks are not uploaded per request.

3 Model Deployment

A team wants to roll out a new model gradually while most live traffic still goes to the current stable model. What is the purpose of traffic splitting on serving endpoints?

  1. ATo divide a training dataset into folds before cross-validation so each candidate model sees a different validation sample
  2. BTo route percentages of live inference requests to different served models or endpoint configurations during rollout
  3. CTo partition feature tables across storage locations so online and offline features are read from separate catalogs
  4. DTo alternate request payload formats between dataframe_split and tensor inputs for automatic schema discovery
  5. ETo divide one large prediction vector into smaller chunks so a single model can score them on different GPUs in parallel
Show answer & explanation

Correct answer: B

WHY B: Traffic splitting is used to send controlled percentages of live inference traffic to different served entities, supporting gradual rollout or comparison. WHY NOT A: That is dataset splitting for training, not serving. WHY NOT C: That concerns storage design, not serving traffic. WHY NOT D: Request payload formats are unrelated. WHY NOT E: Traffic splitting is not model-internal tensor sharding.

4 Model Deployment

Why might a machine learning engineer deliberately send only a small percentage of production requests to a challenger model while keeping the rest on the champion model?

  1. ATo reduce the number of endpoint logs, because Databricks records only the majority route in inference tables
  2. BTo compare the challenger under real traffic with limited blast radius before increasing its share or promoting it further
  3. CTo avoid registering the challenger in Unity Catalog, because low-traffic models can be served without version control
  4. DTo force batch inference behavior from a real-time endpoint, because small traffic shares automatically queue requests offline
  5. ETo bypass request authentication for the challenger, because minor traffic percentages are treated as internal evaluation traffic
Show answer & explanation

Correct answer: B

WHY B: Sending a small share of live traffic to a challenger is a classic low-risk rollout pattern that gathers real production evidence before a wider cutover. WHY NOT A: Logging behavior is not the objective. WHY NOT C: Registration requirements do not disappear because traffic is small. WHY NOT D: Traffic percentage does not convert real-time serving into batch scoring. WHY NOT E: Authentication requirements still apply.

5 Model Deployment

An operations team receives a steady stream of sensor events and wants model inference embedded inside a managed pipeline that processes arriving records continuously. According to the exam's Databricks deployment pattern, how is streaming inference performed with Delta Live Tables?

  1. ABy exporting each micro-batch to a CSV file and scoring it later with a nightly batch notebook
  2. BBy applying the model as a Spark UDF inside the Delta Live Tables pipeline so inference runs as the data flows through the pipeline
  3. CBy querying the MLflow UI during each trigger interval and copying the latest model outputs into the target table
  4. DBy replacing the data pipeline with a SQL warehouse dashboard that refreshes whenever events arrive from upstream systems
  5. EBy writing raw events directly to the model registry, because registries can execute inference logic during table ingestion
Show answer & explanation

Correct answer: B

WHY B: The expected Databricks pattern for streaming inference in Delta Live Tables is to embed model scoring logic, commonly as a Spark UDF, within the pipeline itself. WHY NOT A: CSV exports create delayed batch processing, not streaming inference. WHY NOT C: The MLflow UI is not a scoring engine. WHY NOT D: A dashboard is not the inference pipeline. WHY NOT E: Model registries store models; they do not execute streaming table inference.

6 Model Deployment

A team compares streaming inference with nightly batch scoring. What is the main advantage of the streaming design for event-driven use cases?

  1. AIt processes new data as it arrives, reducing prediction delay compared with waiting for the next scheduled batch window
  2. BIt always costs less than batch inference, because continuous pipelines never maintain checkpoints or state between runs
  3. CIt eliminates the need for model packaging, because streaming systems can execute raw notebook cells directly in production
  4. DIt guarantees lower latency than a real-time serving endpoint for every per-event request regardless of workload shape
  5. EIt makes feature engineering unnecessary, because micro-batches automatically infer model-ready columns from event streams
Show answer & explanation

Correct answer: A

WHY A: Streaming inference is valuable when the core requirement is to score newly arriving data continuously instead of waiting for a later batch. WHY NOT B: Continuous pipelines can introduce operational cost and state management. WHY NOT C: Models still need proper packaging or scoring logic. WHY NOT D: Streaming and real-time APIs solve different latency patterns. WHY NOT E: Feature engineering is still required.

7 Model Deployment

A custom model deploys successfully in training, but fails during endpoint creation because a helper package is missing from the serving container. What is the most direct fix?

  1. AAdd the dependency to the MLflow model environment, such as pip requirements or other declared package dependencies, before redeploying
  2. BRename the serving endpoint, because dependency resolution is tied to endpoint names and old names can block installs
  3. CDisable signatures on the model, because missing packages occur only when the endpoint validates model schemas during startup
  4. DTurn on scale-to-zero, because cold-start rebuilds automatically install packages that were absent from the original model
  5. EQuery the endpoint with dataframe_records instead of dataframe_split, because package failures are caused by request shape mismatches
Show answer & explanation

Correct answer: A

WHY A: Serving containers are built from the MLflow model package and declared dependencies, so missing libraries must be added to that environment. WHY NOT B: Endpoint names do not control dependency installation. WHY NOT C: Signatures are unrelated to missing Python packages. WHY NOT D: Scale-to-zero does not add undeclared dependencies. WHY NOT E: Request format does not solve container build issues.

8 Model Deployment

A data scientist wants to score a stored MLflow model against a pandas DataFrame inside Python code, without calling a remote serving endpoint. Which workflow is the standard MLflow approach?

  1. ALoad the model with mlflow.pyfunc.load_model and call predict on the pandas DataFrame
  2. BConvert the DataFrame to SQL text and send it through a REST invocation URL even for local batch scoring
  3. CUse only spark.readStream because pandas objects are not supported inputs for MLflow pyfunc prediction
  4. DRegister the DataFrame in Unity Catalog first, because pyfunc models can only score named tables and not in-memory data
  5. ECall mlflow.start_run before every prediction row, because pyfunc predict requires an active tracking run for inference
Show answer & explanation

Correct answer: A

WHY A: MLflow pyfunc models support pandas.DataFrame inputs directly, so the normal pattern is load_model followed by predict. WHY NOT B: A remote REST call is unnecessary for local batch scoring. WHY NOT C: pandas is explicitly supported. WHY NOT D: In-memory DataFrames can be scored directly. WHY NOT E: Prediction does not require an active MLflow run.

Take the full ML Associate practice test →