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

requests.exceptions.ConnectionError #1

Open
amazingtanm opened this issue Mar 28, 2024 · 4 comments
Open

requests.exceptions.ConnectionError #1

amazingtanm opened this issue Mar 28, 2024 · 4 comments

Comments

@amazingtanm
Copy link

When I run the command
bash scripts/embeddings.sh --openreview
Report an error
requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/sentence-transformers/stsb-roberta-base-v2 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f3c18433490>: Failed to establish a new connection: [Errno 110] Connection timed out'))"), '(Request ID: c0fb11ea-0999-44d4-a955-5af6026ff738)')
I would like to ask the author how to solve this error

@amazingtanm
Copy link
Author

Do I need to download stsb-roberta-base-v2 locally?

@AlphaPav
Copy link
Member

thanks for the question! It seems to be a network connection issue. The code will automatically download stsb-roberta-base-v2 from huggingface: https://huggingface.co/sentence-transformers

@amazingtanm
Copy link
Author

thanks for the question! It seems to be a network connection issue. The code will automatically download stsb-roberta-base-v2 from huggingface: https://huggingface.co/sentence-transformers

Thank you so much
I downloaded the stsb-roberta-base-v2 model locally and modified the embedding.sh file
python pre_comp_emb.py --dataset openreview --model_name_or_path 'DP/aug-pe-main/stsb-roberta-base-v2'
But this time a new error was reported:
File "/usr/local/miniconda3/envs/augpe/lib/python3.9/site-packages/sentence_transformers/SentenceTransformer.py", line 77, in init
raise ValueError("Path {} not found".format(model_name_or_path))
ValueError: Path DP/aug-pe-main/stsb-roberta-base-v2 not found
I don't know the reason and would like to ask you to get the answer.

@AlphaPav
Copy link
Member

Is the relative path "DP/aug-pe-main/stsb-roberta-base-v2" correct for pre_comp_emb.py? Alternatively, could you try to specify the model's absolute path?

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