I am working through a basic example to get familiar with databricks automl. When I run classify, I hit an mlflow error. How can I avoid this error?
My code:
summary = databricks.automl.classify(train_df, target_col='new_cases', data_dir='dbfs:/automl/india_covid_automl', timeout_minutes=30)
The resulting error:
CellExecutionError: An error occurred while executing the following cell:
------------------
import mlflow
import os
mlflow.mlflow.set_tracking_uri("databricks")
os.environ["DATABRICKS_HOST"] = "https://oregon.cloud.databricks.com"
os.environ["DATABRICKS_TOKEN"] = "[REDACTED]"
%matplotlib inline
------------------
[0;31m---------------------------------------------------------------------------[0m
[0;31mAttributeError[0m Traceback (most recent call last)
[0;32m[0m in [0;36m[0;34m()[0m
[1;32m 2[0m [0;32mimport[0m [0mos[0m[0;34m[0m[0;34m[0m[0m
[1;32m 3[0m [0;34m[0m[0m
[0;32m----> 4[0;31m [0mmlflow[0m[0;34m.[0m[0mmlflow[0m[0;34m.[0m[0mset_tracking_uri[0m[0;34m([0m[0;34m"databricks"[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
[0m[1;32m 5[0m [0mos[0m[0;34m.[0m[0menviron[0m[0;34m[[0m[0;34m"DATABRICKS_HOST"[0m[0;34m][0m [0;34m=[0m [0;34m"https://oregon.cloud.databricks.com"[0m[0;34m[0m[0;34m[0m[0m
[1;32m 6[0m [0mos[0m[0;34m.[0m[0menviron[0m[0;34m[[0m[0;34m"DATABRICKS_TOKEN"[0m[0;34m][0m [0;34m=[0m [0;34m"[REDACTED]"[0m[0;34m[0m[0;34m[0m[0m
[0;31mAttributeError[0m: module 'mlflow' has no attribute 'mlflow'
AttributeError: module 'mlflow' has no attribute 'mlflow'
---------------------------------------------------------------------------
CellExecutionError Traceback (most recent call last)
<command-3357122079230110> in <cell line: 2>()
1 mlflow.set_tracking_uri("databricks")
----> 2 summary = databricks.automl.classify(train_df, target_col='new_cases', data_dir='dbfs:/automl/india_covid_automl', timeout_minutes=30)
/local_disk0/.ephemeral_nfs/envs/pythonEnv-fad1e6db-7cab-40e9-b890-7eb4c6767ee5/lib/python3.9/site-packages/databricks/automl/__init__.py in classify(dataset, target_col, data_dir, timeout_minutes, max_trials)
28 :return: Structured summary object with info about trials.
29 """
---> 30 return Classifier(context_type=ContextType.DATABRICKS).fit(
31 dataset, target_col, data_dir, timeout_minutes=timeout_minutes, max_trials=max_trials)
/local_disk0/.ephemeral_nfs/envs/pythonEnv-fad1e6db-7cab-40e9-b890-7eb4c6767ee5/lib/python3.9/site-packages/databricks/automl/classifier.py in fit(self, dataset, target_col, data_dir, max_trials, parallelism, timeout_minutes, experiment)
124
125 try:
--> 126 return self._fit_impl(dataset, target_col, data_dir, max_trials, parallelism, timeout,
127 experiment)
128 finally: