MlflowException: Unsupported Databricks profile key prefix: ''. Key prefixes cannot be empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 07:26 AM
I am trying to fetch data from mlflow model registry in Databricks and to use it in my local notebook. But I don't find any resource in internet to do so. I want to configure my mlflow in such a way i can fetch model registry values from databricks workspace. Also, I am sharing the code for more clarification.
In the below code. I'm getting the error in client.search_model_versions() line.
databricks_host = "*********************"
databricks_token = "**********"
databricks_org_id = "******"
# Set the Databricks tracking URI
tracking_uri = f"databricks://{databricks_host}?org_id={databricks_org_id}"
nw_dict = dict()
for mv in client.search_model_versions("name='sk-learn-logistic-reg-model'"):
dic = dict(mv)
run_data_dict = client.get_run(dic['run_id']).data.to_dictionary()
print(run_data_dict['metrics']['accuracy score'])
nw_dict[dic['run_id']] = run_data_dict['metrics']['accuracy score']
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 01:39 PM - edited 07-27-2023 01:41 PM
Hi @AnnamalaiVR,
Thank you for posting the question in Databricks Community.
In your Python code, import the MLflow library and create a client object to access your Model Registry.

