Databricks Machine Learning Associate Question 650
Select 3You are working on deploying a machine learning model for real-time inference using Databricks. After deploying your model as a REST API endpoint, you want to query the endpoint to ensure it responds correctly. Which of the following steps are required to successfully query the model endpoint for predictions?
- A
Send an HTTP POST request to the model endpoint with the input data in JSON format.
- B
Authenticate the request using the Databricks personal access token.
- C
Package the model as a Python wheel file and upload it to the model endpoint.
- D
Parse the JSON-formatted prediction response returned by the endpoint.
- E
Ensure the cluster running the model endpoint has GPU support enabled.
Show answer and explanation
Correct answers: A, B, D
Explanation
To query a model endpoint deployed on Databricks for real-time inference, you need to send an authenticated HTTP POST request with input data in JSON format and parse the JSON-formatted prediction response. Authentication ensures secure access to the endpoint. Packaging the model or enabling GPU support is not relevant to querying the endpoint.
- A. Correct.
Correct: Sending an HTTP POST request with input data in JSON format is a standard step for querying a REST API, including Databricks model endpoints.
- B. Correct.
Correct: Databricks model endpoints require authentication, typically using a personal access token, to ensure secure access.
- C. Incorrect.
Incorrect: Packaging the model as a Python wheel file is generally required for deployment, but it is not a step for querying the model endpoint.
- D. Correct.
Correct: The prediction returned by the endpoint is in JSON format, so parsing the response is necessary to interpret the results.
- E. Incorrect.
Incorrect: While GPU support may improve training or inference speed for certain models, it is not a requirement for querying a model endpoint.