Don't hard error when cache version can't be converted to int
# What does this PR do?

As reported in #22412 if the string stored in the cache version file is not an int, all import from the Transformers library will fail. This PR adds more safeguards.
_The documentation is not available anymore as the PR was closed or merged._<|||||>Is `ValueError` the only kind of error that can be returned when this fails?<|||||>Yup