Databricks Machine Learning Professional Question 208
Single answerA data science team has deployed a machine learning model to Databricks Model Serving. The model has two registered versions: one in the 'Staging' stage and another in the 'Production' stage. As part of testing, you need to query both versions of the model for predictions. Which of the following statements about querying the models in these stages is correct?
- A
You can specify the stage ('Staging' or 'Production') in the endpoint URL to query the respective model version.
- B
You must manually deploy separate endpoints for 'Staging' and 'Production' models to query them.
- C
Querying a model in the 'Production' stage requires authentication, but querying a model in the 'Staging' stage does not.
- D
Models in both 'Staging' and 'Production' stages can be queried using the same serving endpoint, with the stage specified in the request payload.
Show answer and explanation
Correct answer: D
Explanation
Databricks Model Serving allows querying models in different stages (e.g., 'Staging' and 'Production') through a single serving endpoint. The stage to query is not determined by the endpoint URL but is specified within the request payload. This makes it easy to test and use models across different stages without the need to manage separate endpoints.
- A. Incorrect.
Incorrect: The endpoint URL is not stage-specific. Instead, the stage is specified in the request payload when querying a model.
- B. Incorrect.
Incorrect: Databricks Model Serving does not require separate endpoints for different stages. A single serving endpoint can handle multiple stages by specifying the desired stage in the request.
- C. Incorrect.
Incorrect: Both 'Staging' and 'Production' models require proper authentication to be queried, as they share the same security policies.
- D. Correct.
Correct: A single serving endpoint can be used to query models in different stages ('Staging' or 'Production'), and the stage is specified in the request payload while making the query.