<?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: Errors in notebooks of Scalable Machine Learning with Apache Spark course in Databricks academy. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/errors-in-notebooks-of-scalable-machine-learning-with-apache/m-p/17112#M11162</link>
    <description>&lt;P&gt;Tagging @Kaniz Fatma​&amp;nbsp;as there was no response what so ever!&lt;/P&gt;&lt;P&gt;By any chance, do you know how to resolve these errors in the notebook?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jun 2022 12:51:15 GMT</pubDate>
    <dc:creator>RiyazAliM</dc:creator>
    <dc:date>2022-06-22T12:51:15Z</dc:date>
    <item>
      <title>Errors in notebooks of Scalable Machine Learning with Apache Spark course in Databricks academy.</title>
      <link>https://community.databricks.com/t5/data-engineering/errors-in-notebooks-of-scalable-machine-learning-with-apache/m-p/17111#M11161</link>
      <description>&lt;P&gt;HI there,&lt;/P&gt;&lt;P&gt;I'm following the course mentioned from Databricks Academy. I downloaded the .dbc archiive and working along side the videos from academy. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ML-08 - Hyperopt notebook, I see the following error in cmd 13.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="hyperopt_implementation"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1774iD76E8C0E11856546/image-size/large?v=v2&amp;amp;px=999" role="button" title="hyperopt_implementation" alt="hyperopt_implementation" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  best_hyperparam = fmin(fn=objective_function, 
                         space=search_space,
                         algo=tpe.suggest, 
                         max_evals=num_evals,
                         trials=trials,
#this is where I see the error, I commented the randomstate to bypass the error.
                         rstate=np.random.RandomState(42) 
                        )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The below is the error i've encountered:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AttributeError: 'numpy.random.mtrand.RandomState' object has no attribute 'integers'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Detailed Error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AttributeError                            Traceback (most recent call last)
&amp;lt;command-1903711140984667&amp;gt; in &amp;lt;module&amp;gt;
      6   num_evals = 4
      7   trials = Trials()
----&amp;gt; 8   best_hyperparam = fmin(fn=objective_function, 
      9                          space=search_space,
     10                          algo=tpe.suggest,
&amp;nbsp;
/databricks/.python_edge_libs/hyperopt/fmin.py in fmin(fn, space, algo, max_evals, timeout, loss_threshold, trials, rstate, allow_trials_fmin, pass_expr_memo_ctrl, catch_eval_exceptions, verbose, return_argmin, points_to_evaluate, max_queue_len, show_progressbar, early_stop_fn, trials_save_file)
    563 
    564     if allow_trials_fmin and hasattr(trials, "fmin"):
--&amp;gt; 565         return trials.fmin(
    566             fn,
    567             space,
&amp;nbsp;
/databricks/.python_edge_libs/hyperopt/base.py in fmin(self, fn, space, algo, max_evals, timeout, loss_threshold, max_queue_len, rstate, verbose, pass_expr_memo_ctrl, catch_eval_exceptions, return_argmin, show_progressbar, early_stop_fn, trials_save_file)
    669         from .fmin import fmin
    670 
--&amp;gt; 671         return fmin(
    672             fn,
    673             space,
&amp;nbsp;
/databricks/.python_edge_libs/hyperopt/fmin.py in fmin(fn, space, algo, max_evals, timeout, loss_threshold, trials, rstate, allow_trials_fmin, pass_expr_memo_ctrl, catch_eval_exceptions, verbose, return_argmin, points_to_evaluate, max_queue_len, show_progressbar, early_stop_fn, trials_save_file)
    609 
    610     # next line is where the fmin is actually executed
--&amp;gt; 611     rval.exhaust()
    612 
    613     if return_argmin:
&amp;nbsp;
/databricks/.python_edge_libs/hyperopt/fmin.py in exhaust(self)
    387     def exhaust(self):
    388         n_done = len(self.trials)
--&amp;gt; 389         self.run(self.max_evals - n_done, block_until_done=self.asynchronous)
    390         self.trials.refresh()
    391         return self
&amp;nbsp;
/databricks/.python_edge_libs/hyperopt/fmin.py in run(self, N, block_until_done)
    297                     # processes orchestration
    298                     new_trials = algo(
--&amp;gt; 299                         new_ids, self.domain, trials, self.rstate.integers(2 ** 31 - 1)
    300                     )
    301                     assert len(new_ids) &amp;gt;= len(new_trials)
&amp;nbsp;
AttributeError: 'numpy.random.mtrand.RandomState' object has no attribute 'integers'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Another error is in ML08L-Hyperopt Lab, where I'm unable to pass I'm unable to pass "max_features" from best_hyperparam to the regressor. It fails while I'm fitting the model to the X_train &amp;amp; y_train.&lt;/P&gt;&lt;P&gt;Below is the snip:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="hyperopt problem with &amp;amp;quot;max_features&amp;amp;quot; "&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1769iBFF3EEE00D0DC045/image-size/large?v=v2&amp;amp;px=999" role="button" title="hyperopt problem with &amp;amp;quot;max_features&amp;amp;quot; " alt="hyperopt problem with &amp;amp;quot;max_features&amp;amp;quot; " /&gt;&lt;/span&gt;The error statement reads:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ValueError: max_features must be in (0, n_features]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 08:42:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/errors-in-notebooks-of-scalable-machine-learning-with-apache/m-p/17111#M11161</guid>
      <dc:creator>RiyazAliM</dc:creator>
      <dc:date>2022-06-21T08:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in notebooks of Scalable Machine Learning with Apache Spark course in Databricks academy.</title>
      <link>https://community.databricks.com/t5/data-engineering/errors-in-notebooks-of-scalable-machine-learning-with-apache/m-p/17112#M11162</link>
      <description>&lt;P&gt;Tagging @Kaniz Fatma​&amp;nbsp;as there was no response what so ever!&lt;/P&gt;&lt;P&gt;By any chance, do you know how to resolve these errors in the notebook?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 12:51:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/errors-in-notebooks-of-scalable-machine-learning-with-apache/m-p/17112#M11162</guid>
      <dc:creator>RiyazAliM</dc:creator>
      <dc:date>2022-06-22T12:51:15Z</dc:date>
    </item>
  </channel>
</rss>

