-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hunflair2 model is not found #3547
Comments
@sg-wbi @WangXII Can one of you execute model = Classifier.load("hunflair2")
model.model_card["training_parameters"]["base_path"] = str(model.model_card["training_parameters"]["base_path"])
model.save("pytorch_model.bin") and commit the new model on the HF-Hub? |
Thanks @helpmefindaname, I've committed the new model according this to hf-hub! |
@WangXII thank you! @YashotharaS can you try out if it works now? You might have to delete the |
Thanks a lot @WangXII and @helpmefindaname I tried it, and it works fine now. Thanks again for your help :) |
I've just tried
I'd appreciate any help getting this working. |
I created a new conda environment with python==3.12.8 and only flair==0.14.0 installed via pip on openSUSE 15.5 and could not replicate the error. Did you try out installing flair in a new environment and could you replicate the error? If yes, could you provide some information about your Linux version? |
Well this is interesting, I'm running Python 3.12.8 on openSUSE Tumbleweed with a fresh environment. I did install this in a conda environment, but that shouldn't make a difference should it? |
Hmm, yeah, this should not make any difference. Can you try out whether loading the model via its HuggingfacePath works?
|
Ok, this is a bit weird. I tried it and it worked once, but then calling it again I got the error?? Attempt 1: >>> Classifier.load("hunflair/hunflair2-ner")
2024-12-12 19:01:30,166 SequenceTagger predicts: Dictionary with 21 tags: O, S-Chemical, B-Chemical, E-Chemical, I-Chemical, S-Gene, B-Gene, E-Gene, I-Gene, S-Disease, B-Disease, E-Disease, I-Disease, S-Species, B-Species, E-Species, I-Species, S-CellLine, B-CellLine, E-CellLine, I-CellLine Attempt 2: >>> Classifier.load("hunflair/hunflair2-ner")
2024-12-12 19:02:10,892 --------------------------------------------------------------------------------
2024-12-12 19:02:10,892 ERROR: The key 'hunflair/hunflair2-ner' was neither found on the ModelHub nor is this a valid path to a file on your system!
2024-12-12 19:02:10,892 -> Please check https://huggingface.co/models?filter=flair for all available models.
2024-12-12 19:02:10,892 -> Alternatively, point to a model file on your local drive.
2024-12-12 19:02:10,892 -------------------------------------------------------------------------------- This is without restarting the process in between. |
Indeed, sounds weird. I guess this is also why the default |
How does this look?
|
This looks fine-ish, so the model should be cached. If you are restarting the process, does it work again? I would link this to @helpmefindaname , not sure whether something goes wrong internally |
If I restart the process, it seems to work exactly once then fail again. I guess there's some state that's being a bit funky in the background? |
Yeah, I guess so. Let's see whether @helpmefindaname knows something about this |
Dear all,
I'm encountering the error "ValueError: Could not find any model with name 'hunflair2'" when trying to run the code tagger = Classifier.load("hunflair2") as mentioned on the GitHub page. I'm using Flair version 0.14.0, and while hunflair v1 works without issues, the code is unable to find hunflair2. Could you please help me resolve this issue?
The text was updated successfully, but these errors were encountered: