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

predict from sample_notebook producing error #281

Open
rpoli40 opened this issue Jan 28, 2021 · 0 comments
Open

predict from sample_notebook producing error #281

rpoli40 opened this issue Jan 28, 2021 · 0 comments

Comments

@rpoli40
Copy link

rpoli40 commented Jan 28, 2021

When running the code getting the following error:
Traceback (most recent call last):
File "fb_predict_multilabel.py", line 102, in
multi_label=True, model_type='bert', do_lower_case=False)
File "/home/bert/pvenv/lib64/python3.6/site-packages/fast_bert/prediction.py", line 40, in init
self.model_path, use_fast=use_fast_tokenizer
File "/home/bert/pvenv/lib64/python3.6/site-packages/transformers/tokenization_auto.py", line 206, in from_pretrained
config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
File "/home/bert/pvenv/lib64/python3.6/site-packages/transformers/configuration_auto.py", line 203, in from_pretrained
config_dict, _ = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/home/bert/pvenv/lib64/python3.6/site-packages/transformers/configuration_utils.py", line 225, in get_config_dict
elif os.path.isfile(pretrained_model_name_or_path) or is_remote_url(pretrained_model_name_or_path):
File "/home/bert/pvenv/lib64/python3.6/site-packages/transformers/file_utils.py", line 447, in is_remote_url
parsed = urlparse(url_or_filename)
File "/usr/lib64/python3.6/urllib/parse.py", line 367, in urlparse
url, scheme, _coerce_result = _coerce_args(url, scheme)
File "/usr/lib64/python3.6/urllib/parse.py", line 123, in _coerce_args
return _decode_args(args) + (_encode_result,)
File "/usr/lib64/python3.6/urllib/parse.py", line 107, in _decode_args
return tuple(x.decode(encoding, errors) if x else '' for x in args)
File "/usr/lib64/python3.6/urllib/parse.py", line 107, in
return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: 'PosixPath' object has no attribute 'decode'

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