Databricks Certified Machine Learning Associate practice questions
Databricks · DBML · 300 questions
Original practice questions for Databricks Certified Machine Learning Associate.
This course contains the use of artificial intelligence.
Practice Quizzes
Test your knowledge with standard 20-question practice sets.
Quiz 1
Quiz 2
Quiz 3
Quiz 4
Quiz 5
Quiz 6
Quiz 7
Quiz 8
Quiz 9
Quiz 10
Quiz 11
Quiz 12
Quiz 13
Quiz 14
Quiz 15
Browse by Domain
Study specific topics at your own pace.
Domain 1: Databricks ML Workflow & MLflow · 66 questions
- Which MLflow component is responsible for logging parameters, metrics, and artifacts during a model training run?
- When using MLflow in a Databricks notebook, what is the recommended way to start a new tracking run and ensure it is properly closed?
- In the MLflow Model Registry, which sequence correctly represents the typical model lifecycle stages?
- A data scientist calls mlflow.autolog() before training a scikit-learn model. Which items will be automatically logged without any additional mlflow.log calls?
- What does Databricks AutoML automatically produce after completing an experiment?
- What is the key difference between mlflow.logartifact() and mlflow.sklearn.logmodel()?
- A team has run 500 MLflow experiments and wants to programmatically find all runs where validation accuracy exceeded 0.90. Which approach is correct?
- During hyperparameter tuning, you want to group all trial runs under a single parent run in MLflow. How do you create a child run?
- What advantage does Unity Catalog provide for ML models compared to the workspace-level MLflow Model Registry?
- In a Databricks workspace, where does MLflow store experiment metadata (parameters, metrics) by default?
- In Databricks, what is the default experiment associated with a notebook when mlflow.startrun() is called without specifying an experiment?
- When logging training loss during a neural network's epochs using MLflow, which parameter in mlflow.logmetric() enables plotting the metric over training iterations?
- Which evaluation metric does Databricks AutoML optimize by default for a binary classification problem?
- How can you add searchable metadata to an MLflow run to mark it as part of a specific project or team?
- What is an MLflow model 'flavor', and why is the pythonfunction flavor particularly useful?
- A data scientist runs 20 experiments and wants to identify the run with the highest validation F1 score. Which is the fastest programmatic approach?
- When using Databricks Repos for ML project versioning, which MLflow tag is automatically set to help link runs to specific code versions?
- What benefit does logging an inputexample with mlflow.sklearn.logmodel() provide?
- In Unity Catalog, how is a model registered using the three-level namespace?
- In Unity Catalog's model registry, what replaces stage-based lifecycle management (Staging/Production) for model versioning?
- During a single MLflow run, which API pattern correctly logs multiple hyperparameters and metrics?
- Databricks AutoML runs on a labeled table whose target has three discrete classes. What problem type is this?
- Unity Catalog governed models in Databricks are referenced using which pattern?
- Why should you log an MLflow model signature?
- Parent/child (nested) MLflow runs are MOST useful when:
- A key benefit of Databricks AutoML output is:
- Confusion matrices and ROC plots should be stored in MLflow as:
- mlflow.searchruns filterstring is used to:
- MLflow model aliases (e.g., champion) help deployments by:
- mlflow.autolog() helps teams by:
- Transitioning a model version to Production in the registry should typically require:
- MLflow Projects help reproducibility by:
- Using the MLflowClient API, transitioning model stages/aliases is done to:
- Setting an AutoML timeout/compute budget primarily controls:
- Unity Catalog lineage for ML assets helps with:
- Logging an input example with the model helps:
- Consistent MLflow experiment naming and tagging helps:
- MLflow model flavors exist to:
- dbutils.secrets should be used in ML notebooks to:
- MLflow run tags/descriptions should capture:
- MLflow registry webhooks can notify systems when:
- Pointing MLflow tracking URI to a remote server/workspace enables:
- ML code quality on Databricks improves when teams:
- The step parameter in logmetric is used to:
- AutoML feature type inference can mis-detect IDs as numeric continuous. You should:
- To allow a service principal to deploy a UC model, you typically need:
- When comparing nested HPO runs, focus on:
- When hyperparameters are nested dicts, best practice is to:
- Very large model artifacts impact:
- Marking MLflow runs failed/killed correctly helps:
- Ordering searchruns by metrics.valf1 DESC is used to:
- Databricks Repos/Git integration helps ML teams by:
- Organizing MLflow artifact paths (e.g., plots/, reports/) helps:
- Restricting who can overwrite production experiments/registry helps:
- Logging system metrics during training can reveal:
- When running AutoML on imbalanced data, you should still:
- UC Volumes can be used in ML to:
- MLflow compare runs UI is used to:
- When optimizing Hyperopt, you must specify whether to maximize or minimize because:
- Tagging runs with env=prod|dev and dataversion helps:
- Keeping a changelog per model version supports:
- Consistent metric names (valf1 vs f1validation vs F1) matter because:
- Storing MLflow runid with registered model versions provides:
- Deleting model versions in registry should be:
- Logging a hash/version of the training dataset in MLflow enables:
- Databricks ML Associate success looks like:
Domain 2: Feature Engineering & Data Prep · 62 questions
- What is the primary purpose of the Databricks Feature Store?
- Which method is used to write a DataFrame as a new feature table in the Databricks Feature Store?
- What is the main performance advantage of a Pandas UDF (vectorized UDF) over a standard Python UDF in Spark?
- How can Delta Lake's time travel feature help prevent training-serving skew in ML pipelines?
- A feature engineering pipeline computes 50 derived features from raw data. To avoid recomputing these features on every model training run, what is the best practice in Databricks?
- When preparing data with missing values for a Spark MLlib pipeline, which approach allows the Imputer transformer to handle multiple columns at once?
- When creating a training dataset using the Databricks Feature Store, what does fs.createtrainingset() require as a mandatory input alongside the feature lookups?
- In a Spark ML Pipeline, what is the correct order of transformers when converting a categorical string column to a numeric format suitable for tree-based models?
- A data scientist fits a StandardScaler on the entire dataset before splitting into train/test sets. What problem does this cause?
- After training a Random Forest classifier with Spark MLlib, which attribute provides feature importance scores?
- In the Databricks Feature Store, what is the purpose of specifying a timestamplookupkey in a FeatureLookup?
- Which PySpark construct is used to compute a rolling 7-day sum of transactions per user as a feature?
- Spark MLlib's VectorAssembler fails when input columns contain null values. Which parameter controls how VectorAssembler handles nulls?
- When a categorical feature has millions of unique values (e.g., URL paths), which Spark MLlib transformer handles encoding without creating millions of columns?
- In Spark MLlib, what is the correct pipeline to convert raw text documents to TF-IDF feature vectors?
- In Spark MLlib, what is the difference between Normalizer and StandardScaler?
- When applying PCA in Spark MLlib, what does the k parameter control?
- A feature engineering pipeline tries to write a new batch with an additional column to an existing Delta feature table. What happens by default?
- Which Spark MLlib transformer creates polynomial features and interaction terms from numeric features?
- When a feature engineering pipeline needs to connect to an external database, what is the Databricks-recommended way to handle credentials?
- What is the primary difference between offline and online feature tables in Databricks Feature Store?
- Point-in-time correct feature joins prevent which training flaw?
- How does Delta Lake time travel support ML reproducibility?
- FeatureStoreClient.createtrainingset is used to:
- Delta Live Tables (DLT) helps ML feature pipelines by:
- StandardScaler vs MinMaxScaler — which statement is TRUE?
- Fitting scalers on full data before train/test split causes:
- A pitfall of StringIndexer + OneHotEncoder in production is:
- Imputing missing values before tree models vs linear models:
- PCA before clustering high-dimensional numeric features can help by:
- Which feature is MOST suspicious for target leakage in churn prediction?
- Feature tables define primary keys so that:
- Stale online features can cause:
- Feature hashing (HashingTF) is useful for high-cardinality text/categories because:
- Explicit interaction features are MOST helpful for:
- Treating null as an explicit category can be useful when:
- IDF in a Spark text pipeline down-weights terms that:
- Aggressive deletion of outliers before fraud modeling may be harmful because:
- Delta schema enforcement helps ML pipelines by:
- Idempotent feature table writes matter because:
- Feature data contracts specify:
- scorebatch / batch feature lookups help by:
- For point-in-time joins, the label/event timestamp should represent:
- Z-Ordering feature tables on lookup keys can:
- One-hot encoding very high-cardinality categoricals can cause:
- For time-series forecasting models, random K-fold is dangerous because:
- Target encoding categoricals risks leakage unless:
- Removing highly correlated features before linear modeling can:
- Spark ML Imputer stage typically handles:
- Winsorizing extreme feature values can:
- Using learned embeddings as features is common when:
- Binning continuous features can help when:
- Feature Store lineage to models helps answer:
- Frequency encoding categoricals replaces levels with:
- Streaming updates into feature tables are useful when:
- Unstable feature importances across bootstrap resamples suggest:
- RobustScaler uses medians/IQR style scaling to:
- Rare category levels can be grouped into an OTHER bucket to:
- Monotonic constraints in boosting are used when:
- Writing feature tables with merge/upsert semantics helps:
- Quantile regression loss is appropriate when:
- Naive leave-one-out target encoding still risks:
Domain 3: Model Training & Evaluation · 63 questions
- In Spark MLlib, which class implements k-fold cross-validation for hyperparameter tuning?
- A model achieves 99% training accuracy but only 72% validation accuracy. Which problem does this describe, and what is the most appropriate remedy?
- A fraud detection model is trained on data where 99% of transactions are legitimate. The model predicts 'not fraud' for every transaction and achieves 99% accuracy. Why is accuracy a misleading metric here?
- When training an XGBoost model on Databricks, which runtime environment is recommended to avoid manually installing XGBoost?
- When using scikit-learn's Pipeline with crossvalscore() on Databricks, what is the key benefit of wrapping preprocessing and the estimator in a Pipeline?
- What is the role of SparkTrials when using Hyperopt for hyperparameter tuning on Databricks?
- Which Python package provides LightGBM integration optimized for distributed training on Databricks clusters?
- A regression model predicts house prices. The RMSE is $45,000 and the MAE is $28,000. Which statement correctly interprets these metrics?
- What does an MLflow model signature provide when a model is logged with mlflow.sklearn.logmodel(model, 'model', signature=signature)?
- When splitting an imbalanced dataset into train and test sets in Python, which approach ensures each split has the same class proportion?
- An ROC curve plots True Positive Rate (Recall) against False Positive Rate. What does an AUC of 0.5 indicate?
- When defining a Hyperopt search space, which distribution should you use for the learning rate parameter, and why?
- A binary classifier produces: TP=80, FP=20, FN=40, TN=860. What are the precision and recall?
- Which RandomForestClassifier hyperparameter most directly controls the tradeoff between individual tree diversity and individual tree accuracy?
- After fitting a scikit-learn GridSearchCV on Databricks, how do you access the best hyperparameter combination found?
- When training an XGBoost model with early stopping on Databricks, what does earlystoppingrounds=10 mean?
- For a multiclass classification problem with 5 classes, which Spark MLlib evaluator computes accuracy and is appropriate?
- In a logistic regression model with high-dimensional sparse features, which regularization technique tends to produce sparse model weights (setting unimportant features to zero)?
- What is the key advantage of TrainValidationSplit over CrossValidator in Spark MLlib when training on very large datasets?
- What does a SHAP (SHapley Additive exPlanations) value represent for a specific feature in a prediction?
- When training a LogisticRegression classifier in Spark MLlib on an imbalanced dataset (1% fraud, 99% non-fraud), which parameter adjusts for class imbalance during training?
- A data scientist applies StandardScaler to all data before using CrossValidator with 5 folds. What error does this introduce?
- Which scikit-learn algorithm is commonly used for unsupervised anomaly detection (finding unusual data points without labeled examples)?
- A learning curve shows training accuracy = 0.95 and validation accuracy = 0.94 with both plateauing as training set size increases. What does this indicate?
- What is the difference between Pipeline([('scaler', StandardScaler()), ('clf', LogisticRegression())]) and makepipeline(StandardScaler(), LogisticRegression()) in scikit-learn?
- In Hyperopt, what algorithm does tpe.suggest implement and why is it preferred over random search for hyperparameter tuning?
- How does Hyperopt with SparkTrials help hyperparameter tuning on Databricks?
- For highly imbalanced fraud detection, which metric set is MORE appropriate than plain accuracy?
- CrossValidator in Spark ML is used to:
- On a 2TB labeled dataset in Delta, which training approach is MORE practical?
- Feature importance from tree models helps practitioners:
- LightGBM is often chosen on Databricks because:
- ParamGridBuilder in Spark ML is used to:
- ROC-AUC of 0.5 for a binary classifier indicates:
- Gradient-boosted trees often outperform linear models on tabular data because:
- RegressionEvaluator with metricName rmse measures:
- Stratified splitting is important when:
- Early stopping in XGBoost/LightGBM helps by:
- TrainValidationSplit differs from CrossValidator mainly by:
- SHAP explanations can provide:
- Probability calibration matters when:
- IsolationForest is typically used for:
- A learning curve showing high train and val error as data grows suggests:
- Macro-F1 is preferred over micro-F1 when:
- L1 regularization tends to encourage:
- Compared to full grid search, random/TPE-style search often:
- PR-AUC is often preferred under class imbalance because:
- XGBoost's default handling of missing values is notable because:
- After training a probabilistic classifier, F1 can often improve by:
- LightGBM native categorical handling can reduce:
- Setting class weights in logistic regression helps:
- Hyperopt hp.choice vs hp.uniform differ in that:
- Setting earlystoppingrounds too aggressively small may:
- A golden evaluation set for regression gates should be:
- Bagging (e.g., Random Forest) vs boosting (e.g., GBM) differs in that:
- SMOTE-like oversampling should be applied carefully because:
- A validation curve vs model complexity that diverges (train↑ val↓) indicates:
- Optimizing log-loss while the business cares about top-decile precision requires:
- Early stopping should monitor a metric that:
- Excessive HPO parallelism can hurt when:
- Temperature scaling is a technique for:
- ChiSquareSelector in Spark ML is a:
- Evaluating metrics on data slices (region, segment) helps:
Domain 4: Distributed ML with Spark · 49 questions
- In Spark MLlib, what is the difference between an Estimator and a Transformer?
- Why does Spark MLlib require all features to be assembled into a single Vector column before training?
- Which Spark MLlib class implements Gradient Boosted Trees for classification tasks?
- Before training an ML model with Spark MLlib, a large training DataFrame has very uneven partition sizes (some 50MB, others 500MB). What operation should be applied to optimize training performance?
- The Pandas Function API (applyInPandas) is used for which ML use case?
- What is the purpose of Horovod in distributed deep learning on Databricks?
- Using ParamGridBuilder in Spark MLlib, how many total models will be trained if you add 3 values for maxDepth and 4 values for numTrees to a RandomForestClassifier?
- How do you save and reload a trained Spark MLlib PipelineModel for later use in batch inference?
- A batch inference job needs to apply a scikit-learn model (50MB) to billions of rows in a Spark DataFrame. What is the most efficient way to make the model available to all workers?
- When a Spark MLlib Pipeline includes both a StringIndexer and a LogisticRegression, what exactly is saved when you call pipelinemodel.save(path)?
- How can a trained Spark MLlib PipelineModel be applied to a Structured Streaming DataFrame for real-time batch scoring?
- In Spark MLlib's DecisionTreeClassifier, what does the maxBins parameter control?
- What is the purpose of Pandas on Spark (formerly Koalas) in a Databricks ML workflow?
- What problem does Petastorm solve when training deep learning models on large Spark Delta Lake datasets?
- During a custom distributed training loop using Spark, how can you count the number of rows that failed validation across all executors?
- When sizing a Databricks cluster for Spark MLlib training on a 100GB dataset, what is the general recommended minimum RAM per executor?
- Best stage order for a Spark ML text classification Pipeline?
- VectorAssembler's role in Spark ML is to:
- When is Spark MLlib generally preferable to single-node sklearn on Databricks?
- Horovod on Databricks is MOST relevant for:
- Before distributed training on a skewed dataset, repartitioning can help by:
- Vectorized pandas UDFs (Iterator/Series) are preferred over row-at-a-time Python UDFs because:
- coalesce(n) vs repartition(n) — which is accurate?
- Saving a fitted Spark ML PipelineModel enables:
- Broadcast joining a small dimension table of features to a large fact table is good when:
- Petastorm is used to:
- Increasing maxDepth on a Spark DecisionTreeClassifier typically:
- Spark accumulators are appropriate for:
- Pandas API on Spark (formerly Koalas) helps ML feature engineering by:
- In Spark ML, stages share a features column name convention so that:
- A practical bottleneck in multi-node DL training can be:
- In Spark ML, the difference between Estimator and Transformer is:
- applyInPandas / mapInPandas group-wise is useful when:
- Training thousands of per-SKU models is often implemented via:
- Persisting intermediate feature DataFrames helps when:
- OOM on executors during vectorized inference often fixed by:
- VectorSlicer is used to:
- Low-level mapPartitions inference is sometimes used to:
- Adaptive Query Execution (AQE) can help ML feature jobs by:
- Oversizing all-purpose clusters for light interactive EDA wastes:
- Spark ML ALS is primarily for:
- Checkpointing during long DL training enables:
- IndexToString is used to:
- Spark whole-stage codegen benefits feature ETL by:
- Using partition columns as raw features can be problematic when:
- Data locality awareness helps distributed ML by:
- Enabling Arrow for pandas UDFs primarily improves:
- For scheduled training jobs, prefer job clusters because:
- For modern Spark ML feature engineering, prefer DataFrames/Spark ML because:
Domain 5: Model Deployment & Production · 60 questions
- What is required to create a Databricks Model Serving endpoint from an MLflow registered model?
- For batch inference on a large Delta table using an MLflow-logged scikit-learn model, which approach is most efficient on Databricks?
- A team wants to A/B test a new model version against the current production model on Databricks Model Serving. Which feature enables this?
- When should you use mlflow.pyfunc.PythonModel to wrap a custom model class?
- What is the difference between data drift and concept drift in production ML models?
- When using the Databricks Feature Store for real-time model serving, what component is used to retrieve pre-computed features at low latency?
- Which MlflowClient method transitions a registered model version from Staging to Production?
- How does Delta Lake's ACID transaction support benefit ML batch inference pipelines?
- When orchestrating a multi-step ML pipeline (data prep → feature engineering → training → evaluation → deployment) using Databricks Jobs, which feature enables conditional execution based on the previous step's output?
- When a model logged via the Feature Store's fs.logmodel() is deployed to Databricks Model Serving, what happens to feature retrieval automatically?
- A Databricks Model Serving endpoint has P99 latency of 500ms but the SLA requires P99 < 100ms. Which optimization should be tried first?
- What is the purpose of configuring webhooks for the MLflow Model Registry?
- Which retraining trigger strategy is most appropriate when a model's input feature distribution is known to shift significantly every 90 days?
- How can Delta Live Tables (DLT) be used in an ML pipeline context?
- In a champion/challenger model comparison using Databricks, what is the most rigorous way to determine if the challenger outperforms the champion?
- How does Databricks Model Serving determine which Python packages to install for a deployed MLflow model?
- What is the recommended approach for adding unit tests to a Databricks ML pipeline notebook before promoting to production?
- Which Databricks feature enables monitoring model prediction drift and data quality in production by storing prediction logs in a Delta table and comparing to a baseline?
- When configuring Databricks Model Serving, when is GPU serving MOST justified?
- mlflow.pyfunc is valuable because it:
- At real-time serving time, feature values should typically come from:
- Which statement correctly distinguishes data drift vs concept drift?
- Traffic splitting on Model Serving endpoints is used to:
- A common pattern for batch inference at scale on Databricks is:
- Feature Store integration with Model Serving primarily reduces:
- Lakehouse Monitoring on a predictions Delta table can detect:
- Databricks Jobs are used in ML to:
- Logging inference requests/responses (with privacy controls) enables:
- A production-ready Databricks ML system should include all EXCEPT:
- A custom pyfunc model is a good fit when:
- Scale-to-zero on serving endpoints trades:
- Online champion/challenger evaluation should compare:
- A sound retraining trigger is:
- Oversized models on small serving instances often cause:
- Choosing serverless model serving is often about:
- Choose batch inference over real-time when:
- Production model endpoints should enforce:
- Serving SLOs should track:
- Serving environment mismatches (library versions) often cause:
- An ML system design review on Databricks should verify all EXCEPT:
- Specifying conda/pip env when logging a model helps serving by:
- Shadow deployment means:
- Autoscaling model serving should react to:
- Online feature serving SLAs should include:
- Online A/B testing of models requires:
- Attaching model cards/docs to registry versions supports:
- If a canary model version degrades p95 latency and error rate, you should:
- Hosting multiple model versions behind routing logic enables:
- A robust prediction log table should include:
- An end-to-end Databricks ML associate workflow includes all EXCEPT:
- Provisioned throughput style serving is chosen when:
- Passing model version via controlled routing/headers can support:
- Mitigations for serving cold starts include:
- Asynchronous inference with queues is appropriate when:
- Blue/green style model deployment means:
- Joining delayed ground truth back to prediction logs enables:
- Multi-output regression/classification in one model is useful when:
- Client-side throttling to a model endpoint helps:
- Exporting a model's conda.yaml/requirements enables:
- End-to-end real-time scoring latency includes:
These questions are original practice material and are NOT actual exam questions or brain-dump content. All vendor marks are trademarks of their respective owners. This site is not affiliated with, endorsed by, or sponsored by the exam vendor.