<?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 Tuning with Optuna and MlflowSparkStudy in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/tuning-with-optuna-and-mlflowsparkstudy/m-p/167830#M4698</link>
    <description>&lt;P&gt;I am following the guide for tuning a model with Optuna and MlflowSparkStudy. My compute is configured with autoscaling enabled, with 1–2 Spark workers, each with 8 cores and 32 GB of memory. I set n_jobs=2 and trials=100, in &lt;STRONG&gt;mlflow_study.optimize()&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I have a few questions about how MlflowSparkStudy distributes the workload:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;How should I think about n_jobs in mlflow_study.optimize() vs. num_threads/n_jobs in LightGBM?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For example, with 1–2 Spark workers and 8 cores per worker, would it make sense to set mlflow_study.optimize(n_jobs=2) and LightGBM n_jobs=7? My dataset is large, so ideally I would like to run only &lt;STRONG&gt;one model-training job per Spark worker&lt;/STRONG&gt; and use the remaining cores on that worker for the LightGBM training.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Does MlflowSparkStudy automatically trigger or make use of Spark autoscaling?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If I configure my cluster with a minimum of 1 worker and a maximum of 2 workers, will MlflowSparkStudy cause Spark to scale up to 2 workers as needed when running multiple trials in parallel?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;What is the recommended way to make a large DataFrame available to each Spark worker?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Currently, I have a Pandas DataFrame that I pass to the objective function used by mlflow_study.optimize(). Should I broadcast the DataFrame, cache it in Spark, or use another approach to avoid repeatedly transferring the data to each worker for every trial?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Any guidance on the recommended configuration or best practices would be greatly appreciated.&lt;/P&gt;&lt;P&gt;#mlflow #optuna #&lt;SPAN&gt;MlflowSparkStudy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/machine-learning/automl-hyperparam-tuning/optuna" target="_self"&gt;https://learn.microsoft.com/en-us/azure/databricks/machine-learning/automl-hyperparam-tuning/optuna&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Sep 2026 19:24:05 GMT</pubDate>
    <dc:creator>AdamIH123</dc:creator>
    <dc:date>2026-09-07T19:24:05Z</dc:date>
    <item>
      <title>Tuning with Optuna and MlflowSparkStudy</title>
      <link>https://community.databricks.com/t5/machine-learning/tuning-with-optuna-and-mlflowsparkstudy/m-p/167830#M4698</link>
      <description>&lt;P&gt;I am following the guide for tuning a model with Optuna and MlflowSparkStudy. My compute is configured with autoscaling enabled, with 1–2 Spark workers, each with 8 cores and 32 GB of memory. I set n_jobs=2 and trials=100, in &lt;STRONG&gt;mlflow_study.optimize()&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I have a few questions about how MlflowSparkStudy distributes the workload:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;How should I think about n_jobs in mlflow_study.optimize() vs. num_threads/n_jobs in LightGBM?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For example, with 1–2 Spark workers and 8 cores per worker, would it make sense to set mlflow_study.optimize(n_jobs=2) and LightGBM n_jobs=7? My dataset is large, so ideally I would like to run only &lt;STRONG&gt;one model-training job per Spark worker&lt;/STRONG&gt; and use the remaining cores on that worker for the LightGBM training.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Does MlflowSparkStudy automatically trigger or make use of Spark autoscaling?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If I configure my cluster with a minimum of 1 worker and a maximum of 2 workers, will MlflowSparkStudy cause Spark to scale up to 2 workers as needed when running multiple trials in parallel?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;What is the recommended way to make a large DataFrame available to each Spark worker?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Currently, I have a Pandas DataFrame that I pass to the objective function used by mlflow_study.optimize(). Should I broadcast the DataFrame, cache it in Spark, or use another approach to avoid repeatedly transferring the data to each worker for every trial?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Any guidance on the recommended configuration or best practices would be greatly appreciated.&lt;/P&gt;&lt;P&gt;#mlflow #optuna #&lt;SPAN&gt;MlflowSparkStudy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/machine-learning/automl-hyperparam-tuning/optuna" target="_self"&gt;https://learn.microsoft.com/en-us/azure/databricks/machine-learning/automl-hyperparam-tuning/optuna&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2026 19:24:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/tuning-with-optuna-and-mlflowsparkstudy/m-p/167830#M4698</guid>
      <dc:creator>AdamIH123</dc:creator>
      <dc:date>2026-09-07T19:24:05Z</dc:date>
    </item>
  </channel>
</rss>

