Free cheat sheet

Databricks Machine Learning Professional

Two pages of the decision rules, defaults, APIs and traps the Databricks Machine Learning Professional exam tests, organised by the September 2025 exam guide's three domains.

Aligned to the September 2025 exam guide · checked against the Databricks docs on 31 October 2026 · certlake.com/exam/machine-learning-professional/cheat-sheet

Exam at a glance

The exam

59 scored questions · 120 min · pass mark not published · Python · September 2025 guide.

Weights

Domain%
Model Development44
MLOps44
Model Deployment12

New names

Lakehouse Monitoring → data profiling · DLT → Lakeflow pipelines · Workflows → Lakeflow Jobs · Asset Bundles → Declarative Automation Bundles · AI Gateway → Unity Gateway · Feature Store → Feature Store in UC (FeatureEngineeringClient) · legacy Online Tables (no longer supported) → Online Feature Store (Lakebase) · Hyperopt (not in Runtime ML after 16.4 LTS) → Optuna or Ray Tune · AutoML not built in from Runtime 18.0 ML.

1. Model Development44% of the exam

Spark ML or single node

SituationUse
Data beyond one node's memorySpark ML
Fits on one nodescikit-learn, XGBoost on the driver
One model per groupapplyInPandas
Deep learningTorchDistributor, Ray
Batch or streaming scoringtransform (batch); MLflow spark_udf (stream)
Real-time, low latencySingle-node model on Model Serving

Spark ML pieces

Estimator fit() → transformer transform(); Pipeline is an estimator, PipelineModel a transformer. StringIndexer → OneHotEncoder (linear models) → VectorAssembler. Tune with ParamGridBuilder + CrossValidator (k fits per point, refits the best) or TrainValidationSplit (one split, cheaper); parallelism= fits concurrently. Evaluators: BinaryClassification (areaUnderROC), Multiclass (f1), Regression (rmse, r2).

Scaling

ChoiceWhen
VerticalSingle-node library; simplest
HorizontalData or search too big for one node
Data parallelModel fits one GPU; shard the data
Model parallelModel doesn't fit one GPU
RayTask-parallel Python, tuning, RL, DL
SparkData-parallel ETL, Spark ML, big scoring

Ray on Spark: setup_ray_cluster() (ray.util.spark), Runtime 12.2 LTS ML+. TorchDistributor(num_processes, local_mode, use_gpu).run(fn); local_mode=True = driver only.

pandas function API

groupBy(k).applyInPandas(fn, schema): one pandas DataFrame per group (must fit in memory) → per-group models. mapInPandas: batches, no grouping → inference. @pandas_udf(returnType): column → column; hints pick the variant.

Tuning and MLflow

Optuna distributed: MlflowStorage(experiment_id=…) + MlflowSparkStudy(study_name, storage).optimize(objective, n_trials, n_jobs) (MLflow 3). Defaults: TPE sampler, MedianPruner stops poor trials. Nested runs: parent = search, child per parameter set via start_run(nested=True). Log with log_params, log_metric(step=), log_artifact, log_dict, log_figure.

Feature Store

  • Time series table: timeseries_columns="ts", ts in primary_keys; FeatureLookup with timestamp_lookup_key → AS OF join, latest value at or before the label time; lookback_window ignored online.
  • write_table(mode="merge") only; a streaming DataFrame returns a StreamingQuery.
  • Online: create_online_store(name=…, capacity="CU_1") → publish_table(…); publish_mode TRIGGERED (default) / CONTINUOUS (both need CDF) / SNAPSHOT.
  • On-demand: UC Python UDF + FeatureFunction(udf_name=, input_bindings=, output_name=); computed at request time and in training.

2. MLOps44% of the exam

Lifecycle map

Deploy code: same code dev → staging → prod, retrain on prod data, catalog per environment, service principal runs prod. Git + CI · bundles define resources · MLflow tracks · UC versions models · aliases mark champion/challenger · Lakeflow Jobs orchestrate · Model Serving · inference tables + data profiling monitor.

Testing

TestScopeRuns
UnitOne function, small dataDev + CI per PR
IntegrationFeatures → train → eval → deploy → inferStaging
ValidationChallenger beats championEvery retrain

pyspark.testing.assertDataFrameEqual; functions in .py modules, tests in tests/ run by pytest. New hyperparameters → re-run training, evaluation, deployment tests.

Declarative Automation Bundles

resources: jobs, experiments, registered_models, model_serving_endpoints, quality_monitors; targets: dev (mode: development) / prod (mode: production). bundle validate → bundle deploy -t prod → bundle run.

Retraining

Triggers: schedule, table-update or file-arrival trigger, alert on drift or quality. Pick the winner on the same recent hold-out, using the decision's metric (log loss when calibrated probabilities drive thresholds); move @champion only on a margin; keep the old version to roll back.

Data profiling

ProfileFor
SnapshotWhole table each refresh
TimeSeriesTimestamped data, by window
InferenceLogPredictions + model quality (needs timestamp, prediction, model ID, problem type, granularities)

Outputs <table>_profile_metrics, <table>_drift_metrics, a dashboard. slicing_exprs → slice_key/slice_value. drift_type: CONSECUTIVE (vs previous window) or BASELINE (vs baseline table). Alerts: Databricks SQL alert on a metrics-table query.

Drift statistics

NumericCategorical
ks_test, wasserstein_distance, population_stability_indexchi_squared_test, tv_distance, l_infinity_distance, js_distance

Custom metrics: aggregate (SQL on columns) and derived → profile table; drift ({{current_df}} vs {{base_df}}) → drift table.

Endpoint health

Serving UI: latency, request rate, error rate, CPU, memory (14 days); export to Prometheus/Datadog. Inference tables (via AI Gateway, now Unity Gateway) log requests and responses to UC.

3. Model Deployment12% of the exam

Rollouts

StrategyUse
Blue-greenSwitch all at once; instant rollback
CanarySmall share first, raise in steps; high traffic
ShadowCopy of traffic, answers discarded
A/BCompare business outcomes

One endpoint, two served entities, traffic_config.routes percentages; update the config to shift.

Custom PyFunc

Subclass mlflow.pyfunc.PythonModel: load_context(context) reads context.artifacts[...]; predict(context, model_input, params=None) holds pre/post-processing. pyfunc.log_model(name=, python_model=, artifacts={…}, input_example=, registered_model_name="cat.sch.m"); UC needs a signature. Test: load_model(uri), then .predict(df).

Deploy and query

get_deploy_client("databricks"), then .create_endpoint(name, config) with served_entities (entity_name, entity_version, workload_size) and .predict(endpoint=, inputs=). REST: POST /serving-endpoints/<name>/invocations, Authorization: Bearer <token>, body dataframe_split / dataframe_records / instances / inputs. SQL: ai_query.

Know it, or just recognise it?

The free diagnostic shows which domains you'd lose marks on, in about 10 minutes and without signing up.

Take the free diagnostic

Study guide

The full study guide: every domain explained, with snippets and diagrams.

Open the study guide

Spotted something out of date? Email support@certlake.com. CertLake is not affiliated with Databricks, Inc.