<?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: Serverless ML in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160387#M4634</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/216690"&gt;@Ashwin_DSA&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your quick reply. My aim is to use it in a scheduled job (python script) deployed via the cli.&lt;/P&gt;&lt;P&gt;When I tried like you suggested:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  environments:
    - environment_key: default
      spec:
        base_environment: databricks_ml_v5&lt;/LI-CODE&gt;&lt;P&gt;with base_environment either quoted or unquoted -- I get this exception:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Error: cannot update job: Invalid base environment for 'default'. Only custom base environments (Workspace or Volume absolute paths ending with '.yaml' or '.yml') are currently supported.&lt;/LI-CODE&gt;&lt;P&gt;I'm currently deploying via databricks cli=1.2.1&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jun 2026 12:20:03 GMT</pubDate>
    <dc:creator>Daniele-T</dc:creator>
    <dc:date>2026-06-24T12:20:03Z</dc:date>
    <item>
      <title>Serverless ML</title>
      <link>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160377#M4632</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to set up a DAB job that runs an ML job. For this it would be useful to use a serverless ML environment, that I can select in notebooks. Anyway, I do not find a meaningful way to define the base environment as ML.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I do not want to give the requirements-ML.txt, as I think there would be a larger start-up time. I could not find any useful documentation for it.&lt;/P&gt;&lt;P&gt;I tried something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  environments:
    - environment_key: default
      spec:
        environment_version: "5"
        base_environment: "ML"
        dependencies:
          - ... light dependencies&lt;/LI-CODE&gt;&lt;P&gt;but it does expect a yml file on base environment.&lt;/P&gt;&lt;P&gt;Does anybody has a tip?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Daniele&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 24 Jun 2026 09:48:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160377#M4632</guid>
      <dc:creator>Daniele-T</dc:creator>
      <dc:date>2026-06-24T09:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless ML</title>
      <link>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160384#M4633</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/241030"&gt;@Daniele-T&lt;/a&gt;,&lt;/P&gt;
&lt;P data-pm-slice="1 3 []"&gt;ML is the UI label for a Databricks-managed serverless base environment, but in Jobs/DAB you generally need to use the job environment model rather than the notebook picker directly. Databricks documents that the serverless base environment options include Standard, ML, AI, previous versions, Custom (YAML), and workspace environments, and that job tasks are configured through the job environment settings.&lt;/P&gt;
&lt;P&gt;If this is a notebook task, the simplest option may be to let the task use the notebook's own environment, because notebook tasks default to Notebook Environment unless you override them with a job-level environment. See &lt;A href="https://docs.databricks.com/aws/en/compute/serverless/dependencies#configure-the-environment-by-task-type" rel="noopener noreferrer nofollow" target="_blank"&gt;Configure the serverless environment&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;If you do want to define the environment in DAB, base_environment: "ML" is not the right value. For managed base environments, Databricks uses versioned identifiers, and Databricks-provided ML environments are versioned like databricks_ml_v5. The public environment APIs also describe Databricks-provided ML base environments as workspace-base-environments/databricks_ml_..., for example workspace-base-environments/databricks_ml_v5.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;So the configuration should look more like this:&lt;/P&gt;
&lt;PRE class="_1ibi0s3d1" dir="auto"&gt;&lt;CODE class="language-yaml"&gt;environments:
  - environment_key: default
    spec:
      base_environment: databricks_ml_v5
      dependencies:
        - ...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In that case, do not also set environment_version in the same spec.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;A second thing to check is workspace support. Databricks notes that selecting a managed base environment for jobs is in beta, and that if the workspace does not have that feature enabled, the job configuration shows an Environment version drop-down instead of Base environment. In those workspaces, the "Custom" option expects a YAML file, which matches what you are seeing. See &lt;A href="https://docs.databricks.com/aws/en/compute/serverless/dependencies#configure-environment-for-job-tasks" rel="noopener noreferrer nofollow" target="_blank"&gt;Configure the serverless environment&lt;/A&gt;.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;So...&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If this is a notebook task, consider configuring the notebook itself to use the ML base environment and let the job use Notebook Environment by default.&lt;/LI&gt;
&lt;LI&gt;If you want a job-level environment and your workspace supports managed base environments for jobs, use base_environment: databricks_ml_v5 plus your light dependencies.&lt;/LI&gt;
&lt;LI&gt;If your workspace does not support managed base environments for jobs yet, then the supported routes are either environment_version plus dependencies, or a Custom YAML-based environment.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2026 11:48:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160384#M4633</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-06-24T11:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless ML</title>
      <link>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160387#M4634</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/216690"&gt;@Ashwin_DSA&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your quick reply. My aim is to use it in a scheduled job (python script) deployed via the cli.&lt;/P&gt;&lt;P&gt;When I tried like you suggested:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  environments:
    - environment_key: default
      spec:
        base_environment: databricks_ml_v5&lt;/LI-CODE&gt;&lt;P&gt;with base_environment either quoted or unquoted -- I get this exception:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Error: cannot update job: Invalid base environment for 'default'. Only custom base environments (Workspace or Volume absolute paths ending with '.yaml' or '.yml') are currently supported.&lt;/LI-CODE&gt;&lt;P&gt;I'm currently deploying via databricks cli=1.2.1&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2026 12:20:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160387#M4634</guid>
      <dc:creator>Daniele-T</dc:creator>
      <dc:date>2026-06-24T12:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless ML</title>
      <link>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160397#M4635</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/241030"&gt;@Daniele-T&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for sharing the exact error. It confirms this is not a quoting or syntax issue on your end.&lt;/P&gt;
&lt;P&gt;This is more of a platform limitation, as far as I can tell. In the Jobs/DAB deployment path, base_environment is only accepted when it points to a custom environment spec file stored in Workspace files or a Unity Catalog Volume, for example, /Workspace/Shared/envs/ml-env.yml or /Volumes/my-catalog/my-schema/envs/ml-env.yml. Managed identifiers such as databricks_ml_v5 are rejected at the API layer regardless of the CLI version. I tested this in my own sandbox and reproduced the exact same error you hit, so this is consistent behaviour and not something specific to your setup. The serverless environment docs also note that if the base-environment preview is not enabled in a workspace, jobs expose environment_version rather than base_environment, and the Custom option expects a YAML file path.&lt;/P&gt;
&lt;P&gt;So, for a scheduled Python script job deployed via Bundles and the CLI, you have two supported paths. The simpler one is to drop base_environment entirely and use environment_version with a small dependency list directly in your databricks.yml:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;environments:
- environment_key: default
spec:
environment_version: "5"
dependencies:
- pandas==2.2.2
- scikit-learn==1.5.1&lt;/LI-CODE&gt;
&lt;P&gt;The second option, if you prefer to keep the environment spec separate from your bundle config, is to put the same spec in a YAML file, upload it to Workspace files or a UC Volume, and reference it via an absolute path:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;environments:
- environment_key: default
spec:
base_environment: /Workspace/Users/your-user@company.com/envs/ml-env.yml&lt;/LI-CODE&gt;
&lt;P&gt;One important caveat on the second path. It is not equivalent to getting the Databricks ML runtime. The YAML file resolves to the same environment_version + dependencies mechanism, so you still need to list your packages explicitly. There is no way today to reference databricks_ml_v5 through the YAML path either.&lt;/P&gt;
&lt;P&gt;On the startup time concern, it is worth knowing that serverless environments are cached, so after the first cold start, subsequent runs sharing the same dependency fingerprint will not reinstall. For a light dependency set, the overhead is smaller than it might seem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your intention is specifically to get the full Databricks ML runtime pre-loaded (MLflow, Delta, the full ML stack) without listing packages, that is not supported in the DAB/CLI deployment path as of now. You would need to add those packages explicitly to your dependencies list for now.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2026 13:57:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160397#M4635</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-06-24T13:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless ML</title>
      <link>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160405#M4636</link>
      <description>&lt;P&gt;&lt;SPAN&gt;You can create the environment in the DAB&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;environments:
        - environment_key: default
          spec:
            environment_version: "5"
            dependencies:
              - xgboost
              # Add&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;You can also create a file with packages and use it in base environment in the DAB&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;File with packages -&amp;nbsp;yaml &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="python"&gt;environment_version: '5'
dependencies:
  - xgboost&amp;gt;=2.0.0
  # Add libraries&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Use it in base environment in the DAB&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="python"&gt;environments:
  - environment_key: default
    spec:
      base_environment: /Workspace/mlp/env.yaml&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Jun 2026 14:23:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/serverless-ml/m-p/160405#M4636</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-06-24T14:23:09Z</dc:date>
    </item>
  </channel>
</rss>

