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.

"This model has one file that has been marked as unsafe." in HF Hub

See original GitHub issue

Hey!

After uploading a trained SetFit model with torch head to HF hub, the following message popped up in my repository. image

Additionally, if I press on the “pickle” tag next to the model_head.pkl in “Files and versions”, then I can see this. image

I am wondering whether this is a known issue or I done something wrong? Unfortunately, the repo is private, but if needed I can try to share it.

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
McPatatecommented, Dec 12, 2022

Hi @jegork, we run a static analysis on pickle files to gather information about specific opcodes, basically python imports.

It may be that the framework you used to serialise your data does something fancy with its pickle. Without the file I won’t be able to check what went wrong here. Could you run python3 -m pickletools <your_file> and send use the output here ? Hopefully it’s not too long.

1reaction
tomaarsencommented, Dec 13, 2022

joblib is currently hard to replace with safetensors, as self.model_head is either SetFitHead or LogisticRegression. I’m considering proposing an interface for SetFit heads which both heads must implement. This interface could then contain a save and a load method.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Download files from the Hub - Hugging Face
Download and store a file from the Hub. The hf_hub_download() function is the main function for downloading files from the Hub. It downloads...
Read more >
Reimagining our futures together: a new social contract for ...
While the expansion of education systems has created opportunities for many, vast numbers have been left with low-quality learning.
Read more >
Human Performance Improvement Handbook, Volume 1
This Human Performance Improvement Handbook is a reference for anyone working in the. Department of Energy (DOE) community who wants to learn more...
Read more >
Psychedelics - PMC - NCBI - NIH
Indeed, one of the most striking developments in this field has been the initiation ... is a general public perception that psychedelic drugs...
Read more >
Housing First in Canada: Supporting Communities to End ...
Edmonton, Alberta, is a model designed to address the over- ... Since that time, Housing First has been taken up and applied in...
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