简体   繁体   中英

Azure - How to dowload a file from Azure Databricks Filestore?

I trained a model in using Keras on Azure databricks (notebook). I would like to be able to save this model on an .h5 or .pkl file and download it to my local machine.

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.

model.save('models/cnn_w2v.h5')

I am new to Azure so any help will be greatly appreciated

Correct me if I'm wrong, you are executing this line on your DataBricks notebook:

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.

You need to upload this file to Azure Storage (just add code to the notebook that does that).

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

Files stored in /FileStore are accessible in your web browser at https://.cloud.databricks.com/files/. For example, the file you stored in /FileStore/my-stuff/my-file.txt is accessible at:

"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.

Refer: https://docs.databricks.com/user-guide/advanced/filestore.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM