Databricks Machine Learning Professional Question 122
Select 2You are managing an MLflow experiment in Databricks and need to clean up unnecessary webhooks as part of your maintenance process. What steps should you take to list all webhooks and delete a specific webhook?
- A
Use the MLflow CLI command
mlflow webhooks listto retrieve all webhooks and their IDs, and then usemlflow webhooks delete --id <webhook-id>to delete a specific webhook. - B
Use the Databricks REST API
GET /api/2.0/mlflow/webhooks/listto list all webhooks, and then useDELETE /api/2.0/mlflow/webhooks/deletewith the webhook ID to delete a specific webhook. - C
Use the Databricks UI to navigate to the experiment's Webhooks tab and delete the webhook by clicking the 'Delete' button.
- D
Use the MLflow Python client to call
mlflow.webhooks.get_all()to list webhooks andmlflow.webhooks.remove(webhook_id)to delete a webhook. - E
Write a custom Python script to query the MLflow tracking server's database directly and remove the webhook record.
Show answer and explanation
Correct answers: A, B
Explanation
To manage webhooks in Databricks, you can either use the MLflow CLI or the Databricks REST API. The CLI commands mlflow webhooks list and mlflow webhooks delete allow you to list and delete webhooks, respectively. Alternatively, the REST API endpoints GET /api/2.0/mlflow/webhooks/list and DELETE /api/2.0/mlflow/webhooks/delete provide programmatic access to perform the same actions. Other methods, such as using the Databricks UI or directly modifying the database, are not supported or recommended.
- A. Correct.
Correct. The MLflow CLI provides a straightforward way to list and delete webhooks using the
listanddeletecommands. - B. Correct.
Correct. The Databricks REST API allows programmatic access to list and delete webhooks, making it a valid approach for this task.
- C. Incorrect.
Incorrect. Currently, the Databricks UI does not provide a dedicated section to manage or delete webhooks directly.
- D. Incorrect.
Incorrect. The MLflow Python client does not include direct functions like
get_allorremovefor webhook management. Webhook operations must use the CLI or REST API. - E. Incorrect.
Incorrect. Modifying the MLflow tracking server's database directly is unsupported and can lead to system instability.