11-15-2021 08:49 AM
ML flow model serving in Databricks docs details the options to enable and disable from the UI
https://docs.databricks.com/applications/mlflow/model-serving.html
11-15-2021 08:53 AM
Please find below the REST APIs to enable and disable Model-Serving
Below are the examples in Python
You need to use the token to interact with Rest API
token = "dxxxxxx"
instance = "https://<workspacexxx>.cloud.databricks.com"
headers = {'Authorization': f'Bearer {token}'}
Enable Model Serving
import requests
url = f'https://{instance}/api/2.0/mlflow/endpoints/enable'
requests.post(url, headers=headers, json={"registered_model_name": "<model name>"})
Disable Model serving
url = f'https://{instance}/api/2.0/mlflow/endpoints/disable'
r = requests.post(url, headers=headers, json={"registered_model_name": "<model name>"})
r.json()
11-15-2021 08:53 AM
Please find below the REST APIs to enable and disable Model-Serving
Below are the examples in Python
You need to use the token to interact with Rest API
token = "dxxxxxx"
instance = "https://<workspacexxx>.cloud.databricks.com"
headers = {'Authorization': f'Bearer {token}'}
Enable Model Serving
import requests
url = f'https://{instance}/api/2.0/mlflow/endpoints/enable'
requests.post(url, headers=headers, json={"registered_model_name": "<model name>"})
Disable Model serving
url = f'https://{instance}/api/2.0/mlflow/endpoints/disable'
r = requests.post(url, headers=headers, json={"registered_model_name": "<model name>"})
r.json()
11-15-2021 10:52 AM
Hi @Mohit Miglani ,
Great post. Thank you for sharing it with the rest of the community.
Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections.
Click here to register and join today!
Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.