MlflowException: Unsupported Databricks profile key prefix: ''. Key prefixes cannot be empty.

AnnamalaiVR
New Contributor

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']