databricks Machine Learning Associate · Practice questions

Section 1: Databricks Machine Learning Practice Questions

Review 10 sample questions with their correct answers and explanations. Sign up free to continue with the full topic quiz.

Sign up free for the full quiz

Question 1

A model registered in Unity Catalog has versions 1–5. Which URI loads version 3?

  1. models:/ml.churn.churn_model/3 — Correct
  2. models:/ml.churn.churn_model@3
  3. runs:/ml.churn.churn_model/3
  4. uc://ml.churn.churn_model:3

Correct answer

models:/ml.churn.churn_model/3

Explanation

Version numbers are referenced with /<version>; aliases use @<alias>.

Question 2

Which statement about runs and nested runs in MLflow is correct?

  1. start_run(nested=True) groups child runs under a parent — Correct
  2. Runs cannot be nested
  3. Nested runs are only available in the Unity Catalog registry
  4. Nested runs overwrite the parent run's metrics

Correct answer

start_run(nested=True) groups child runs under a parent

Explanation

Nested runs organize related trials under a parent for easier comparison.

Question 3

Which code creates a feature table in Unity Catalog from a Spark DataFrame user_df with key user_id?

  1. fe.create_table(name='ml.recsys.user_features', primary_keys=['user_id'], df=user_df, description='User features') — Correct
  2. spark.sql('CREATE FEATURE TABLE ml.recsys.user_features FROM user_df')
  3. user_df.write.feature('ml.recsys.user_features', key='user_id')
  4. fe.register_table(user_df, key='user_id', path='/features/user', description='User features')

Correct answer

fe.create_table(name='ml.recsys.user_features', primary_keys=['user_id'], df=user_df, description='User features')

Explanation

FeatureEngineeringClient.create_table creates a Unity Catalog feature table with primary keys and optionally writes the DataFrame.

Question 4

Which statement about mlflow.autolog() is correct?

  1. It registers every model in Unity Catalog automatically
  2. It logs only system metrics such as CPU and memory
  3. It must be called after training to capture results
  4. It logs params, metrics and models for supported libraries automatically — Correct

Correct answer

It logs params, metrics and models for supported libraries automatically

Explanation

Autologging hooks into supported libraries (for example scikit-learn, XGBoost, PyTorch) and records params, metrics and models during fit. Call it before training.

Question 5

A team wants to retrieve the run ID of the model version currently aliased champion. Which call returns the version details?

  1. client.search_runs(filter_string="tags.alias = 'champion'", max_results=1)[0].info.run_id
  2. client.get_model_version_by_alias('ml.churn.churn_model', 'champion') — Correct
  3. mlflow.get_alias('champion')
  4. client.search_runs(filter_string="alias = 'champion'")

Correct answer

client.get_model_version_by_alias('ml.churn.churn_model', 'champion')

Explanation

get_model_version_by_alias returns the ModelVersion, including its run_id and source.

Question 6

Which statement about MLflow experiments is correct?

  1. It groups runs with their params, metrics and artifacts — Correct
  2. An experiment is a registered model with versions
  3. An experiment stores only the final model
  4. Experiments can only be created through the REST API

Correct answer

It groups runs with their params, metrics and artifacts

Explanation

Experiments organize runs for comparison and reproducibility.

Question 7

A team is moving from workspace-local feature tables to Unity Catalog feature tables. Which benefit do Unity Catalog feature tables provide?

  1. Features are copied into each workspace's local storage so that training never reads from cloud storage
  2. Central governance and reuse across all workspaces on the metastore, with lineage — Correct
  3. Features can be updated only by workspace admins, which removes the need for permissions
  4. Features no longer need a primary key, because Unity Catalog generates row IDs automatically

Correct answer

Central governance and reuse across all workspaces on the metastore, with lineage

Explanation

Feature tables in Unity Catalog are Delta tables governed at the account level: shared across workspaces, permissioned with Unity Catalog, and tracked with lineage to models.

Question 8

Which statement about offline and online feature tables is correct?

  1. Offline tables serve training and batch; online stores serve real-time lookups — Correct
  2. Both are Delta tables queried with the same latency
  3. Online tables are used for training; offline tables are used for real-time serving
  4. Online tables can only be created in workspace-local feature stores

Correct answer

Offline tables serve training and batch; online stores serve real-time lookups

Explanation

Offline feature tables support high-throughput training and batch inference; online stores provide millisecond lookups for serving endpoints.

Question 9

Which factor favors 'deploy code' for a model that trains in 10 minutes on sensitive data only accessible in production?

  1. Training needs production data and is cheap to rerun — Correct
  2. Only one data scientist works on the project
  3. The model never needs retraining
  4. The model is very large and costly to train

Correct answer

Training needs production data and is cheap to rerun

Explanation

When production data cannot be accessed elsewhere and training is cheap, deploying code lets production train on its own data.

Question 10

Two runs differ only by learning rate. In the MLflow compare view, which chart helps see how learning rate relates to the validation metric across many runs?

  1. Lineage graph
  2. Histogram of the label
  3. Parallel coordinates or parameter-versus-metric scatter — Correct
  4. Confusion matrix

Correct answer

Parallel coordinates or parameter-versus-metric scatter

Explanation

Compare views offer parallel coordinates, scatter and contour plots relating parameters and metrics.

Ready for the full quiz?

Create a free QuizAnalyst account to practice the complete question set and save your progress.

Sign up free for the full quiz