ValueError: invalid literal for int() with base 10: ''
### System Info

- `transformers` version: 4.27.3
- Platform: macOS-13.2.1-x86_64-i386-64bit
- Python version: 3.8.16
- Huggingface_hub version: 0.13.3
- PyTorch version (GPU?): 1.12.1 (False)
- Tensorflow version (GPU?): 2.11.1 (False)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: True
- Using distributed or parallel set-up in script?: True (via Horovod)

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

This might complex, but this happens very occasionally.
```
[1,0]<stderr>:Traceback (most recent call last): 
[1,0]<stderr>:  File "run_training.py", line 12, in <module> 
[1,0]<stderr>:    from proj.modeling import Model1, Model2
[1,0]<stderr>:  File "/model_proj/proj/modeling.py", line 6, in <module> 
[1,0]<stderr>:    from transformers import BertConfig, TFBertMainLayer 
[1,0]<stderr>:  File "/usr/local/lib/python3.8/dist-packages/transformers/__init__.py", line 26, in <module> 
[1,0]<stderr>:    from . import dependency_versions_check 
[1,0]<stderr>:  File "/usr/local/lib/python3.8/dist-packages/transformers/dependency_versions_check.py", line 17, in <module> 
[1,0]<stderr>:    from .utils.versions import require_version, require_version_core 
[1,0]<stderr>:  File "/usr/local/lib/python3.8/dist-packages/transformers/utils/__init__.py", line 56, in <module> 
[1,0]<stderr>:    from .hub import ( 
[1,0]<stderr>:  File "/usr/local/lib/python3.8/dist-packages/transformers/utils/hub.py", line 1085, in <module> 
[1,0]<stderr>:    cache_version = int(f.read()) 
[1,0]<stderr>:ValueError: invalid literal for int() with base 10: '' 
```

1. Just import Transformers, and the error happens, randomly.

Retrying import fixes the issue, so I had ignored this for a while.
However, this had broken some of my infrastructures yesterday.

This must be fixed.

### Expected behavior

It must be imported without errors.
Thanks for reporting! The PR above should fix this.<|||||>Closing issue since the PR has been merged into main branch :)