Get Your CertDatabricks Certified Machine Learning ProfessionalPlayCompete
‹ All Databricks Certified Machine Learning Professional questions

Databricks ML Professional Practice Question 18: Deploy Code Not Models

Databricks Certified Machine Learning Professional · Test 2 · question 8 of 10

Environment Architecturesmedium

An organisation is designing promotion for a retraining pipeline across dev, staging and prod workspaces. Production data is governed and readable only from the production environment; development holds a small anonymised sample. The team requires that the production model be trained on production data and that every piece of code reaching production has passed review and automated tests.

Which promotion approach does Databricks recommend here?

Select one answer
Show answer and explanation

Answer:

  • B. Promote the training code through the dev, staging and prod bundle targets, and train the production model in production on production data

This is the "deploy code" pattern, which Databricks recommends for most situations: the artifact that moves between environments is the code, not the model. The same reviewed, tested repository is deployed to each bundle target, and the production model is produced by running production code against production data in the production environment. That satisfies both constraints at once; the training data is the real data, and nothing reaches production without passing the review and test gates that govern the repository.

Option A is the "deploy models" pattern, which is legitimate in its own right and is how a *validated* artifact gets promoted once it exists. It fails here on the stated constraint: a model trained on an anonymised development sample was never fitted to production data, so copying it forward promotes the wrong model regardless of the mechanics.

Option C solves the constraint by removing it, which is the opposite of what governed data is for. Widening production access to the development workspace expands the blast radius of every experiment run there.

Option D abandons a single source of truth. Independently evolving copies guarantee that what was tested in staging is not what runs in production, and reproducing a production model becomes impossible.

Reference: MLOps workflow on Databricks

Practice Test 2 ›

Study guides for Databricks Certified Machine Learning Professional