First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Databricks Machine Learning
Which MLflow component records the parameters, metrics, and artifacts produced by a single execution of training code?
- A model version
- A run Correct answer.
- A registered model
- An experiment
Explanation
A run is the atomic unit of MLflow Tracking: each execution of training code creates a run that stores its own params, metrics, tags, and artifacts. Experiments and registry objects sit above runs in the hierarchy.
Question 2Databricks Machine Learning
In MLflow, which object groups related runs so their results can be compared together?
- An artifact
- A model version
- An experiment Correct answer.
- A run
Explanation
An experiment is the organizational container for runs, and the MLflow UI compares runs within one experiment. Runs belong to exactly one experiment.
Question 3Databricks Machine Learning
Which single call enables automatic logging of parameters, metrics, and models for supported libraries such as scikit-learn and XGBoost?
- mlflow.log_model()
- mlflow.start_run()
- mlflow.autolog() Correct answer.
- mlflow.set_tracking_uri()
Explanation
mlflow.autolog() instruments supported frameworks so that fitting an estimator automatically records params, metrics, and the model without explicit log calls. The other calls are manual logging or configuration primitives.
Question 4Databricks Machine Learning
Which MLflow component provides model versioning, lineage, and stage or alias assignment?
- MLflow Recipes
- MLflow Projects
- MLflow Model Registry Correct answer.
- MLflow Tracking
Explanation
The Model Registry stores registered models and their versions, tracks lineage back to the originating run, and supports stages or aliases for lifecycle management. Tracking records runs, while Projects and Recipes are packaging and workflow tools.
Question 5Databricks Machine Learning
Which cluster runtime comes with pre-installed machine learning libraries and GPU driver support?
- Databricks Runtime
- Databricks Runtime for Photon
- Databricks Runtime for SQL
- Databricks Runtime for Machine Learning Correct answer.
Explanation
Databricks Runtime ML bundles popular ML and deep learning libraries and includes GPU drivers on GPU-enabled instances. The standard, Photon, and SQL runtimes target general or SQL workloads without that ML library set.
Question 6Databricks Machine Learning
In Spark ML, a Pipeline is built from what?
- A grid of hyperparameter values to search
- An ordered sequence of stages Correct answer.
- A single estimator fit repeatedly on the data
- A DataFrame holding transformed feature columns
Explanation
A Spark ML Pipeline holds an ordered array of stages, each a Transformer or Estimator, executed in sequence when fit or transform is called. Hyperparameter grids and DataFrames are inputs, not pipeline structure.
Question 7Databricks Machine Learning
Which Databricks capability lets teams discover and reuse feature definitions across models while keeping offline and online feature values consistent?
- Feature Store Correct answer.
- Delta Live Tables
- Model Registry
- Model Serving
Explanation
Databricks Feature Store centralizes feature table definitions so the same features can be reused for training and serving, with online publishing to avoid skew. The other components handle lifecycle, pipelines, or endpoint hosting.
Question 8Databricks Machine Learning
Databricks Model Serving exposes a registered model as what?
- A REST API endpoint Correct answer.
- A notebook dashboard
- A scheduled batch job
- A Delta table of predictions
Explanation
Model Serving deploys a model version behind a managed REST endpoint that clients call for low-latency predictions. Batch jobs and Delta output tables are batch inference patterns, not serving endpoints.
Question 9Databricks Machine Learning
Which call returns a pandas DataFrame summarizing the runs in an experiment so metrics can be compared in code?
- mlflow.get_run()
- mlflow.log_metrics()
- mlflow.search_runs() Correct answer.
- mlflow.create_experiment()
Explanation
mlflow.search_runs() queries the tracking server and returns a DataFrame with one row per run and columns for params and metrics, which supports programmatic comparison. get_run() returns only a single run object.
Question 10Databricks Machine Learning
Why should a model signature be included when logging a model?
- It records expected input and output schema Correct answer.
- It selects the cluster size for serving
- It compresses the model artifact on disk
- It automatically tunes hyperparameters
Explanation
A signature documents the model's expected input and output columns and types, enabling validation of inference data and schema enforcement at serving time. It does not affect artifact size, tuning, or compute sizing.
Question 11Databricks Machine Learning
When building a training set with Databricks Feature Store, which object specifies the feature tables to join to the label DataFrame?
- A FeatureTable
- A FeatureLookup Correct answer.
- A ModelSignature
- A TrainingSet
Explanation
Each FeatureLookup names a feature table, its keys, and optionally a timestamp column, and a list of these lookups is passed to create_training_set along with the labels. The resulting TrainingSet object is the output of that call, not the join specification.
Question 12Databricks Machine Learning
Which Hyperopt backend distributes trials across Spark workers?
- Trials
- HyperoptSparkSession
- MlflowClient
- SparkTrials Correct answer.
Explanation
SparkTrials is the Hyperopt Trials subclass that runs objective evaluations in parallel on Spark executors and reports results back to the driver. The default Trials class runs serially on the driver.
Question 13Databricks Machine Learning
Which MLflow client method moves a model version to the Production stage in the workspace model registry?
- transition_model_version_stage Correct answer.
- update_model_version
- create_model_version
- set_registered_model_alias
Explanation
transition_model_version_stage changes a version's stage, for example to Staging, Production, or Archived, in the workspace registry. Aliases and version updates change other metadata rather than the stage.
Question 14Databricks Machine Learning
What does a Databricks AutoML run produce at the end?
- Only a deployed serving endpoint
- A Feature Store table of engineered features
- A notebook of best-trial code plus MLflow runs Correct answer.
- A Delta table of cleaned training data
Explanation
AutoML trains and tunes candidate models, tracks each trial as an MLflow run, and generates a source notebook containing the data prep and model code for the best trials. Deployment or feature table creation are separate, optional steps.
Question 15Databricks Machine Learning
Which function turns a logged pyfunc model into a Spark UDF for batch scoring?
- mlflow.models.infer_signature()
- mlflow.pyfunc.spark_udf() Correct answer.
- mlflow.spark.log_model()
- mlflow.pyfunc.load_model()
Explanation
mlflow.pyfunc.spark_udf() loads a pyfunc model and wraps it as a Spark user-defined function that can be applied to a DataFrame column for distributed batch inference. load_model returns a Python model object, not a UDF.
Question 16Databricks Machine Learning
In Unity Catalog, how is a registered model identified?
- experiment_id/run_id/model
- catalog.schema.model_name Correct answer.
- workspace.registry.model
- model_name.version
Explanation
Unity Catalog uses the three-level namespace catalog.schema.model_name, mirroring how tables are named and governed. The workspace model registry uses a plain model name scoped to the workspace.
Question 17Databricks Machine Learning
What does mlflow.log_artifact() do during a run?
- Copies a local file into the run's artifact location Correct answer.
- Logs a scalar metric for the run
- Creates a new experiment
- Registers the run's model in the registry
Explanation
log_artifact() uploads a file or directory from the local filesystem to the artifact URI of the active run, where it is tracked as an output. Metrics, registry operations, and experiment creation are separate APIs.
Question 18Databricks Machine Learning
Which Model Serving feature lets an endpoint reduce to zero replicas when it receives no traffic?
- Route optimization
- Provisioned throughput
- Scale-to-zero Correct answer.
- Auto-capture
Explanation
Scale-to-zero allows a CPU endpoint to drop to zero replicas when idle and cold-start on the next request, reducing cost for sporadic traffic. Provisioned throughput instead reserves capacity for consistent latency.
Question 19Databricks Machine Learning
What does point-in-time feature lookup in Feature Store primarily prevent?
- Duplicate rows in the label table
- Slow training due to large feature tables
- Label leakage from future feature values Correct answer.
- Schema drift between feature tables
Explanation
When a timestamp key is supplied, Feature Store joins feature values as of each label's event time so training never sees values recorded after the event. This avoids leakage and keeps training consistent with what was known at inference time.
Question 20Databricks Machine Learning
Why would you create a nested MLflow run?
- To store artifacts outside the experiment
- To train on a different cluster
- To group sub-steps under a parent run Correct answer.
- To bypass the tracking server
Explanation
Nested runs use a parent run ID so that sub-steps such as individual hyperparameter trials or pipeline stages roll up under one parent run. They still live in the same experiment and use the same tracking server.
Question 21Databricks Machine Learning
A model logged with a framework-specific flavor is then loaded with mlflow.pyfunc.load_model(). What does the pyfunc flavor provide?
- Automatic retraining on new data
- A framework-agnostic predict interface Correct answer.
- Direct access to native optimizer state
- A GPU-only inference path
Explanation
The pyfunc flavor exposes a uniform predict() surface regardless of the underlying library, which lets deployment tooling load and score any logged model the same way. Framework-native objects and optimizer state remain accessible only through the specific flavor.
Question 22Databricks Machine Learning
To serve features online with low latency from Databricks Feature Store, what must be done with the feature table?
- Convert it to a Parquet file
- Partition it by timestamp
- Publish it to an online store Correct answer.
- Register it in the Model Registry
Explanation
Feature tables are Delta tables by default; publishing to an online store makes the latest feature values available for real-time lookup during serving. Registration and partitioning do not provide low-latency key-value access.
Question 23Databricks Machine Learning
In Unity Catalog, which mechanism should a serving endpoint use to reference a specific model version to serve?
- Registry stages such as Production
- The numeric model version in the endpoint URL
- An alias such as "Champion" on the version Correct answer.
- A tag on the originating experiment
Explanation
Unity Catalog replaces stages with aliases, so a version is marked with an alias like Champion and the endpoint or client resolves that alias to the current version. This allows promotion without changing caller code.
Question 24Databricks Machine Learning
In Spark ML, what does calling fit() on an Estimator return?
- A DataFrame of predictions
- A pipeline stage list
- A Transformer, typically a Model Correct answer.
- A hyperparameter map
Explanation
fit() learns parameters from data and returns a Transformer, usually a Model, whose transform() method produces predictions. The DataFrame is the input to fitting, and the stage list defines the pipeline, not the fit output.
Question 25Databricks Machine Learning
In Hyperopt, what must the objective function return?
- A scalar loss value to minimize Correct answer.
- A trained model object
- A Spark DataFrame of metrics
- A list of hyperparameters
Explanation
Hyperopt's fmin minimizes the value returned by the objective, so the function must return a single numeric loss for the sampled configuration. Any model or metrics needed later must be captured separately, for example through MLflow logging.
Question 26Databricks Machine Learning
Which workload benefits most from choosing a GPU-enabled cluster in Databricks?
- Running a large SQL aggregation over a Delta table
- Scheduling a nightly job that runs SQL transformation models
- Training a deep neural network on image data Correct answer.
- Streaming ingestion of JSON events into a Delta table
Explanation
GPU-enabled clusters provide hardware acceleration for parallel linear algebra, which is what neural network training relies on. Ordinary SQL aggregation, streaming ingestion, and scheduled SQL jobs are CPU- and I/O-bound and gain nothing from GPUs.
Question 27Databricks Machine Learning
Which single call enables automatic logging of parameters, metrics, and models for all supported ML libraries in a Databricks notebook?
- mlflow.create_experiment()
- mlflow.start_run()
- mlflow.autolog() Correct answer.
- mlflow.set_tracking_uri()
Explanation
mlflow.autolog() turns on framework-agnostic autologging so that supported libraries log parameters, metrics, and model artifacts without explicit logging calls. Framework-specific variants also exist, but the generic call covers all supported libraries at once.
Question 28Databricks Machine Learning
Which statement describes Databricks Runtime ML compared with standard Databricks Runtime?
- It removes MLflow so that users can install their own version
- It runs only on single-node clusters without workers
- It disables autoscaling to guarantee reproducible cluster sizes
- It ships with preinstalled ML libraries such as scikit-learn and XGBoost Correct answer.
Explanation
Databricks Runtime ML is a variant of the runtime that bundles popular machine learning libraries and GPU support so clusters are ready for training without manual installs. It keeps MLflow and supports the same cluster configurations as the standard runtime.
Question 29Databricks Machine Learning
Which method applies a fitted Spark ML Transformer to a DataFrame to produce output columns?
- transform() Correct answer.
- setParams()
- fit()
- evaluate()
Explanation
A Transformer implements transform(), which takes an input DataFrame and returns a new DataFrame with the added or modified columns. Estimators use fit() to learn parameters and produce a Transformer.
Question 30Databricks Machine Learning
In Spark ML, what is the role of VectorAssembler inside a Pipeline?
- It keeps only the highest-importance features
- It rescales every feature into a unit range
- It merges several feature columns into one vector column Correct answer.
- It converts categorical strings into numeric indices
Explanation
Most Spark ML estimators expect a single column of vector type, and VectorAssembler produces that column by concatenating the listed input columns. Feature scaling and encoding are handled by separate stages such as StandardScaler or StringIndexer.
Question 31Databricks Machine Learning
Which MLflow call records a numeric value that can be compared across steps or epochs?
- mlflow.log_text
- mlflow.log_metric Correct answer.
- mlflow.log_param
- mlflow.set_tag
Explanation
Metrics are numeric values that MLflow stores with an optional step and timestamp, which allows progress curves to be plotted. Parameters hold configuration inputs and tags hold free-form string metadata.
Question 32Databricks Machine Learning
Which set of problem types can a Databricks AutoML experiment handle directly?
- Only regression and clustering problems
- Only binary classification problems
- Reinforcement learning and ranking problems only
- Classification, regression, and forecasting problems Correct answer.
Explanation
AutoML supports classification, regression, and forecasting, selecting algorithms and preprocessing appropriate to the declared problem type. Clustering, ranking, and reinforcement learning are not offered as AutoML problem types.
Question 33Databricks Machine Learning
Which mechanism lets a notebook accept a value such as a model name at run time, including when the notebook runs as a job task?
- A notebook widget created with dbutils.widgets Correct answer.
- A global temporary view
- A column default declared on a Delta table
- A Spark configuration set with spark.conf.set
Explanation
Notebook widgets define named parameters that surface in the notebook UI and can be supplied as job or task parameters in a workflow. Spark configurations and temporary views are not parameter interfaces for notebook tasks.
Question 34Databricks Machine Learning
Which MLflow client method assigns a mutable named alias such as "champion" to a model version in Unity Catalog?
- transition_model_version_stage
- set_registered_model_alias Correct answer.
- create_model_version
- update_model_version
Explanation
Aliases are named pointers to a model version and are managed with set_registered_model_alias, and later resolved by name when loading or serving. They replace the stage-based promotion model used by the legacy workspace registry.
Question 35Databricks Machine Learning
Which statement about model stages in the Unity Catalog model registry is correct?
- Stages apply only to models trained with scikit-learn
- Stages are replaced by tags written onto the model's training runs
- Stages are not supported, so aliases and tags mark version status Correct answer.
- Stages such as Staging and Production work exactly as in the workspace registry
Explanation
Unity Catalog models do not implement stage transitions; version status is expressed with aliases and version tags instead. Code that relies on transition_model_version_stage must be rewritten to use aliases when migrating to Unity Catalog.
Question 36Databricks Machine Learning
After retrieving a run object with mlflow.get_run(run_id), where are the logged metric values available?
- In run.info.metrics
- In run.data.tags
- In run.data.metrics Correct answer.
- In run.data.params
Explanation
A Run object groups metadata under info and logged content under data, with metrics accessible as a dictionary in run.data.metrics. Parameters and tags live in sibling attributes of the same data object.
Question 37Databricks Machine Learning
Which Hyperopt expression samples a learning rate uniformly between 0.01 and 0.1?
- hp.quniform('lr', 1, 10, 1)
- hp.choice('lr', [0.01, 0.1])
- hp.uniform('lr', 0.01, 0.1) Correct answer.
- hp.randint('lr', 10)
Explanation
hp.uniform draws a continuous value from the closed interval given by its low and high arguments, which matches a learning rate range. hp.choice picks among discrete listed values and quniform quantizes its output.
Question 38Databricks Machine Learning
Which argument of SparkTrials controls how many Hyperopt trials execute concurrently on a cluster?
- num_workers
- parallelism Correct answer.
- max_evals
- timeout
Explanation
SparkTrials(parallelism=n) caps how many trials run at the same time, letting the cluster size and trial cost trade off against one another. The total number of trials is set on fmin through max_evals.
Question 39Databricks Machine Learning
Which three components must be supplied when constructing a Spark ML CrossValidator?
- Transformer, feature vector, and random seed
- Estimator, label column, and output column
- Pipeline, metric name, and checkpoint directory
- Estimator, estimatorParamMaps, and evaluator Correct answer.
Explanation
CrossValidator needs the estimator to fit, the grid of parameter maps to search, and an evaluator that scores each fitted model. It then splits the data into folds and reports the best model chosen by the evaluator.
Question 40Databricks Machine Learning
Which columns are required for a Delta table to serve as a feature table in Databricks Feature Store?
- An array-typed feature vector column, plus a label column
- A timestamp column with no primary key needed
- A primary key column, plus an optional timestamp column Correct answer.
- A label column and a prediction column
Explanation
A feature table must declare a primary key so that rows can be looked up per entity, and it may declare a timestamp column when point-in-time correctness matters. Labels and predictions belong to the training set or model output, not to the feature table.
Question 41Databricks Machine Learning
When calling a Model Serving endpoint over REST with pandas-oriented input, which JSON field carries the column names and row data?
- dataframe_split Correct answer.
- records
- instances
- params
Explanation
The pandas split format wraps the payload in a dataframe_split object holding parallel columns and data entries. Other formats such as dataframe_records or instances are used for different client conventions.
Question 42Databricks Machine Learning
Which argument to mlflow.log_model logs the model and also creates a new version in the registry in one step?
- registered_model_name Correct answer.
- signature
- artifact_path
- await_registration_for
Explanation
Passing registered_model_name registers the freshly logged model under that name, creating the registered model if needed and adding a new version. In Unity Catalog the name must be fully qualified as catalog.schema.model.
Question 43Databricks Machine Learning
Which call retrieves a secret value inside a notebook without hard-coding it in the notebook source?
- os.environ["my-scope.key"]
- spark.conf.get("my-scope.key")
- dbutils.secrets.get(scope="my-scope", key="key") Correct answer.
- dbutils.fs.head("secrets/my-scope/key")
Explanation
Databricks secret scopes store credentials, and dbutils.secrets.get reads a value by scope and key while redacting it from notebook output. Secret values are not exposed through Spark configuration lookups or plain environment variable names.
Question 44Databricks Machine Learning
What does a Databricks AutoML run generate for the best trial in addition to the tracked runs?
- A new Unity Catalog catalog created for the run output
- A Git repository cloned into the user's home folder
- A dedicated SQL warehouse provisioned for scoring jobs
- A notebook with editable code that reproduces the model Correct answer.
Explanation
AutoML produces a generated notebook containing the preprocessing and training code for the best trial, which can be edited and rerun. All trials are also logged to MLflow so they can be compared and registered.
Question 45Databricks Machine Learning
Which privileges does a user need at minimum to create a model in a Unity Catalog schema?
- USE CATALOG, USE SCHEMA, and CREATE MODEL Correct answer.
- Only MODIFY on the catalog
- Only SELECT on the schema
- OWNERSHIP of the metastore
Explanation
Creating a model in a schema requires traversing the catalog and schema with USE CATALOG and USE SCHEMA, plus CREATE MODEL on the schema. Read access alone does not permit creating registry objects.
Question 46Databricks Machine Learning
Which run information does MLflow capture automatically to help identify the code version behind a run?
- A Git commit hash tag for Git-backed sources Correct answer.
- The order in which notebook cells were executed
- The cluster autoscaling history during the run
- The Delta transaction log version of input tables
Explanation
MLflow records source metadata as run tags, including the Git commit hash when the project is backed by a Git folder, which makes the code version reproducible. Cell ordering, cluster scaling, and table versions are not part of the automatic source tagging.
Question 47Databricks Machine Learning
An objective function returns validation accuracy, and the goal is for Hyperopt to maximize it. What should the objective return?
- The accuracy unchanged, relying on tpe.suggest to detect the direction
- The negative of the accuracy Correct answer.
- A dictionary mapping "accuracy" to the score
- The accuracy multiplied by the number of trials
Explanation
fmin always minimizes the value returned by the objective, so a metric to be maximized must be negated. The best trial is then the one with the smallest returned value, corresponding to the highest accuracy.
Question 48Databricks Machine Learning
How can a single Model Serving endpoint send 80% of requests to model version 1 and 20% to version 2?
- By configuring a traffic split among the served entities Correct answer.
- By setting the endpoint timeout to 80 seconds
- By editing the model version descriptions to 80 and 20
- By creating two separate endpoints behind a load balancer
Explanation
An endpoint can serve multiple model versions as separate served entities, and a traffic split assigns a percentage of requests to each so a new version can be canary-tested. Descriptions and timeouts have no effect on request routing.
Question 49Databricks Machine Learning
Which Databricks utility distributes PyTorch training across the workers of a cluster?
- TorchDistributor Correct answer.
- pandas UDFs executed on a SQL warehouse
- MLflow Projects with the local backend
- Spark ML CrossValidator
Explanation
TorchDistributor launches distributed PyTorch training using the cluster's workers, coordinating processes through the Spark driver. Generic MLflow Projects and Spark ML components do not provide data-parallel PyTorch execution.
Question 50Databricks Machine Learning
Which model registry feature sends an HTTP callback to an external system when events such as a new model version being created occur?
- Experiment tags
- Registry webhooks Correct answer.
- Artifact provenance
- Model signatures
Explanation
Registry webhooks subscribe an external HTTP endpoint to registry events so downstream systems such as CI pipelines can react automatically. Tags, provenance metadata, and signatures describe the model but do not push notifications.