question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[model weights caching] model upload doesn't check model weights hash

See original GitHub issue

I have re-uploaded model weights via transformers-cli upload and noticed that when I tried to use it - it didn’t get re-downloaded, and instead continued to use the cached version.

The problem seems to come from the fact that the other uploaded files haven’t changed, only the model weights.

I double checked that the md5sum of the old weights file is different from the new one.

I re-uploaded the whole folder using:

transformers-cli upload fsmt-wmt19-en-de

If I hunt down the cached files (not an easy task), and delete those, it does re-download the new version.

If I diff the cached weights file and the updated cache file, which gets re-downloaded if I move away the original cached file, they aren’t the same.:

Binary files 
before/d97352d9f1f96ee4c6055f203812035b4597258a837db1f4f0803a2932cc3071.53ce64c7097bfcd85418af04a21b4a897c78c8440de3af078e577727ad9de3a0 
and  
 after/d97352d9f1f96ee4c6055f203812035b4597258a837db1f4f0803a2932cc3071.53ce64c7097bfcd85418af04a21b4a897c78c8440de3af078e577727ad9de3a0 
differ

Could we please include the model weights file in the hash calculation?

Thank you.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
julien-ccommented, Sep 8, 2020

No, just S3 links!

1reaction
LysandreJikcommented, Sep 3, 2020

This is due to the CDN caching files, with a 24 hour delay. After 24 hours it should download your file, but if you want it now you can use the use_cdn flag and set it to False. You can see the documentation for this here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Model sharing and uploading - Hugging Face
Model sharing and uploading. In this page, we will show you how to share a model you have trained or fine-tuned on new...
Read more >
How to Save and Load Your Keras Deep Learning Model
The weights are saved directly from the model using the save_weights() function and later loaded using the symmetrical load_weights() function.
Read more >
Error when I try and cache Keras - Using Streamlit
Hi, I am trying to cache a Keras model and keep getting an error. ... model.load_weights('models/keras/weights.h5') return model ...
Read more >
Saving and Loading · spaCy Usage Documentation
doc1 = nlp("Hello world") doc2 = nlp("This is a test") doc1_data ... model weights or terminology lists – you can take advantage of...
Read more >
torch.hub — PyTorch 1.13 documentation
Pytorch Hub supports publishing pre-trained models(model definitions and pre-trained weights) to a github repository by adding a simple hubconf.py file;.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found