Databricks · ML-ASSOC

databricks ML-ASSOC Practice Questions

Practice for the Machine Learning Associate Databricks certification exam. Review available chapters with published question counts.

200 questions across 4 chapters with published questions.

Start free practice

Exam chapters

Practice questions

Sample questions with answers and explanations

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.

Other Databricks exams