Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

version check in misc_utils.py failed in tensorflow 1.10.xxx #367

Open
hkhpub opened this issue Aug 9, 2018 · 2 comments
Open

version check in misc_utils.py failed in tensorflow 1.10.xxx #367

hkhpub opened this issue Aug 9, 2018 · 2 comments

Comments

@hkhpub
Copy link

hkhpub commented Aug 9, 2018

It checks version by comparing version strings, so from version 1.10, the check does not work any more.

def check_tensorflow_version():
  min_tf_version = "1.4.0-dev20171024"
  if tf.__version__ < min_tf_version:
    raise EnvironmentError("Tensorflow version must >= %s" % min_tf_version)
@VictorZhang2014
Copy link

This is resolved in a Pull Request. #369 It's impossible valid immediately while NMT team generate a release.

@hkhpub
Copy link
Author

hkhpub commented Aug 14, 2018

This should be a temporal workaround:

from distutils.version import StrictVersion

def check_tensorflow_version():
  min_tf_version = "1.4.0"
  if StrictVersion(tf.__version__) < StrictVersion(min_tf_version):
    raise EnvironmentError("Tensorflow version must >= %s" % min_tf_version)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants