BertModel.from_pretrained is failing with "HTTP 407 Proxy Authentication Required" during model weight download when running behing a proxy
Author: cregouby
Pull request: no

## 🐛 Bug

<!-- Important information -->
Hello, 
I'am using transformers behind a proxy. `BertConfig.from_pretrained(..., proxies=proxies)` is working as expected, where `BertModel.from_pretrained(..., proxies=proxies)` gets a  
`OSError: Tunnel connection failed: 407 Proxy Authentication Required` . This could be the symptom of `proxies` parameter not being passed through the `request` package commands.

Model I am using (Bert, XLNet....): Bert, base, cased.

Language I am using the model on (English, Chinese....): English

The problem arise when using:
* [X] the official example scripts: (give details)
* [ ] my own modified scripts: (give details)

The tasks I am working on is:
* [X] an official GLUE/SQUaD task: (give the name)
* [ ] my own task or dataset: (give details)

## To Reproduce

Steps to reproduce the behavior:

1. put your endpoint behind a proxy
2. configure the proxies variable accordingly `proxies={"https": 'foo.bar:3128'}
3. run any script calling BertConfig.from_pretrained( ...,proxies=proxies)

<!-- If you have a code sample, error messages, stack traces, please provide it here as well. -->
Stack Trace : 
```
bash-3.2$ cd /Users/xxxx/_Data.science/NLP ; env PYTHONIOENCODING=UTF-8 PYTHONUNBUFFERED=1 /Users/xxxx/anaconda3/envs/farm-nlp/bin/python  /Users/xxxx/FARM/examples/embeddings_extraction.py 
10/29/2019 13:10:21 - INFO - transformers.file_utils -   PyTorch version 1.2.0 available.
10/29/2019 13:10:22 - INFO - transformers.modeling_xlnet -   Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex .
10/29/2019 13:10:22 - WARNING - farm.utils -   TensorboardX not installed. Required if you use tensorboard logger.
10/29/2019 13:10:22 - INFO - farm.utils -   device: cpu n_gpu: 0, distributed training: False, 16-bits training: False
10/29/2019 13:10:22 - INFO - farm.modeling.tokenization -   Loading tokenizer of type 'BertTokenizer'
10/29/2019 13:10:23 - INFO - transformers.file_utils -   https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-cased-vocab.txt not found in cache or force_download set to True, downloading to /var/folders/kg/qbqf751d6r13qchghq3vs15w0000gn/T/tmpwaag8tam 
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 231508/231508 [00:01<00:00, 154673.07B/s]
10/29/2019 13:10:25 - INFO - transformers.file_utils -   copying /var/folders/kg/qbqf751d6r13qchghq3vs15w0000gn/T/tmpwaag8tam to cache at /Users/xxxx/.cache/torch/transformers/26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084
10/29/2019 13:10:25 - INFO - transformers.file_utils -   creating metadata file for /Users/xxxx/.cache/torch/transformers/26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084
10/29/2019 13:10:25 - INFO - transformers.file_utils -   removing temp file /var/folders/kg/qbqf751d6r13qchghq3vs15w0000gn/T/tmpwaag8tam
10/29/2019 13:10:25 - INFO - transformers.tokenization_utils -   loading file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-cased-vocab.txt from cache at /Users/xxxx/.cache/torch/transformers/26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084
10/29/2019 13:10:26 - INFO - transformers.file_utils -   https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-cased-config.json not found in cache or force_download set to True, downloading to /var/folders/kg/qbqf751d6r13qchghq3vs15w0000gn/T/tmprex2n__s 
Traceback (most recent call last):
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/urllib3/connectionpool.py", line 662, in urlopen
    self._prepare_proxy(conn)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/urllib3/connectionpool.py", line 948, in _prepare_proxy
    conn.connect()
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/urllib3/connection.py", line 342, in connect
    self._tunnel()
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/http/client.py", line 919, in _tunnel
    message.strip()))
OSError: Tunnel connection failed: 407 Proxy Authentication Required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='s3.amazonaws.com', port=443): Max retries exceeded with url: /models.huggingface.co/bert/bert-base-cased-config.json (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required',)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/transformers/configuration_utils.py", line 133, in from_pretrained
    resolved_config_file = cached_path(config_file, cache_dir=cache_dir, force_download=force_download, proxies=proxies)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/transformers/file_utils.py", line 176, in cached_path
    return get_from_cache(url_or_filename, cache_dir=cache_dir, force_download=force_download, proxies=proxies)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/transformers/file_utils.py", line 302, in get_from_cache
    http_get(url, temp_file, proxies=proxies)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/transformers/file_utils.py", line 238, in http_get
    req = requests.get(url, stream=True, proxies=proxies)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/requests/adapters.py", line 510, in send
    raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='s3.amazonaws.com', port=443): Max retries exceeded with url: /models.huggingface.co/bert/bert-base-cased-config.json (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required',)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/xxxx/.vscode/extensions/ms-python.python-2019.9.34911/pythonFiles/ptvsd_launcher.py", line 43, in <module>
    main(ptvsdArgs)
  File "/Users/xxxx/.vscode/extensions/ms-python.python-2019.9.34911/pythonFiles/lib/python/ptvsd/__main__.py", line 432, in main
    run()
  File "/Users/xxxx/.vscode/extensions/ms-python.python-2019.9.34911/pythonFiles/lib/python/ptvsd/__main__.py", line 316, in run_file
    runpy.run_path(target, run_name='__main__')
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/xxxx/_Data.science/NLP/FARM/examples/embeddings_extraction.py", line 38, in <module>
    language_model = Bert.load(lang_model_conf)
  File "/Users/xxxx/_Data.science/NLP/FARM/farm/modeling/language_model.py", line 253, in load
    bert.model = BertModel.from_pretrained(pretrained_model_name_or_path)
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/transformers/modeling_utils.py", line 287, in from_pretrained
    **kwargs
  File "/Users/xxxx/anaconda3/envs/farm-nlp/lib/python3.6/site-packages/transformers/configuration_utils.py", line 145, in from_pretrained
    raise EnvironmentError(msg)
OSError: Couldn't reach server at 'https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-cased-config.json' to download pretrained model configuration file.
Terminated: 15
```
## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->
Model-weights.bin file download,  after silent, behind-the-scene correct proxy authentication : 
 
```
cd /Users/xxxxx/_Data.science/NLP ; env PYTHONIOENCODING=UTF-8 PYTHONUNBUFFERED=1 /Users/xxxxx/anaconda3/envs/farm-nlp/bin/python  /Users/xxxxx/FARM/examples/embeddings_extraction.py 
10/29/2019 15:28:48 - INFO - transformers.file_utils -   PyTorch version 1.2.0 available.
10/29/2019 15:28:48 - INFO - transformers.modeling_xlnet -   Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex .
10/29/2019 15:29:00 - WARNING - farm.utils -   TensorboardX not installed. Required if you use tensorboard logger.
10/29/2019 15:29:00 - INFO - farm.utils -   device: cpu n_gpu: 0, distributed training: False, 16-bits training: False
10/29/2019 15:29:00 - INFO - farm.modeling.tokenization -   Loading tokenizer of type 'BertTokenizer'
10/29/2019 15:29:00 - INFO - transformers.tokenization_utils -   loading file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-cased-vocab.txt from cache at /Users/xxxxx/.cache/torch/transformers/5e8a2b4893d13790ed4150ca1906be5f7a03d6c4ddf62296c383f6db42814db2.e13dbb970cb325137104fb2e5f36fe865f27746c6b526f6352861b1980eb80b1
10/29/2019 15:29:03 - INFO - transformers.file_utils -   https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-cased-config.json not found in cache or force_download set to True, downloading to /var/folders/kg/qbqf751d6r13qchghq3vs15w0000gn/T/tmpxtz55r5f 
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 313/313 [00:00<00:00, 88643.97B/s]
10/29/2019 15:29:04 - INFO - transformers.file_utils -   copying /var/folders/kg/qbqf751d6r13qchghq3vs15w0000gn/T/tmpxtz55r5f to cache at /Users/xxxxx/.cache/torch/transformers/b945b69218e98b3e2c95acf911789741307dec43c698d35fad11c1ae28bda352.d7a3af18ce3a2ab7c0f48f04dc8daff45ed9a3ed333b9e9a79d012a0dedf87a6
10/29/2019 15:29:04 - INFO - transformers.file_utils -   creating metadata file for /Users/xxxxx/.cache/torch/transformers/b945b69218e98b3e2c95acf911789741307dec43c698d35fad11c1ae28bda352.d7a3af18ce3a2ab7c0f48f04dc8daff45ed9a3ed333b9e9a79d012a0dedf87a6
10/29/2019 15:29:04 - INFO - transformers.file_utils -   removing temp file /var/folders/kg/qbqf751d6r13qchghq3vs15w0000gn/T/tmpxtz55r5f
10/29/2019 15:29:04 - INFO - transformers.configuration_utils -   loading configuration file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-cased-config.json from cache at /Users/xxxxx/.cache/torch/transformers/b945b69218e98b3e2c95acf911789741307dec43c698d35fad11c1ae28bda352.d7a3af18ce3a2ab7c0f48f04dc8daff45ed9a3ed333b9e9a79d012a0dedf87a6
10/29/2019 15:29:04 - INFO - transformers.configuration_utils -   Model config {
  "attention_probs_dropout_prob": 0.1,
  "finetuning_task": null,
  "hidden_act": "gelu",
  "hidden_dropout_prob": 0.1,
  "hidden_size": 768,
  "initializer_range": 0.02,
  "intermediate_size": 3072,
  "layer_norm_eps": 1e-12,
  "max_position_embeddings": 512,
  "num_attention_heads": 12,
  "num_hidden_layers": 12,
  "num_labels": 2,
  "output_attentions": false,
  "output_hidden_states": false,
  "output_past": true,
  "pruned_heads": {},
  "torchscript": false,
  "type_vocab_size": 2,
  "use_bfloat16": false,
  "vocab_size": 28996
}

10/29/2019 15:29:05 - INFO - transformers.file_utils -   https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-cased-pytorch_model.bin not found in cache or force_download set to True, downloading to /var/folders/kg/qbqf751d6r13qchghq3vs15w0000gn/T/tmpaz0jbgo4 
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 435779157/435779157 [04:19<00:00, 1677901.46B/s]
10/29/2019 15:33:25 - INFO - transformers.file_utils -   copying /var/folders/kg/qbqf751d6r13qchghq3vs15w0000gn/T/tmpaz0jbgo4 to cache at /Users/xxxxx/.cache/torch/transformers/35d8b9d36faaf46728a0192d82bf7d00137490cd6074e8500778afed552a67e5.3fadbea36527ae472139fe84cddaa65454d7429f12d543d80bfc3ad70de55ac2
10/29/2019 15:33:26 - INFO - transformers.file_utils -   creating metadata file for /Users/xxxxx/.cache/torch/transformers/35d8b9d36faaf46728a0192d82bf7d00137490cd6074e8500778afed552a67e5.3fadbea36527ae472139fe84cddaa65454d7429f12d543d80bfc3ad70de55ac2
10/29/2019 15:33:26 - INFO - transformers.file_utils -   removing temp file /var/folders/kg/qbqf751d6r13qchghq3vs15w0000gn/T/tmpaz0jbgo4
10/29/2019 15:33:26 - INFO - transformers.modeling_utils -   loading weights file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-cased-pytorch_model.bin from cache at /Users/xxxxx/.cache/torch/transformers/35d8b9d36faaf46728a0192d82bf7d00137490cd6074e8500778afed552a67e5.3fadbea36527ae472139fe84cddaa65454d7429f12d543d80bfc3ad70de55ac2
```
## Environment

* OS: MacOS
* Python version: 3.6
* PyTorch version: 1.2.0
* PyTorch Transformers version (or branch): 2.1.1
* Using GPU ? Yes
* Distributed of parallel setup ? No
* Any other relevant information: Proxy

## Additional context

<!-- Add any other context about the problem here. -->


Comments: