fixed imports in tests and gpt2 config test

This commit is contained in:
thomwolf
2019-09-09 11:04:03 +02:00
parent 728637356c
commit b7175a2701
20 changed files with 53 additions and 40 deletions

View File

@@ -89,7 +89,7 @@ try:
import tensorflow as tf
assert int(tf.__version__[0]) >= 2
_tf_available = True # pylint: disable=invalid-name
except ImportError:
except (ImportError, AssertionError):
_tf_available = False # pylint: disable=invalid-name
if _tf_available: