-
Notifications
You must be signed in to change notification settings - Fork 25.7k
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
Couldn't reach server GPT-2 #4513
Comments
I also created this stack overflow question here: https://stackoverflow.com/questions/61944526/oserror-couldnt-reach-server-gpt2-config-json |
It is odd that it works from CLI but not from within your script. That does not make a lot of sense. Can you try this? scorer = LMScorer.from_pretrained("gpt2", force_download=True) |
Thanks, Bram. I tried that code but I get the same error. I believe it has something to do with 1) apache2 or ubuntu config and what I've allowed it to connect to or 2) some download I am missing because it has worked previously. I tried downloading the gpt2 config, model.bin, and vocab file but I would either get the same error as above or get this error:
|
If you are sure that you have manually downloaded all files to the correct folder, you can disable the online look-up. This is useful if you have, as you say, network restrictions. scorer = LMScorer.from_pretrained("gpt2", local_files_only=True) |
Still nothing yet.
Is there anything I am missing? |
This is likely to be a problem with the LMScorer rather than with this transformers library. Looking t the source code, it does not pass they keyword arguments down to model init. I suggest that you make an issue over at the library that you used. https://github.com/simonepri/lm-scorer/blob/master/lm_scorer/models/gpt2.py |
Still nothing. I believe it is my apache2 configurations for access but I haven't figure out how yet. |
Closing this. See continuation here: simonepri/lm-scorer#8 (comment) |
I have tried to use gpt2 using ubuntu and vagrant. This is the code:
import torch from lm_scorer.models.auto import AutoLMScorer as LMScorer scorer = LMScorer.from_pretrained("gpt2")
I get this error:
It has worked before but I had to reset my virtual environment and now it no longer worked. I think it has something to do with apache configurations.
Also, It works in the terminal but not in python script.
The text was updated successfully, but these errors were encountered: