update tensorflow version check regex to parse version like 1.2.3rc4 (previously only 1.2.3-rc4)

This commit is contained in:
Peter Zhokhov
2018-10-29 15:25:31 -07:00
parent 8e56ddeac2
commit de36116e3b

View File

@@ -57,4 +57,4 @@ for tf_pkg_name in ['tensorflow', 'tensorflow-gpu']:
pass
assert tf_pkg is not None, 'TensorFlow needed, of version above 1.4'
from distutils.version import StrictVersion
assert StrictVersion(re.sub(r'-rc\d+$', '', tf_pkg.version)) >= StrictVersion('1.4.0')
assert StrictVersion(re.sub(r'-?rc\d+$', '', tf_pkg.version)) >= StrictVersion('1.4.0')