Update file_utils.py
Author: yangheng95
Pull request: yes

# What does this PR do?

Fixes # (issue)
This PR is a simple suggestion to replace the ValueError with ConnectionError at https://github.com/huggingface/transformers/blob/1991da07f7fe1f2dca0bb49e964aa971beca5746/src/transformers/file_utils.py#L1715. 
The main reason for this modification is that when the downstream task tries to track or handle the exception, it gives an exception catch block improper signal to check the value error instead of connection error. e.g., if the connection error is detected correctly, we can retry in the exception handler. 

## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/master/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/master/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- albert, bert, xlm: @LysandreJik
- blenderbot, bart, marian, pegasus, encoderdecoder,  t5: @patrickvonplaten, @patil-suraj
- longformer, reformer, transfoxl, xlnet: @patrickvonplaten
- fsmt: @stas00
- funnel: @sgugger
- gpt2: @patrickvonplaten, @LysandreJik
- rag: @patrickvonplaten, @lhoestq
- tensorflow: @LysandreJik

Library:

- benchmarks: @patrickvonplaten
- deepspeed: @stas00
- ray/raytune: @richardliaw, @amogkam
- text generation: @patrickvonplaten
- tokenizers: @n1t0, @LysandreJik
- trainer: @sgugger
- pipelines: @LysandreJik

Documentation: @sgugger

HF projects:

- datasets: [different repo](https://github.com/huggingface/datasets)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Examples:

- maintained examples (not research project or legacy): @sgugger, @patil-suraj
- research_projects/bert-loses-patience: @JetRunner
- research_projects/distillation: @VictorSanh

 -->


Comments:
Hi, 
sorry for late reply, I tried to fix the test, can you review or amend it (if necessary)?

@LysandreJik 

This looks good, thank you @yangheng95! Pinging @sgugger for confirmation regarding if this is too much of a breaking change or not.

I personally think this is too much of a breaking change, some users rely on specific exceptions being raised in their code (we recently saw this with a change of exception in `huggingface_hub` causing problems in the AllenNLP codebase) and this is one of the core functions of the library.

Hey @yangheng95, after discussing a bit with @sgugger we agree that this is, unfortunately, a breaking change that will be tough to merge (as he mentions above).

You give a good example in your PR description as if you catch `ValueError` and you would rather catch `ConnectionError`s, then others are bound to do the same and be surprised when their try/catch mechanism fail. We could switch that in version 5, but how to setup a deprecation cycle for an error?

Hi, Thanks for your discussion about this PR @sgugger, @LysandreJik . 
I understand it is a breaking change and recognize steadblity is important. As I said it is a suggestion, transformers helps me a lot.
Cheers!

Thanks for your understanding, sorry not to have thought about this before asking you to fix the tests; really looking forward to your future contributions.

Just for an example about exception handling:
```
Catch exception: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on. in <function train4apc at 0x7f8bfbfd9790>, retry soon if you dont terminate the process...
```
Sometimes, for a kind of complex code structure, it is better to catch the ConnectionError so that the code can try to connect again (ubiquitous situation in China, e.g., up to 10% connection failure rate in some area). But a ValueError usually means an internal error in modeling and is much dangerous that can not simply retry. 
Since the early version of transformers, i.e., pytorch-pretrained-bert, for me it is hard to distinguish the `ConnectionError` from `ValueError` exceptions. Finally, Hope the great repo better and better.

Regards.