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

OSError in loading model #17

Open
ebergam opened this issue Jul 3, 2023 · 4 comments
Open

OSError in loading model #17

ebergam opened this issue Jul 3, 2023 · 4 comments

Comments

@ebergam
Copy link

ebergam commented Jul 3, 2023

Hi, thanks for the great library!

I have been trying to install tweetnlp on a python3.8 virtual environment, running on Ubuntu 20.04 64bit / Linux 5.4.0-139-generic.

Here's the error:

Traceback (most recent call last):
  File "tryloading.py", line 3, in <module>
    model = tweetnlp.load_model('sentiment')
  File "/home/ebergam/mlenv/lib/python3.8/site-packages/tweetnlp/loader.py", line 45, in load_model
    model_class = model_loader(model_name=model_name, max_length=max_length, *args, **kwargs)
  File "/home/ebergam/mlenv/lib/python3.8/site-packages/tweetnlp/text_classification/model.py", line 163, in __init__
    super().__init__(model_name, max_length=max_length, use_auth_token=use_auth_token)
  File "/home/ebergam/mlenv/lib/python3.8/site-packages/tweetnlp/text_classification/model.py", line 70, in __init__
    self.config, self.tokenizer, self.model = load_model(
  File "/home/ebergam/mlenv/lib/python3.8/site-packages/tweetnlp/util.py", line 81, in load_model
    config = AutoConfig.from_pretrained(model, **config_argument)
  File "/home/ebergam/mlenv/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 725, in from_pretrained
    config_dict, _ = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/ebergam/mlenv/lib/python3.8/site-packages/transformers/configuration_utils.py", line 561, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/ebergam/mlenv/lib/python3.8/site-packages/transformers/configuration_utils.py", line 648, in _get_config_dict
    raise EnvironmentError(
OSError: cardiffnlp/twitter-roberta-base-sentiment-latest does not appear to have a file named config.json.

Trying to install without virtualenvironment results in the same error.
Could be due to compatibility issues with huggingface-hub?

@jpripamonti
Copy link

Hi, do you have openssl-devel, gcc and a rust compiler installed?

@ebergam
Copy link
Author

ebergam commented Jul 14, 2023

Hi @jpripamonti , yes I do!

@ebergam
Copy link
Author

ebergam commented Oct 31, 2023

Any suggestions on how to solve?

@jpripamonti
Copy link

Are you still experiencing this issue?

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

2 participants