<?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: MLlib load from UC Volume: IllegalArgumentException: Cannot access the UC Volume path... in Data Governance</title>
    <link>https://community.databricks.com/t5/data-governance/mllib-load-from-uc-volume-illegalargumentexception-cannot-access/m-p/53474#M1470</link>
    <description>&lt;P&gt;Actually, the above is no good for models with associated data. (You can only delete the tmpdir after your done using the model)&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2023 12:13:13 GMT</pubDate>
    <dc:creator>stiaangerber</dc:creator>
    <dc:date>2023-11-22T12:13:13Z</dc:date>
    <item>
      <title>MLlib load from UC Volume: IllegalArgumentException: Cannot access the UC Volume path...</title>
      <link>https://community.databricks.com/t5/data-governance/mllib-load-from-uc-volume-illegalargumentexception-cannot-access/m-p/53426#M1467</link>
      <description>&lt;P&gt;I'm trying to store MLlib instances in Unity Catalog Volumes. I think volumes are a great way to keep things organized.&lt;/P&gt;&lt;P&gt;I can save to a volume without any issues and I can access the data using spark.read and with plain python open(). However, when I try to load a saved MLlib instance using MLReader.load, I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IllegalArgumentException: Cannot access the UC Volume path from this location.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See the attached demo. I'm a metastore admin and owner of the volume.&lt;/P&gt;&lt;P&gt;Am I missing something? Is this not supported (yet)? Can I make it work somehow?&lt;/P&gt;&lt;P&gt;I've tested this on DBR 13.3 and 14.2, same thing. Any help will be much appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 06:41:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/mllib-load-from-uc-volume-illegalargumentexception-cannot-access/m-p/53426#M1467</guid>
      <dc:creator>stiaangerber</dc:creator>
      <dc:date>2023-11-22T06:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: MLlib load from UC Volume: IllegalArgumentException: Cannot access the UC Volume path...</title>
      <link>https://community.databricks.com/t5/data-governance/mllib-load-from-uc-volume-illegalargumentexception-cannot-access/m-p/53435#M1469</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;. For now, I implemented a workaround. For others with a similar issue, this works:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;def load_model(mlclass, uc_vol_path):
    try:
        tmpdir = f'/FileStore/{uuid.uuid4().hex}'
        dbutils.fs.cp(uc_vol_path, tmpdir, recurse=True)
        model = mlclass.load(tmpdir)
        return model
    finally:
        dbutils.fs.rm(tmpdir, recurse=True)

dct2 = load_model(DCT, '/Volumes/demo/default/vol/dct')&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Nov 2023 07:31:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/mllib-load-from-uc-volume-illegalargumentexception-cannot-access/m-p/53435#M1469</guid>
      <dc:creator>stiaangerber</dc:creator>
      <dc:date>2023-11-22T07:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: MLlib load from UC Volume: IllegalArgumentException: Cannot access the UC Volume path...</title>
      <link>https://community.databricks.com/t5/data-governance/mllib-load-from-uc-volume-illegalargumentexception-cannot-access/m-p/53474#M1470</link>
      <description>&lt;P&gt;Actually, the above is no good for models with associated data. (You can only delete the tmpdir after your done using the model)&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 12:13:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/mllib-load-from-uc-volume-illegalargumentexception-cannot-access/m-p/53474#M1470</guid>
      <dc:creator>stiaangerber</dc:creator>
      <dc:date>2023-11-22T12:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: MLlib load from UC Volume: IllegalArgumentException: Cannot access the UC Volume path...</title>
      <link>https://community.databricks.com/t5/data-governance/mllib-load-from-uc-volume-illegalargumentexception-cannot-access/m-p/53576#M1473</link>
      <description>&lt;P&gt;Just to supplement that if the ML model is saved and then loaded within the same execution, calling load() will not cause the mentioned exception. Copying the model directory from UC volume to&amp;nbsp;ephemeral storage attached to the driver node is also a work around (without the need to delete the tmpdir in DBFS after loading the model), but works in single node mode only.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 07:01:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/mllib-load-from-uc-volume-illegalargumentexception-cannot-access/m-p/53576#M1473</guid>
      <dc:creator>slimexy</dc:creator>
      <dc:date>2023-11-23T07:01:07Z</dc:date>
    </item>
  </channel>
</rss>

