get_from_cache in file_utils.py gobbles up error in making url requests
See original GitHub issueš Bug
No information from the package on SSL error encountered, making it difficult to troubleshoot or figure out a workaround
Information
When trying to do:
TFAutoModelWithLMHead.from_pretrained("t5-small")
Get an error:
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
The above is a result of an SSL error encountered when trying to fetch the model, however, since the exception handling isnāt proper within file_utils.py I donāt come to know of it, unless I debug.
Model I am using (Bert, XLNet ā¦): T5
Language I am using the model on (English, Chinese ā¦): English
The problem arises when using:
- [ x] the official example scripts: (give details below)
- my own modified scripts: (give details below)
https://huggingface.co/transformers/usage.html#summarization
The tasks I am working on is:
- an official GLUE/SQUaD task: (give the name)
- [ x] my own task or dataset: (give details below) Just getting familiar with transformers for summarization
To reproduce
You need a machine with an expired certificate for proxy etc.
Steps to reproduce the behavior:
- See information above
Expected behavior
If there has been an issue in fetching the pre-trained model from s3 bucket etc. I should get an error to that effect.
Environment info
transformers
version: 2.10.0- Platform: Windows 10
- Python version: 3.7.4
- PyTorch version (GPU?): NA
- Tensorflow version (GPU?): 2.0.0 (Yes)
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Yes I want to track and solve that issue in the next couple of weeks.
Hi @julien-c , Iām having the same issue as @stadelmanma (Iām behind a coporate proxy as well)
I even tried setting the proxy in
proxies
:config = config_class.from_pretrained(args.config_name, proxies={'http://': '<HOST>:<PORT>'})
But same thing happens. Maybe thereās a workaround for this?
Many thanks!