cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Machine Learning
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to download a pytorch model created via notebook and saved in a folder ?

Abdurrahman
New Contributor II

I have created a pytorch model using databricks notebooks and saved it in a folder in workspace. MLFlow is not used.

When I try to download the files from the folder it exceeds the download limit. Is there a way to download the model locally into my system?

2 REPLIES 2

Kaniz
Community Manager
Community Manager

Hi @Abdurrahman

  • If you know the direct URL of the pretrained PyTorch model, you can use wget or a Python script to download it directly to your local system.
  • For example, if you want to download the pretrained ResNet-18 model, you can use the following command in your terminal:
    wget -c https://download.pytorch.org/models/resnet18-5c106cde.pth
  • Replace the URL with the specific model youโ€™re interested in.
  • Alternatively, you can write a Python script to download the model using the requests library.

Abdurrahman
New Contributor II

Hi @Kaniz, Thanks for your response.

Unfortunately, I don't have the the model deployed anywhere. I have access to the databricks cloud UI, where I use notebooks for experimentation and have create and saved my model through the notebook, in a specified folder location in my workspace. And when I try to downlaod the files manually by exporting the files (for example in the screenshot below pytorch_model.bin) locally it gives limit exceeded error. Below are the screenshots for your reference. 
I tried running your suggested command in the notebook with the path as the path to the folder where this model is stored (/Workspace/Shared/Data/Model/best_model/output/). It says schema missing

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.