Databricks Certified Machine Learning Professional free question 6 / 10 · Domain 2: MLOps
In the staging stage of the Databricks MLOps workflow, an ML engineer opens a pull request against the main branch of the project. What happens at this point, according to the documentation?
- The pull request deploys the code to production and runs unit tests on the production endpoint.
- The pull request builds the source code and triggers unit tests, and failing tests reject it.
- The pull request starts a retraining job on the full production dataset to compare models.
- The pull request creates the release branch and triggers the CI/CD system to update production jobs.
Show the answer and explanation
Answer: B
Why this is correct
The staging stage tests the ML pipeline code. The deployment process begins when a pull request is created against the main branch of the project. The pull request automatically builds the source code and triggers unit tests, and if the unit tests fail, the pull request is rejected. Running unit tests in a CI pipeline ensures that changes made in a development branch do not break existing functionality.
Why the other options are wrong
"The pull request deploys the code to production and runs unit tests on the production endpoint." … Production deployment happens after a release branch is created. The pull request step runs unit tests.
"The pull request starts a retraining job on the full production dataset to compare models." … Retraining on production data belongs to the production stage. The pull request triggers unit tests first.
"The pull request creates the release branch and triggers the CI/CD system to update production jobs." … The release branch is created after the CI tests pass and the dev branch is merged into main, not when the pull request is opened.
Unit tests on the pull request
Unit tests are the first CI gate for a change, before integration tests run.