- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ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
- Labels:
-
Disable
-
MlFlow
-
Mlflow Model
-
Model Serving
-
Rest API
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ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()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ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()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ11-15-2021 10:52 AM
Hi @Mohit Miglaniโ ,
Great post. Thank you for sharing it with the rest of the community.

