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

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!