<?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: How to use Databricks secrets on MLFlow conda dependencies? in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/how-to-use-databricks-secrets-on-mlflow-conda-dependencies/m-p/156692#M4618</link>
    <description>&lt;P&gt;Did someone solve this? I'm currently forced to download some libraries using an artifactory pypi mirror. However, I wouldn't want to have my secrets pasted in the conda.yaml file as plain text.&lt;/P&gt;</description>
    <pubDate>Tue, 12 May 2026 15:47:32 GMT</pubDate>
    <dc:creator>Froffri</dc:creator>
    <dc:date>2026-05-12T15:47:32Z</dc:date>
    <item>
      <title>How to use Databricks secrets on MLFlow conda dependencies?</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-use-databricks-secrets-on-mlflow-conda-dependencies/m-p/58434#M2911</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Do you know if it's correct to use the plain user and token for installing a custom dependency (an internal python package) in a mlflow registered model? (it's the only way I get it working because if not it can't install the dependency) It works, but I don't know if this is something dangerous or insecure because I usually use the databricks secrets like this:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%pip install git+https://{dbutils.secrets.get(scope="&amp;lt;my-scope&amp;gt;", key="&amp;lt;user&amp;gt;")}:{dbutils.secrets.get(scope="&amp;lt;scope&amp;gt;", key="&amp;lt;scope&amp;gt;")}@dev.azure.com/&amp;lt;company&amp;gt;/&amp;lt;git-package-project&amp;gt;@&amp;lt;version&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;so my conda.yaml for the mlflow is with the plain values:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;channels:
- conda-forge
dependencies:
- python=&amp;lt;version&amp;gt;
- pip==22.3.1
- pip:
- mlflow==2.8.1
- git+https://&amp;lt;plain value of the user&amp;gt;:&amp;lt;plain value of the token&amp;gt;@dev.azure.com/&amp;lt;company&amp;gt;/&amp;lt;git-package-project&amp;gt;@&amp;lt;version&amp;gt;
name: mlflow-env&lt;/LI-CODE&gt;&lt;P&gt;note that in my yaml the values are the output of `dbutils.secrets.get(scope="&amp;lt;my-scope&amp;gt;", key="&amp;lt;user&amp;gt;")` and the other one&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2024 16:55:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-use-databricks-secrets-on-mlflow-conda-dependencies/m-p/58434#M2911</guid>
      <dc:creator>sergio-calderon</dc:creator>
      <dc:date>2024-01-25T16:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Databricks secrets on MLFlow conda dependencies?</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-use-databricks-secrets-on-mlflow-conda-dependencies/m-p/58528#M2913</link>
      <description>&lt;P&gt;&lt;SPAN&gt;While it's possible to use plain user and token for installing a custom dependency in an MLflow registered model, it's not recommended due to security reasons. Instead, Databricks suggests using Databricks secrets to securely store and reference secrets in notebooks or jobs. However, Databricks secrets are not directly accessible in the&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;conda.yaml&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;file, so a workaround such as creating a script to generate the&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;conda.yaml&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;file using the secrets might be necessary. Here's an example of a Python script that can be used to generate the&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;conda.yaml&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;file:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="c-mrkdwn__pre" data-stringify-type="pre"&gt;python&lt;BR /&gt;user = dbutils.secrets.get(scope="&amp;lt;my-scope&amp;gt;", key="&amp;lt;user&amp;gt;")&lt;BR /&gt;token = dbutils.secrets.get(scope="&amp;lt;scope&amp;gt;", key="&amp;lt;scope&amp;gt;")&lt;BR /&gt;company = "&amp;lt;company&amp;gt;"&lt;BR /&gt;git_package_project = "&amp;lt;git-package-project&amp;gt;"&lt;BR /&gt;version = "&amp;lt;version&amp;gt;"&lt;BR /&gt;&lt;BR /&gt;conda_yaml_content = f"""&lt;BR /&gt;channels:&lt;BR /&gt;- conda-forge&lt;BR /&gt;dependencies:&lt;BR /&gt;- python=&amp;lt;version&amp;gt;&lt;BR /&gt;- pip==22.3.1&lt;BR /&gt;- pip:&lt;BR /&gt;- mlflow==2.8.1&lt;BR /&gt;- git+https://{user}:{token}@dev.azure.com/{company}/{git_package_project}@{version}&lt;BR /&gt;name: mlflow-env&lt;BR /&gt;"""&lt;BR /&gt;&lt;BR /&gt;with open("conda.yaml", "w") as file:&lt;BR /&gt; &amp;nbsp;&lt;WBR /&gt; &amp;nbsp;&lt;WBR /&gt;file.write(conda_yaml_content)&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Replace the placeholders with your actual values.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2024 14:29:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-use-databricks-secrets-on-mlflow-conda-dependencies/m-p/58528#M2913</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-01-27T14:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Databricks secrets on MLFlow conda dependencies?</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-use-databricks-secrets-on-mlflow-conda-dependencies/m-p/59454#M2964</link>
      <description>&lt;P&gt;Thank you very much for the response but using that way is the same as the plain text approach, right? I mean, you are writing it from a Notebook and that's what I've done, but if you open the .yaml file the values are there with plain text.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 11:26:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-use-databricks-secrets-on-mlflow-conda-dependencies/m-p/59454#M2964</guid>
      <dc:creator>sergio-calderon</dc:creator>
      <dc:date>2024-02-06T11:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Databricks secrets on MLFlow conda dependencies?</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-use-databricks-secrets-on-mlflow-conda-dependencies/m-p/156692#M4618</link>
      <description>&lt;P&gt;Did someone solve this? I'm currently forced to download some libraries using an artifactory pypi mirror. However, I wouldn't want to have my secrets pasted in the conda.yaml file as plain text.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2026 15:47:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-use-databricks-secrets-on-mlflow-conda-dependencies/m-p/156692#M4618</guid>
      <dc:creator>Froffri</dc:creator>
      <dc:date>2026-05-12T15:47:32Z</dc:date>
    </item>
  </channel>
</rss>

