Databricks Machine Learning Professional Question 120
Select 2You are managing a Databricks MLflow experiment and need to list all the webhooks associated with the experiment. Additionally, you want to delete a specific webhook by its ID. Which of the following steps should you take to achieve this?
- A
Use the
mlflow.list_webhooks()function to retrieve all webhooks and their details. - B
Use the MLflow REST API endpoint
GET /api/2.0/mlflow/registry-webhooks/listto list all webhooks for a model. - C
Use the MLflow REST API endpoint
DELETE /api/2.0/mlflow/registry-webhooks/deletewith the webhook ID to delete the specific webhook. - D
Use the
mlflow.delete_webhook()function to remove the webhook by ID. - E
Use the Databricks CLI command
databricks mlflow webhooks deleteto delete all webhooks associated with a model.
Show answer and explanation
Correct answers: B, C
Explanation
Managing MLflow webhooks, such as listing and deleting them, requires using the MLflow REST API. The GET /api/2.0/mlflow/registry-webhooks/list endpoint is used to list all webhooks for a model, while the DELETE /api/2.0/mlflow/registry-webhooks/delete endpoint is used to delete a specific webhook by its ID. These operations are not supported directly through the Python client or Databricks CLI.
- A. Incorrect.
Incorrect: There is no
mlflow.list_webhooks()function in the MLflow Python client. Listing webhooks requires using the REST API. - B. Correct.
Correct: The MLflow REST API provides the
GET /api/2.0/mlflow/registry-webhooks/listendpoint to list all webhooks for a given model. This is the correct approach to retrieve webhook details. - C. Correct.
Correct: The MLflow REST API provides the
DELETE /api/2.0/mlflow/registry-webhooks/deleteendpoint to delete a specific webhook by its unique ID. This is the correct approach for deletion. - D. Incorrect.
Incorrect: There is no
mlflow.delete_webhook()function in the MLflow Python client. Webhook deletion must be done via the REST API. - E. Incorrect.
Incorrect: The Databricks CLI does not have a direct command for listing or deleting MLflow webhooks. Managing webhooks is currently only supported via the REST API.