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

cant download model "bert-fa-zwnj-base" from huggingface #24

Open
lovecode2020 opened this issue Apr 11, 2022 · 0 comments
Open

cant download model "bert-fa-zwnj-base" from huggingface #24

lovecode2020 opened this issue Apr 11, 2022 · 0 comments

Comments

@lovecode2020
Copy link

lovecode2020 commented Apr 11, 2022

`

from transformers import AutoConfig, AutoTokenizer, AutoModel,

# v3.0
model_name_or_path = "HooshvareLab/bert-fa-zwnj-base"
config = AutoConfig.from_pretrained(model_name_or_path)
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)

`
#---------------------------------------------------------------------------
#OSError Traceback (most recent call last)
~/Apps/anaconda3/envs/ml/lib/python3.9/site-packages/transformers/configuration_utils.py in get_config_dict(cls, pretrained_model_name_or_path, **kwargs)
358 if resolved_config_file is None:
--> 359 raise EnvironmentError
360 config_dict = cls._dict_from_json_file(resolved_config_file)

OSError:

During handling of the above exception, another exception occurred:

OSError Traceback (most recent call last)
/tmp/ipykernel_708815/1307679045.py in
3 # v3.0
4 model_name_or_path = "HooshvareLab/bert-fa-zwnj-base"
----> 5 config = AutoConfig.from_pretrained(model_name_or_path)
6 tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)

~/Apps/anaconda3/envs/ml/lib/python3.9/site-packages/transformers/configuration_auto.py in from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
308 {'foo': False}
309 """
--> 310 config_dict, _ = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
311
312 if "model_type" in config_dict:

~/Apps/anaconda3/envs/ml/lib/python3.9/site-packages/transformers/configuration_utils.py in get_config_dict(cls, pretrained_model_name_or_path, **kwargs)
366 f"- or '{pretrained_model_name_or_path}' is the correct path to a directory containing a {CONFIG_NAME} file\n\n"
367 )
--> 368 raise EnvironmentError(msg)
369
370 except json.JSONDecodeError:

OSError: Can't load config for 'HooshvareLab/bert-fa-zwnj-base'. Make sure that:

  • 'HooshvareLab/bert-fa-zwnj-base' is a correct model identifier listed on 'https://huggingface.co/models'

  • or 'HooshvareLab/bert-fa-zwnj-base' is the correct path to a directory containing a config.json file

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