databricks / mlops-stacks

This repo provides a customizable stack for starting new ML projects on Databricks that follow production best-practices out of the box.
https://docs.databricks.com/en/dev-tools/bundles/mlops-stacks.html
Apache License 2.0
416 stars 141 forks source link

Fix the Model Validation #131

Closed qili86 closed 7 months ago

qili86 commented 7 months ago

Current default template for Model Validation part fails because of the two errors below:

model validation fail

error_1. uc

The full error msg is below: Validation failed : API request to list files under path `` failed with status code 400. Response body: {"error_code":"INVALID_PARAMETER_VALUE","message":"Invalid name 'local_dev.custom_project.custom_project_model'. A workspace registered model name must be a non-empty UTF-8 string and cannot contain forward slashes(/), periods(.), or colons(:). If trying to access models in the Unity Catalog, make sure to install version 2.4.1 or above of the MLflow Python client, then configure the MLflow client to access models in Unity Catalog via mlflow.set_registry_uri('databricks-uc') before accessing models."}

Fix to error_1: add "mlflow.set_registry_uri('databricks-uc')"

error_2: targets

Fix to error_2: change to "fare_amount" which is the correct prediction target

qili86 commented 7 months ago

Thanks for the changes @qili86 ! Would you mind generating a Stacks repo from your local branch and adding screenshots of the validation workflow working as well?

@arpitjasa-db I generated the stack repo "test_mv" from my local branch, and the model validation part is now working fine without error

Screenshot 2024-01-09 at 9 16 10 PM