<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to avoid an error when using the automl python api on a classification problem in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/how-to-avoid-an-error-when-using-the-automl-python-api-on-a/m-p/23882#M1352</link>
    <description>&lt;P&gt;I had (accidentally) manually installed a very early version of databricks automl. Once I upgraded the error resolved. &lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2022 15:17:28 GMT</pubDate>
    <dc:creator>brendanmckenna</dc:creator>
    <dc:date>2022-11-04T15:17:28Z</dc:date>
    <item>
      <title>How to avoid an error when using the automl python api on a classification problem</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-avoid-an-error-when-using-the-automl-python-api-on-a/m-p/23879#M1349</link>
      <description>&lt;P&gt;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? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;summary = databricks.automl.classify(train_df, target_col='new_cases', data_dir='dbfs:/automl/india_covid_automl', timeout_minutes=30)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The resulting error: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CellExecutionError: An error occurred while executing the following cell:
------------------
import mlflow
import os
&amp;nbsp;
mlflow.mlflow.set_tracking_uri("databricks")
os.environ["DATABRICKS_HOST"] = "https://oregon.cloud.databricks.com"
os.environ["DATABRICKS_TOKEN"] = "[REDACTED]"
&amp;nbsp;
%matplotlib inline
------------------
&amp;nbsp;
[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----&amp;gt; 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
&amp;nbsp;
[0;31mAttributeError[0m: module 'mlflow' has no attribute 'mlflow'
AttributeError: module 'mlflow' has no attribute 'mlflow'
---------------------------------------------------------------------------
CellExecutionError                        Traceback (most recent call last)
&amp;lt;command-3357122079230110&amp;gt; in &amp;lt;cell line: 2&amp;gt;()
      1 mlflow.set_tracking_uri("databricks")
----&amp;gt; 2 summary = databricks.automl.classify(train_df, target_col='new_cases', data_dir='dbfs:/automl/india_covid_automl', timeout_minutes=30)
&amp;nbsp;
/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     """
---&amp;gt; 30     return Classifier(context_type=ContextType.DATABRICKS).fit(
     31         dataset, target_col, data_dir, timeout_minutes=timeout_minutes, max_trials=max_trials)
&amp;nbsp;
/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:
--&amp;gt; 126             return self._fit_impl(dataset, target_col, data_dir, max_trials, parallelism, timeout,
    127                                   experiment)
    128         finally:&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 16:41:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-avoid-an-error-when-using-the-automl-python-api-on-a/m-p/23879#M1349</guid>
      <dc:creator>brendanmckenna</dc:creator>
      <dc:date>2022-11-03T16:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid an error when using the automl python api on a classification problem</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-avoid-an-error-when-using-the-automl-python-api-on-a/m-p/23881#M1351</link>
      <description>&lt;P&gt;It's run in a notebook. I resolved it by upgrading the automl version. It looks like it was because I had an early automl version installed (0.1.dev0)&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 15:16:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-avoid-an-error-when-using-the-automl-python-api-on-a/m-p/23881#M1351</guid>
      <dc:creator>brendanmckenna</dc:creator>
      <dc:date>2022-11-04T15:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid an error when using the automl python api on a classification problem</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-avoid-an-error-when-using-the-automl-python-api-on-a/m-p/23882#M1352</link>
      <description>&lt;P&gt;I had (accidentally) manually installed a very early version of databricks automl. Once I upgraded the error resolved. &lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 15:17:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-avoid-an-error-when-using-the-automl-python-api-on-a/m-p/23882#M1352</guid>
      <dc:creator>brendanmckenna</dc:creator>
      <dc:date>2022-11-04T15:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid an error when using the automl python api on a classification problem</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-avoid-an-error-when-using-the-automl-python-api-on-a/m-p/23880#M1350</link>
      <description>&lt;P&gt;Hi @Brendan McKenna​&amp;nbsp;, The error is not clear. Could you please provide the error code? Is it run in a notebook ?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 07:13:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-avoid-an-error-when-using-the-automl-python-api-on-a/m-p/23880#M1350</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2022-11-04T07:13:15Z</dc:date>
    </item>
  </channel>
</rss>

