<?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: Hyperopt (15.4 LTS ML) ignores autologger settings in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/hyperopt-15-4-lts-ml-ignores-autologger-settings/m-p/136526#M4382</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/123108"&gt;@art1&lt;/a&gt;&amp;nbsp;, sorry this post got lost in the shuffle.&amp;nbsp; Here are some things to consider regarding your question:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="paragraph"&gt;Thanks for flagging this—what you’re seeing is expected given how Databricks integrates Hyperopt with MLflow, and there are clear ways to get your control back.&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;H3 class="paragraph"&gt;What’s causing the unexpected logging&lt;/H3&gt;
&lt;UL&gt;
&lt;LI class="paragraph"&gt;&lt;STRONG&gt;Hyperopt on Databricks uses its own automated MLflow tracking integration&lt;/STRONG&gt;, which is independent of the standard &lt;CODE&gt;mlflow.autolog()&lt;/CODE&gt; feature. That’s why runs are still logged even if autologging is disabled at the workspace level or via &lt;CODE&gt;mlflow.autolog(disable=True)&lt;/CODE&gt; in your notebook.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Hyperopt is deprecated and scheduled for removal in the next major Databricks ML runtime&lt;/STRONG&gt;, so steering toward Optuna or Ray Tune is recommended if you want tighter control over logging behavior going forward.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3 class="paragraph"&gt;How to stop Hyperopt from auto-logging Pick one of these approaches:&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Don’t use SparkTrials; use the default Trials class.&lt;/STRONG&gt; Databricks’ automated MLflow logging for Hyperopt is tied to &lt;CODE&gt;SparkTrials&lt;/CODE&gt;. When you run distributed or single-node trials with the default &lt;CODE&gt;Trials&lt;/CODE&gt;, Databricks does not auto-log to MLflow and you control what gets logged manually.&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-python"&gt;from hyperopt import fmin, tpe, hp, Trials

def objective(params):
    # your training + return a scalar loss
    return loss

trials = Trials()  # default Trials -&amp;gt; no Databricks auto-logging
best = fmin(fn=objective, space=search_space, algo=tpe.suggest, max_evals=50, trials=trials)
# If you want logging, do it explicitly:
# with mlflow.start_run():
#     mlflow.log_params(best); mlflow.log_metric("final_loss", final_loss)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="paragraph"&gt;Databricks documents that with distributed training algorithms, use &lt;CODE&gt;Trials&lt;/CODE&gt; (not &lt;CODE&gt;SparkTrials&lt;/CODE&gt;) and manually call MLflow if you want logging.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Switch to Optuna or Ray Tune.&lt;/STRONG&gt; Both integrate cleanly with MLflow and let you opt-in to logging via callbacks or explicit API calls, so nothing is logged unless you choose to.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;If you must keep SparkTrials, redirect where it logs.&lt;/STRONG&gt; You can set the active experiment (to a workspace experiment you own) or change the tracking URI to a path you control. This doesn’t disable logging, but it keeps it confined to the experiment you choose.&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-python"&gt;import mlflow
mlflow.set_tracking_uri("databricks")  # default
mlflow.set_experiment("/Users/you@databricks.com/controlled-experiment")  # a workspace experiment you created&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;H3 class="paragraph"&gt;Why you can’t delete the “experiment” in the UI&lt;/H3&gt;
&lt;UL&gt;
&lt;LI class="paragraph"&gt;&lt;STRONG&gt;Notebook experiments are special.&lt;/STRONG&gt; When MLflow runs start without an active experiment, Databricks automatically creates a “notebook experiment” attached to the notebook. These cannot be renamed or deleted from the MLflow UI; the controls appear disabled because they’re bound to the notebook’s lifecycle.&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Deleting a notebook experiment via the API moves the notebook to Trash.&lt;/STRONG&gt; If you use &lt;CODE&gt;MlflowClient().delete_experiment(experiment_id)&lt;/CODE&gt; on a notebook experiment, Databricks will move the notebook itself to the Trash folder. That’s by design.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Experiments created from notebooks in Git folders have further limitations.&lt;/STRONG&gt; You can’t directly manage rename/delete/permissions on those experiments; you must operate at the Git folder level.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3 class="paragraph"&gt;Regain control—practical steps&lt;/H3&gt;
&lt;UL&gt;
&lt;LI class="paragraph"&gt;&lt;STRONG&gt;Set an explicit workspace experiment at the top of your notebook.&lt;/STRONG&gt; That ensures runs never go to the auto-created notebook experiment and gives you full control of lifecycle in the UI.&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-python"&gt;  import mlflow
  mlflow.set_tracking_uri("databricks")
  mlflow.set_experiment("/Users/you@databricks.com/my-experiment")
  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Avoid SparkTrials to stop Hyperopt auto-logging&lt;/STRONG&gt; and wrap your training explicitly in &lt;CODE&gt;mlflow.start_run()&lt;/CODE&gt; only where you want logs.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Consider Optuna or Ray Tune&lt;/STRONG&gt; for HPO in 15.4 LTS ML and beyond; logging is opt-in and Hyperopt is being removed in the next major ML runtime.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;If you need to remove the current notebook experiment:&lt;/STRONG&gt; either
&lt;UL&gt;
&lt;LI&gt;Leave it and start logging to a workspace experiment as above, or&lt;/LI&gt;
&lt;LI&gt;Use the MLflow API to delete it (knowing the notebook will go to Trash).&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3 class="paragraph"&gt;Notes on workspace autologging&lt;/H3&gt;
&lt;UL&gt;
&lt;LI class="paragraph"&gt;&lt;STRONG&gt;Disabling Databricks Autologging affects framework autologgers (sklearn, PyTorch, XGBoost, etc.)&lt;/STRONG&gt;, but it does not affect the separate Hyperopt automated tracking integration, which is why it didn’t solve the issue.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;Hope this helps, Louis.&lt;/DIV&gt;</description>
    <pubDate>Wed, 29 Oct 2025 10:16:46 GMT</pubDate>
    <dc:creator>Louis_Frolio</dc:creator>
    <dc:date>2025-10-29T10:16:46Z</dc:date>
    <item>
      <title>Hyperopt (15.4 LTS ML) ignores autologger settings</title>
      <link>https://community.databricks.com/t5/machine-learning/hyperopt-15-4-lts-ml-ignores-autologger-settings/m-p/96146#M3745</link>
      <description>&lt;P&gt;I use ML Flow Experiment to store models once they leave very early tests and development. I switched lately to 15.4 LTS ML and was hit by unhinged Hyperopt behavior:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;it was creating Experiment logs ignoring i) autologger is off on the workspace level in notebooks, and ii) explicit request with mlflow.autolog(disable=True) within the notebook.&lt;/LI&gt;&lt;LI&gt;The created Experiment can not be deleted from my Experiments (all options are dimmed)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I want back my control of processes.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 14:24:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/hyperopt-15-4-lts-ml-ignores-autologger-settings/m-p/96146#M3745</guid>
      <dc:creator>art1</dc:creator>
      <dc:date>2024-10-25T14:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperopt (15.4 LTS ML) ignores autologger settings</title>
      <link>https://community.databricks.com/t5/machine-learning/hyperopt-15-4-lts-ml-ignores-autologger-settings/m-p/136526#M4382</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/123108"&gt;@art1&lt;/a&gt;&amp;nbsp;, sorry this post got lost in the shuffle.&amp;nbsp; Here are some things to consider regarding your question:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="paragraph"&gt;Thanks for flagging this—what you’re seeing is expected given how Databricks integrates Hyperopt with MLflow, and there are clear ways to get your control back.&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;H3 class="paragraph"&gt;What’s causing the unexpected logging&lt;/H3&gt;
&lt;UL&gt;
&lt;LI class="paragraph"&gt;&lt;STRONG&gt;Hyperopt on Databricks uses its own automated MLflow tracking integration&lt;/STRONG&gt;, which is independent of the standard &lt;CODE&gt;mlflow.autolog()&lt;/CODE&gt; feature. That’s why runs are still logged even if autologging is disabled at the workspace level or via &lt;CODE&gt;mlflow.autolog(disable=True)&lt;/CODE&gt; in your notebook.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Hyperopt is deprecated and scheduled for removal in the next major Databricks ML runtime&lt;/STRONG&gt;, so steering toward Optuna or Ray Tune is recommended if you want tighter control over logging behavior going forward.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3 class="paragraph"&gt;How to stop Hyperopt from auto-logging Pick one of these approaches:&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Don’t use SparkTrials; use the default Trials class.&lt;/STRONG&gt; Databricks’ automated MLflow logging for Hyperopt is tied to &lt;CODE&gt;SparkTrials&lt;/CODE&gt;. When you run distributed or single-node trials with the default &lt;CODE&gt;Trials&lt;/CODE&gt;, Databricks does not auto-log to MLflow and you control what gets logged manually.&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-python"&gt;from hyperopt import fmin, tpe, hp, Trials

def objective(params):
    # your training + return a scalar loss
    return loss

trials = Trials()  # default Trials -&amp;gt; no Databricks auto-logging
best = fmin(fn=objective, space=search_space, algo=tpe.suggest, max_evals=50, trials=trials)
# If you want logging, do it explicitly:
# with mlflow.start_run():
#     mlflow.log_params(best); mlflow.log_metric("final_loss", final_loss)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="paragraph"&gt;Databricks documents that with distributed training algorithms, use &lt;CODE&gt;Trials&lt;/CODE&gt; (not &lt;CODE&gt;SparkTrials&lt;/CODE&gt;) and manually call MLflow if you want logging.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Switch to Optuna or Ray Tune.&lt;/STRONG&gt; Both integrate cleanly with MLflow and let you opt-in to logging via callbacks or explicit API calls, so nothing is logged unless you choose to.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;If you must keep SparkTrials, redirect where it logs.&lt;/STRONG&gt; You can set the active experiment (to a workspace experiment you own) or change the tracking URI to a path you control. This doesn’t disable logging, but it keeps it confined to the experiment you choose.&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-python"&gt;import mlflow
mlflow.set_tracking_uri("databricks")  # default
mlflow.set_experiment("/Users/you@databricks.com/controlled-experiment")  # a workspace experiment you created&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;H3 class="paragraph"&gt;Why you can’t delete the “experiment” in the UI&lt;/H3&gt;
&lt;UL&gt;
&lt;LI class="paragraph"&gt;&lt;STRONG&gt;Notebook experiments are special.&lt;/STRONG&gt; When MLflow runs start without an active experiment, Databricks automatically creates a “notebook experiment” attached to the notebook. These cannot be renamed or deleted from the MLflow UI; the controls appear disabled because they’re bound to the notebook’s lifecycle.&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Deleting a notebook experiment via the API moves the notebook to Trash.&lt;/STRONG&gt; If you use &lt;CODE&gt;MlflowClient().delete_experiment(experiment_id)&lt;/CODE&gt; on a notebook experiment, Databricks will move the notebook itself to the Trash folder. That’s by design.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Experiments created from notebooks in Git folders have further limitations.&lt;/STRONG&gt; You can’t directly manage rename/delete/permissions on those experiments; you must operate at the Git folder level.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3 class="paragraph"&gt;Regain control—practical steps&lt;/H3&gt;
&lt;UL&gt;
&lt;LI class="paragraph"&gt;&lt;STRONG&gt;Set an explicit workspace experiment at the top of your notebook.&lt;/STRONG&gt; That ensures runs never go to the auto-created notebook experiment and gives you full control of lifecycle in the UI.&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-python"&gt;  import mlflow
  mlflow.set_tracking_uri("databricks")
  mlflow.set_experiment("/Users/you@databricks.com/my-experiment")
  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Avoid SparkTrials to stop Hyperopt auto-logging&lt;/STRONG&gt; and wrap your training explicitly in &lt;CODE&gt;mlflow.start_run()&lt;/CODE&gt; only where you want logs.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Consider Optuna or Ray Tune&lt;/STRONG&gt; for HPO in 15.4 LTS ML and beyond; logging is opt-in and Hyperopt is being removed in the next major ML runtime.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;If you need to remove the current notebook experiment:&lt;/STRONG&gt; either
&lt;UL&gt;
&lt;LI&gt;Leave it and start logging to a workspace experiment as above, or&lt;/LI&gt;
&lt;LI&gt;Use the MLflow API to delete it (knowing the notebook will go to Trash).&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3 class="paragraph"&gt;Notes on workspace autologging&lt;/H3&gt;
&lt;UL&gt;
&lt;LI class="paragraph"&gt;&lt;STRONG&gt;Disabling Databricks Autologging affects framework autologgers (sklearn, PyTorch, XGBoost, etc.)&lt;/STRONG&gt;, but it does not affect the separate Hyperopt automated tracking integration, which is why it didn’t solve the issue.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;Hope this helps, Louis.&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Oct 2025 10:16:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/hyperopt-15-4-lts-ml-ignores-autologger-settings/m-p/136526#M4382</guid>
      <dc:creator>Louis_Frolio</dc:creator>
      <dc:date>2025-10-29T10:16:46Z</dc:date>
    </item>
  </channel>
</rss>

