Closed KevinEsh closed 8 months ago
I really don't where this issues come, some people have it and other do not. Maybe try to update transformers version
I'm using the latest sentence-transformers version 2.5.1 could you please share me the package's versions of your entire environment?
torch = ">=2.0.0" transformers = "^4.38.2" huggingface-hub = "^0.21.4" flair = "^0.13.1"
I've identified the issue. Seems like HFValidationError is not been caught properly. I have corrected the mistake in a new branch but I don't have permissions to upload it. Change is minimal.
@KevinEsh I believe that #42 should solve this issue also, I assume that your solution is similar?
Hi @tomaarsen, Thanks for the suggestion. Yes, this was my problem although my solution was a little different.
[...]
from huggingface_hub.utils import HfHubHTTPError, HFValidationError
def _from_pretrained(
token=token,
local_files_only=local_files_only,
)
[...]
except (HfHubHTTPError, HFValidationError):
continue
In this way I make sure to catch the right Exceptions without missing hidden bugs. May I have an ETA to when this fix will be released on v0.1.4? This change is important for my team otherwise we'll have to modify the inner source code on every dev environment of every team member.
Thanks in advance!
PS: Love your content, keep the good work.
PATH = ".\finetuned_999" model = GLiNER.from_pretrained(PATH,local_files_only = True) model.eval()
this worked for me
Hi guys, You did an incredible job with this model. It's incredible and hope to see further improvements over time. However, I noticed some issues which I'll document sooner.
First of all, How to load a model locally? I'm working on a Docker Dev container which I run every time I want to do any NER task. So downloading the GLiNER weights every time is not optimal. This is what I'm doing right now:
Then when loading it as below, it raises an HTTPError
Seems like it's looking it up first on the web before looking in the path. So I wonder If I'm doing it in the proper way as there is no to much documentation out there. Is it possible to download the model and then load it locally?
Also this doesn't work:
Weights are stored locally as expected
GLiNER version = '0.1.3'