Databricks Machine Learning Professional exam dumps

Databricks Machine Learning Professional practice question 211 of 280

Databricks Certified Machine Learning Professional. Professional level, Databricks. Free question with the correct answer and a full explanation.

Databricks Machine Learning Professional Question 211

Single answer

You are a data scientist working on a model deployment pipeline in Databricks. A model has been registered in the Model Registry and transitioned to both the Staging and Production stages. Model Serving is enabled for both stages. You want to programmatically query the model in the Staging stage to test its performance before promoting it to Production. Which of the following steps is required to ensure you query the correct stage of the model?

  1. A

    Specify the 'stage' parameter as 'Staging' in the REST API request when querying the model

  2. B

    Use the unique model version ID to query the model directly, bypassing the stage

  3. C

    Set the 'X-Databricks-Stage' header to 'Staging' in the REST API request

  4. D

    Only the Production stage can be queried with Model Serving, so querying Staging is not possible

Show answer and explanation

Correct answer: C

Explanation

To query a Model Serving-enabled model in a specific stage, such as 'Staging,' you need to set the 'X-Databricks-Stage' header in the REST API request. This header ensures that the correct stage of the model is used for inference. Without this header, the request will default to querying the Production stage.

  • A. Incorrect.

    Incorrect: While it's important to specify the stage, Databricks Model Serving requires the stage to be set through a specific header, not as a parameter in the request body.

  • B. Incorrect.

    Incorrect: The model version ID identifies the specific version of the model but does not allow you to specify the stage directly.

  • C. Correct.

    Correct: To query a specific stage, such as 'Staging' or 'Production,' you need to set the 'X-Databricks-Stage' header in the REST API request. This ensures the serving endpoint looks at the correct stage.

  • D. Incorrect.

    Incorrect: Model Serving supports querying models in both Staging and Production stages, provided the correct configuration is used.

Timed practice exam

Take a Databricks Machine Learning Professional practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam