Skip to content
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

HuggingFace Validation Error #11

Open
danoprica opened this issue Nov 27, 2022 · 1 comment
Open

HuggingFace Validation Error #11

danoprica opened this issue Nov 27, 2022 · 1 comment

Comments

@danoprica
Copy link

Hello, I've been using BookNLP on Windows on my laptop. Today, when I tried to install it on another computer of mine, I got this error:

using device cpu
{'pipeline': 'entity,quote,supersense,event,coref', 'model': 'small'}
Traceback (most recent call last):
File "c:\Users\Dan\Dizertatie\test.py", line 8, in
booknlp=BookNLP("en", model_params)
File "C:\Users\Dan\AppData\Local\Programs\Python\Python310\lib\site-packages\booknlp\booknlp.py", line 14, in init
self.booknlp=EnglishBookNLP(model_params)
File "C:\Users\Dan\AppData\Local\Programs\Python\Python310\lib\site-packages\booknlp\english\english_booknlp.py", line 148, in init
self.entityTagger=LitBankEntityTagger(self.entityPath, tagsetPath)
File "C:\Users\Dan\AppData\Local\Programs\Python\Python310\lib\site-packages\booknlp\english\entity_tagger.py", line 19, in init
self.model = Tagger(freeze_bert=False, base_model=base_model, tagset_flat={"EVENT":1, "O":1}, supersense_tagset=self.supersense_tagset, tagset=self.tagset, device=device)
File "C:\Users\Dan\AppData\Local\Programs\Python\Python310\lib\site-packages\booknlp\english\tagger.py", line 58, in init
self.tokenizer = BertTokenizer.from_pretrained(modelName, do_lower_case=False, do_basic_tokenize=False)
File "C:\Users\Dan\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\tokenization_utils_base.py", line 1736, in from_pretrained
resolved_vocab_files[file_id] = cached_file(
File "C:\Users\Dan\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\hub.py", line 409, in cached_file
resolved_file = hf_hub_download(
File "C:\Users\Dan\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
validate_repo_id(arg_value)
File "C:\Users\Dan\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\utils_validators.py", line 172, in validate_repo_id
raise HFValidationError(
huggingface_hub.utils.validators.HFValidationError: Repo id must use alphanumeric chars or '-', '', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'C:\Users\Dan\booknlps\entities_google/bert_uncased_L-4_H-256_A-4'.

Any ideas?

@danoprica
Copy link
Author

i fixed it by downgrading the transformers library from 4.24.0 to 4.19.2 and the huggingface-hub library from 0.11.0 to 0.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant