Skip to content

Commit 9d35267

Browse files
authored
[MLOps3.0] Minor fix for model deployment job update (#203)
* Minor fix for LHM demo * Minor fix for custom metrics * Removed monitoring folders * Create .gitignore in LHM demo folder Adding `.gitignore` to ignore local monitoring dashboard jsons in LHM demo * Create .gitignore in MLOps-Advanced demo Adding `.gitignore` to ignore local monitoring dashboard jsons * Quick-Fixes & Cleans Removed batch scoring for synthetic data * Major updates for Serverless, MLflow3.0 and Lakebase - Removed all mentions/use of automl and switched to Optuna with native mlflow spark integration - Added MLflow3.0 deployment job - Updated Feature Engineering/Serving to use new Synched tables (Lakebase) - Minor fixes to monitoring and drift detection * [MLOps3.0] Fixed quickstart and experiments - Tested Quickstart demo - Fixed Experiment name - Updated DAB configuration * Updated references to new images/banners * [MLOps3.0] Fixes for quick-start and Optuna HPO * [MLOps3.0] Minor fixes for FE client * [MLOps3.0] Bug fixes for Optuna/autoML and FE client * Synching with upstream * [MLOps3.0] Bug fixes for Optuna/autoML and FE client * [MLOps3.0] Minor fixes * Synching with upstream * [MLOps3.0] Minor fix for Deployment Job Update * [MLOps3.0] Added Online Store Name argument
1 parent 2bdcd92 commit 9d35267

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

product_demos/Data-Science/mlops-end2end/02-mlops-advanced/03a_create_deployment_job.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,13 @@
183183
client.update_registered_model(model_name, deployment_job_id="") # Unlink current job
184184
client.update_registered_model(model_name, deployment_job_id=job_id) # Link new one
185185

186-
except mlflow.exceptions.RestException:
187-
# Create Empty Model placeholder and Link job
188-
print("Model does not exist - Creating model and linking job")
189-
client.create_registered_model(model_name, deployment_job_id=job_id)
186+
except mlflow.exceptions.RestException as e:
187+
if "PERMISSION_DENIED" in str(e):
188+
print(f"Permission denied on model `{model_name}` - Deployment Job NOT UPDATED.")
189+
# Optionally, handle or re-raise
190+
pass
191+
192+
else:
193+
# Create Empty Model placeholder and Link job
194+
print("Model does not exist - Creating model and linking job")
195+
client.create_registered_model(model_name, deployment_job_id=job_id)

product_demos/Data-Science/mlops-end2end/02-mlops-advanced/06_serve_features_and_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
dbutils.widgets.text("model_name", f"{catalog}.{db}.advanced_mlops_churn", "Model Name") # Will be populated from Deployment Jobs Parameters
5151
dbutils.widgets.text("model_version", "1", "Model Version") # Will be populated from Deployment Jobs Parameters
52-
dbutils.widgets.text("online_store_name", "fe_shared_demo", "Online Store Name")
52+
dbutils.widgets.text("online_store_name", online_store_name, "Online Store Name")
5353
dbutils.widgets.dropdown("drop_online_store", "False", ["True", "False"], "Reset Online Table(s)")
5454
dbutils.widgets.dropdown("smoke_test", "False", ["True", "False"], "Smoke Test Flag")
5555

product_demos/Data-Science/mlops-end2end/_resources/00-setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
catalog = "main__build"
1919
dbName = db = "dbdemos_mlops"
20+
online_store_name = "shared_online_store" # "fe_shared_demo"
2021

2122
# COMMAND ----------
2223

0 commit comments

Comments
 (0)