[英]Azure - How to dowload a file from Azure Databricks Filestore?
I trained a model in using Keras on Azure databricks (notebook).我在 Azure 数据块(笔记本)上使用 Keras 训练了一个模型。 I would like to be able to save this model on an .h5 or .pkl file and download it to my local machine.我希望能够将此模型保存在 .h5 或 .pkl 文件中并将其下载到我的本地机器上。
When I train the model locally I use the following to save the file inside a directory called models, but obviously this path does not exist on Azure.当我在本地训练模型时,我使用以下命令将文件保存在名为 models 的目录中,但显然 Azure 上不存在此路径。
model.save('models/cnn_w2v.h5')
I am new to Azure so any help will be greatly appreciated我是 Azure 的新手,因此将不胜感激任何帮助
Correct me if I'm wrong, you are executing this line on your DataBricks notebook:如果我错了,请纠正我,您正在 DataBricks 笔记本上执行此行:
model.save('models/cnn_w2v.h5')
Right?对?
So if that's the case, your model is saved, but it is stored on the Azure instance that is running behind.因此,如果是这种情况,您的模型将被保存,但它存储在后面运行的 Azure 实例上。
You need to upload this file to Azure Storage (just add code to the notebook that does that).您需要将此文件上传到 Azure 存储(只需将代码添加到执行此操作的笔记本中)。
Later, you will be able to download it to your local machine.稍后,您将能够将其下载到本地计算机。
I have found the answer to my question above here: how to download files from azure databricks file store我在这里找到了上面问题的答案: 如何从 azure databricks 文件存储下载文件
Files stored in /FileStore are accessible in your web browser at https://.cloud.databricks.com/files/.存储在 /FileStore 中的文件可在您的 Web 浏览器中访问,网址为 https://.cloud.databricks.com/files/。 For example, the file you stored in /FileStore/my-stuff/my-file.txt is accessible at:例如,您存储在 /FileStore/my-stuff/my-file.txt 中的文件可在以下位置访问:
"https://.cloud.databricks.com/files/my-stuff/my-file.txt" “https://.cloud.databricks.com/files/my-stuff/my-file.txt”
Note If you are on Community Edition you may need to replace https://community.cloud.databricks.com/files/my-stuff/my-file.txt with https://community.cloud.databricks.com/files/my-stuff/my-file.txt?o=######where the number after o= is the same as in your Community Edition URL.注意如果您使用的是社区版,则可能需要将https://community.cloud.databricks.com/files/my-stuff/my-file.txt替换为https://community.cloud.databricks.com/files/ my-stuff/my-file.txt?o=######其中o= 之后的数字与您的社区版 URL 中的数字相同。
Refer: https://docs.databricks.com/user-guide/advanced/filestore.html参考: https : //docs.databricks.com/user-guide/advanced/filestore.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.