Catch ImportError when importing tf instead of a broad exception catch. If not, this leads to weird errors in the other tests down the line.

PiperOrigin-RevId: 510206006
This commit is contained in:
Yash Katariya 2023-02-16 11:57:04 -08:00 committed by jax authors
parent 54269c1145
commit 34324f80e9

View File

@ -37,7 +37,7 @@ try:
import tensorflow as tf
tf_version = tuple(
int(x) for x in tf.version.VERSION.split("-")[0].split("."))
except:
except ImportError:
tf = None