cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
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_Fatma
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.

Hi @Kaniz_Fatma, 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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group