<?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 Distributed ML on Databricks Serverless in Community Articles</title>
    <link>https://community.databricks.com/t5/community-articles/distributed-ml-on-databricks-serverless/m-p/140649#M821</link>
    <description>&lt;UL&gt;
&lt;LI&gt;You can now run &lt;STRONG&gt;distributed ML&lt;/STRONG&gt; (Spark MLlib in Python, Optuna tuning, MLflow Spark, Joblib Spark) on &lt;STRONG&gt;serverless notebooks/jobs&lt;/STRONG&gt; and on &lt;STRONG&gt;standard clusters&lt;/STRONG&gt;, not just dedicated ML clusters.&lt;/LI&gt;
&lt;LI&gt;It reuses the same Unity Catalog + Lakeguard stack you already use for serverless SQL/ETL, so ML training inherits fine‑grained access control and multi‑user isolation.&lt;/LI&gt;
&lt;LI&gt;Sweet spot: teams doing “classic” ML (Spark MLlib, scikit‑learn, XGBoost) that want faster training/tuning without managing special ML clusters.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Why This Matters in Real Life&lt;/H2&gt;
&lt;P&gt;In most shops today, the story looks like this:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Analytics is on serverless + Unity Catalog.&lt;/LI&gt;
&lt;LI&gt;Serious ML = “go spin a dedicated cluster,” often with weaker access controls and bespoke configs.&lt;/LI&gt;
&lt;LI&gt;Hyperparameter tuning is either single-threaded or a fragile homegrown loop.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The result: cluster sprawl, security headaches, and ML pipelines that live on an island far away from the rest of your lakehouse.&lt;/P&gt;
&lt;P&gt;Distributed ML on serverless/standard is Databricks’ attempt to collapse that mess back into one governed platform.&lt;/P&gt;
&lt;H2&gt;What You Actually Get&lt;/H2&gt;
&lt;P&gt;On &lt;STRONG&gt;serverless compute (environment version 4+)&lt;/STRONG&gt; and &lt;STRONG&gt;standard clusters (DBR 17.0+)&lt;/STRONG&gt;, you now have:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Spark MLlib in PySpark&lt;/STRONG&gt; (&lt;CODE&gt;pyspark.ml&lt;/CODE&gt;) on shared compute – pipelines, tree models, regressions, clustering, etc.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Optuna&lt;/STRONG&gt; for distributed hyperparameter tuning using &lt;CODE&gt;MlflowSparkStudy&lt;/CODE&gt; with MLflow‑backed storage.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;MLflow Spark&lt;/STRONG&gt; (&lt;CODE&gt;mlflow.spark&lt;/CODE&gt;) to log/load Spark ML pipelines as MLflow models.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Joblib Spark&lt;/STRONG&gt; so existing joblib‑based scikit‑learn/XGBoost workflows can fan out over Spark executors.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;All of that runs under Unity Catalog governance and Lakeguard isolation, so shared clusters no longer mean “everyone can see everything.”&lt;/P&gt;
&lt;H2&gt;What It Looks Like in Practice&lt;/H2&gt;
&lt;H3&gt;One simple pattern&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;Your features live in Delta tables in Unity Catalog.&lt;/LI&gt;
&lt;LI&gt;You attach a notebook or job to &lt;STRONG&gt;serverless env v4&lt;/STRONG&gt; or a &lt;STRONG&gt;standard cluster on DBR 17.0&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;You train/tune using Spark MLlib or scikit‑learn + Joblib Spark and track everything in MLflow.&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;Tiny code sketch&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-python"&gt;
from pyspark.ml.feature import VectorAssembler
from pyspark.ml.classification import GBTClassifier
from pyspark.ml import Pipeline
import mlflow, mlflow.spark

df = spark.table("main_ml.credit_features_train")
feature_cols = [c for c in df.columns if c != "label"]

assembler = VectorAssembler(inputCols=feature_cols, outputCol="features")
gbt = GBTClassifier(featuresCol="features", labelCol="label", maxIter=50)

pipeline = Pipeline(stages=[assembler, gbt])

mlflow.set_experiment("/Shared/distributed-ml/credit-risk")

with mlflow.start_run(run_name="gbt_serverless"):
    model = pipeline.fit(df)
    mlflow.spark.log_model(model, "model")
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Same idea for Optuna: wrap the training logic in an &lt;CODE&gt;objective()&lt;/CODE&gt; function, wire it into &lt;CODE&gt;MlflowSparkStudy&lt;/CODE&gt;, and set &lt;CODE&gt;n_jobs&lt;/CODE&gt; &amp;gt; 1 so trials run across executors.&lt;/P&gt;
&lt;H2&gt;When This Is a Good Idea&lt;/H2&gt;
&lt;H3&gt;Great fit&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;You’re already on Unity Catalog + serverless or standard compute and want ML to follow the same governance path.&lt;/LI&gt;
&lt;LI&gt;Your workloads are mostly “classic” ML (regressions, trees, clustering) or scikit‑learn/XGBoost tuning.&lt;/LI&gt;
&lt;LI&gt;You care about &lt;STRONG&gt;multi-user shared clusters&lt;/STRONG&gt; where each user only sees the data they should.&lt;/LI&gt;
&lt;LI&gt;You want to kill off some bespoke ML clusters and simplify your platform story.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;Maybe not (yet)&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;You need &lt;STRONG&gt;unsupported Spark MLlib models&lt;/STRONG&gt; (like &lt;CODE&gt;DistributedLDAModel&lt;/CODE&gt; or &lt;CODE&gt;FPGrowthModel&lt;/CODE&gt;) – those aren’t supported here today.&lt;/LI&gt;
&lt;LI&gt;Your models are multi‑GB monsters that blow past the serverless/standard model size limits (≈100 MB per model on serverless, ≈1 GB on standard).&lt;/LI&gt;
&lt;LI&gt;You’re doing very custom deep learning training and already rely on dedicated ML runtimes with TorchDistributor / Ray / DeepSpeed.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Mental Model to Keep You Sane&lt;/H2&gt;
&lt;P&gt;Think of this feature as:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;“Take the compute you already trust for SQL &amp;amp; ETL, and teach it to do distributed ML under the same governance and cost model.”&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;No new cluster flavor for most use cases, less operational overhead, and a much easier story to tell security and compliance.&lt;/P&gt;
&lt;H2&gt;Fast Next Steps&lt;/H2&gt;
&lt;OL&gt;
&lt;LI&gt;Pick one existing Spark MLlib or scikit‑learn training notebook.&lt;/LI&gt;
&lt;LI&gt;Attach it to a &lt;STRONG&gt;serverless env v4&lt;/STRONG&gt; (or DBR 17.0 standard) cluster and make sure it still runs.&lt;/LI&gt;
&lt;LI&gt;Add basic MLflow logging (&lt;CODE&gt;mlflow.start_run&lt;/CODE&gt;, log params/metrics, and log the model).&lt;/LI&gt;
&lt;LI&gt;Wrap that training in a simple Optuna study for one important model and run a small trial count (e.g. 20).&lt;/LI&gt;
&lt;LI&gt;Once it feels boring (in a good way), start decommissioning any “special” ML clusters that no longer earn their keep.&lt;/LI&gt;
&lt;/OL&gt;
&lt;H2&gt;Links to Keep Handy&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://www.databricks.com/blog/announcing-public-preview-distributed-ml-serverless-and-standard-clusters" target="_blank"&gt;Public Preview: Distributed ML on Serverless and Standard Clusters&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/machine-learning/train-model/mllib.html" target="_blank"&gt;Use Apache Spark MLlib on Databricks&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/release-notes/serverless/environment-version/four.html" target="_blank"&gt;Serverless environment version 4 details &amp;amp; limits&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/machine-learning/automl-hyperparam-tuning/optuna.html" target="_blank"&gt;Hyperparameter tuning with Optuna on Databricks&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/compute/lakeguard.html" target="_blank"&gt;Lakeguard and shared compute isolation&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 30 Nov 2025 15:37:03 GMT</pubDate>
    <dc:creator>AbhaySingh</dc:creator>
    <dc:date>2025-11-30T15:37:03Z</dc:date>
    <item>
      <title>Distributed ML on Databricks Serverless</title>
      <link>https://community.databricks.com/t5/community-articles/distributed-ml-on-databricks-serverless/m-p/140649#M821</link>
      <description>&lt;UL&gt;
&lt;LI&gt;You can now run &lt;STRONG&gt;distributed ML&lt;/STRONG&gt; (Spark MLlib in Python, Optuna tuning, MLflow Spark, Joblib Spark) on &lt;STRONG&gt;serverless notebooks/jobs&lt;/STRONG&gt; and on &lt;STRONG&gt;standard clusters&lt;/STRONG&gt;, not just dedicated ML clusters.&lt;/LI&gt;
&lt;LI&gt;It reuses the same Unity Catalog + Lakeguard stack you already use for serverless SQL/ETL, so ML training inherits fine‑grained access control and multi‑user isolation.&lt;/LI&gt;
&lt;LI&gt;Sweet spot: teams doing “classic” ML (Spark MLlib, scikit‑learn, XGBoost) that want faster training/tuning without managing special ML clusters.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Why This Matters in Real Life&lt;/H2&gt;
&lt;P&gt;In most shops today, the story looks like this:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Analytics is on serverless + Unity Catalog.&lt;/LI&gt;
&lt;LI&gt;Serious ML = “go spin a dedicated cluster,” often with weaker access controls and bespoke configs.&lt;/LI&gt;
&lt;LI&gt;Hyperparameter tuning is either single-threaded or a fragile homegrown loop.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The result: cluster sprawl, security headaches, and ML pipelines that live on an island far away from the rest of your lakehouse.&lt;/P&gt;
&lt;P&gt;Distributed ML on serverless/standard is Databricks’ attempt to collapse that mess back into one governed platform.&lt;/P&gt;
&lt;H2&gt;What You Actually Get&lt;/H2&gt;
&lt;P&gt;On &lt;STRONG&gt;serverless compute (environment version 4+)&lt;/STRONG&gt; and &lt;STRONG&gt;standard clusters (DBR 17.0+)&lt;/STRONG&gt;, you now have:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Spark MLlib in PySpark&lt;/STRONG&gt; (&lt;CODE&gt;pyspark.ml&lt;/CODE&gt;) on shared compute – pipelines, tree models, regressions, clustering, etc.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Optuna&lt;/STRONG&gt; for distributed hyperparameter tuning using &lt;CODE&gt;MlflowSparkStudy&lt;/CODE&gt; with MLflow‑backed storage.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;MLflow Spark&lt;/STRONG&gt; (&lt;CODE&gt;mlflow.spark&lt;/CODE&gt;) to log/load Spark ML pipelines as MLflow models.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Joblib Spark&lt;/STRONG&gt; so existing joblib‑based scikit‑learn/XGBoost workflows can fan out over Spark executors.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;All of that runs under Unity Catalog governance and Lakeguard isolation, so shared clusters no longer mean “everyone can see everything.”&lt;/P&gt;
&lt;H2&gt;What It Looks Like in Practice&lt;/H2&gt;
&lt;H3&gt;One simple pattern&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;Your features live in Delta tables in Unity Catalog.&lt;/LI&gt;
&lt;LI&gt;You attach a notebook or job to &lt;STRONG&gt;serverless env v4&lt;/STRONG&gt; or a &lt;STRONG&gt;standard cluster on DBR 17.0&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;You train/tune using Spark MLlib or scikit‑learn + Joblib Spark and track everything in MLflow.&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;Tiny code sketch&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-python"&gt;
from pyspark.ml.feature import VectorAssembler
from pyspark.ml.classification import GBTClassifier
from pyspark.ml import Pipeline
import mlflow, mlflow.spark

df = spark.table("main_ml.credit_features_train")
feature_cols = [c for c in df.columns if c != "label"]

assembler = VectorAssembler(inputCols=feature_cols, outputCol="features")
gbt = GBTClassifier(featuresCol="features", labelCol="label", maxIter=50)

pipeline = Pipeline(stages=[assembler, gbt])

mlflow.set_experiment("/Shared/distributed-ml/credit-risk")

with mlflow.start_run(run_name="gbt_serverless"):
    model = pipeline.fit(df)
    mlflow.spark.log_model(model, "model")
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Same idea for Optuna: wrap the training logic in an &lt;CODE&gt;objective()&lt;/CODE&gt; function, wire it into &lt;CODE&gt;MlflowSparkStudy&lt;/CODE&gt;, and set &lt;CODE&gt;n_jobs&lt;/CODE&gt; &amp;gt; 1 so trials run across executors.&lt;/P&gt;
&lt;H2&gt;When This Is a Good Idea&lt;/H2&gt;
&lt;H3&gt;Great fit&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;You’re already on Unity Catalog + serverless or standard compute and want ML to follow the same governance path.&lt;/LI&gt;
&lt;LI&gt;Your workloads are mostly “classic” ML (regressions, trees, clustering) or scikit‑learn/XGBoost tuning.&lt;/LI&gt;
&lt;LI&gt;You care about &lt;STRONG&gt;multi-user shared clusters&lt;/STRONG&gt; where each user only sees the data they should.&lt;/LI&gt;
&lt;LI&gt;You want to kill off some bespoke ML clusters and simplify your platform story.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;Maybe not (yet)&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;You need &lt;STRONG&gt;unsupported Spark MLlib models&lt;/STRONG&gt; (like &lt;CODE&gt;DistributedLDAModel&lt;/CODE&gt; or &lt;CODE&gt;FPGrowthModel&lt;/CODE&gt;) – those aren’t supported here today.&lt;/LI&gt;
&lt;LI&gt;Your models are multi‑GB monsters that blow past the serverless/standard model size limits (≈100 MB per model on serverless, ≈1 GB on standard).&lt;/LI&gt;
&lt;LI&gt;You’re doing very custom deep learning training and already rely on dedicated ML runtimes with TorchDistributor / Ray / DeepSpeed.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Mental Model to Keep You Sane&lt;/H2&gt;
&lt;P&gt;Think of this feature as:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;“Take the compute you already trust for SQL &amp;amp; ETL, and teach it to do distributed ML under the same governance and cost model.”&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;No new cluster flavor for most use cases, less operational overhead, and a much easier story to tell security and compliance.&lt;/P&gt;
&lt;H2&gt;Fast Next Steps&lt;/H2&gt;
&lt;OL&gt;
&lt;LI&gt;Pick one existing Spark MLlib or scikit‑learn training notebook.&lt;/LI&gt;
&lt;LI&gt;Attach it to a &lt;STRONG&gt;serverless env v4&lt;/STRONG&gt; (or DBR 17.0 standard) cluster and make sure it still runs.&lt;/LI&gt;
&lt;LI&gt;Add basic MLflow logging (&lt;CODE&gt;mlflow.start_run&lt;/CODE&gt;, log params/metrics, and log the model).&lt;/LI&gt;
&lt;LI&gt;Wrap that training in a simple Optuna study for one important model and run a small trial count (e.g. 20).&lt;/LI&gt;
&lt;LI&gt;Once it feels boring (in a good way), start decommissioning any “special” ML clusters that no longer earn their keep.&lt;/LI&gt;
&lt;/OL&gt;
&lt;H2&gt;Links to Keep Handy&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://www.databricks.com/blog/announcing-public-preview-distributed-ml-serverless-and-standard-clusters" target="_blank"&gt;Public Preview: Distributed ML on Serverless and Standard Clusters&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/machine-learning/train-model/mllib.html" target="_blank"&gt;Use Apache Spark MLlib on Databricks&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/release-notes/serverless/environment-version/four.html" target="_blank"&gt;Serverless environment version 4 details &amp;amp; limits&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/machine-learning/automl-hyperparam-tuning/optuna.html" target="_blank"&gt;Hyperparameter tuning with Optuna on Databricks&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/compute/lakeguard.html" target="_blank"&gt;Lakeguard and shared compute isolation&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Nov 2025 15:37:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/community-articles/distributed-ml-on-databricks-serverless/m-p/140649#M821</guid>
      <dc:creator>AbhaySingh</dc:creator>
      <dc:date>2025-11-30T15:37:03Z</dc:date>
    </item>
  </channel>
</rss>

