<?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 Transfer files saved in filestore to either the workspace or to a repo in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/transfer-files-saved-in-filestore-to-either-the-workspace-or-to/m-p/30333#M21971</link>
    <description>&lt;P&gt;I built a machine learning model:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lr = LinearRegression()
lr.fit(X_train, y_train)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which I can save to the filestore by:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;filename = "/dbfs/FileStore/lr_model.pkl"
with open(filename, 'wb') as f:
    pickle.dump(lr, f)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Ideally, I wanted to save the model directly to a workspace or a repo so I tried:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;filename = "/Users/user/lr_model.pkl"
os.makedirs(os.path.dirname(filename), exist_ok=True)
with open(filename, 'wb') as f:
    pickle.dump(lr, f)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but it is not working because the file is not showing up in the workspace.&lt;/P&gt;&lt;P&gt;The only alternative I have now is to transfer the model from the filestore to the workspace or a repo, how do I go about that?&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jan 2022 21:49:44 GMT</pubDate>
    <dc:creator>MichaelO</dc:creator>
    <dc:date>2022-01-28T21:49:44Z</dc:date>
    <item>
      <title>Transfer files saved in filestore to either the workspace or to a repo</title>
      <link>https://community.databricks.com/t5/data-engineering/transfer-files-saved-in-filestore-to-either-the-workspace-or-to/m-p/30333#M21971</link>
      <description>&lt;P&gt;I built a machine learning model:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lr = LinearRegression()
lr.fit(X_train, y_train)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which I can save to the filestore by:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;filename = "/dbfs/FileStore/lr_model.pkl"
with open(filename, 'wb') as f:
    pickle.dump(lr, f)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Ideally, I wanted to save the model directly to a workspace or a repo so I tried:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;filename = "/Users/user/lr_model.pkl"
os.makedirs(os.path.dirname(filename), exist_ok=True)
with open(filename, 'wb') as f:
    pickle.dump(lr, f)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but it is not working because the file is not showing up in the workspace.&lt;/P&gt;&lt;P&gt;The only alternative I have now is to transfer the model from the filestore to the workspace or a repo, how do I go about that?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 21:49:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/transfer-files-saved-in-filestore-to-either-the-workspace-or-to/m-p/30333#M21971</guid>
      <dc:creator>MichaelO</dc:creator>
      <dc:date>2022-01-28T21:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files saved in filestore to either the workspace or to a repo</title>
      <link>https://community.databricks.com/t5/data-engineering/transfer-files-saved-in-filestore-to-either-the-workspace-or-to/m-p/30334#M21972</link>
      <description>&lt;P&gt;It's important to keep in mind that there are 2 file systems: &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The file system on the local machines that are part of the cluster&lt;/LI&gt;&lt;LI&gt;The distributed file system &lt;A href="https://docs.databricks.com/data/databricks-file-system.html" target="test_blank"&gt;https://docs.databricks.com/data/databricks-file-system.html&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;When you use python w/out spark such as with sklearn, its only on the driver and local is local on the driver.  That will go away when the cluster does.  &lt;/P&gt;&lt;P&gt;Try %sh ls / and %fs ls and see the differences&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jan 2022 00:30:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/transfer-files-saved-in-filestore-to-either-the-workspace-or-to/m-p/30334#M21972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-29T00:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files saved in filestore to either the workspace or to a repo</title>
      <link>https://community.databricks.com/t5/data-engineering/transfer-files-saved-in-filestore-to-either-the-workspace-or-to/m-p/30335#M21973</link>
      <description>&lt;P&gt;Workspace and Repo is not full available via dbfs as they have separate access rights. It is better to use MLFlow for your models as it is like git but for ML. I think using MLOps you can than put your model also to git.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 15:25:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/transfer-files-saved-in-filestore-to-either-the-workspace-or-to/m-p/30335#M21973</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-02-01T15:25:47Z</dc:date>
    </item>
  </channel>
</rss>

