Skip to content

fix version check in TensorFlow easyblock#2020

Merged
zao merged 1 commit intoeasybuilders:developfrom
boegel:tf_fix_version_check
Apr 11, 2020
Merged

fix version check in TensorFlow easyblock#2020
zao merged 1 commit intoeasybuilders:developfrom
boegel:tf_fix_version_check

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Apr 11, 2020

Installing TensorFlow with EasyBuild running on top of Python 3 is broken since @Flamefire's PR #2002 got merged:

ERROR: Traceback (most recent call last):
  File "/work/maintainers/easybuild-framework/easybuild/main.py", line 114, in build_and_install_software
    (ec_res['success'], app_log, err) = build_and_install_one(ec, init_env)
  File "/work/maintainers/easybuild-framework/easybuild/framework/easyblock.py", line 3183, in build_and_install_one
    result = app.run_all_steps(run_test_cases=run_test_cases)
  File "/work/maintainers/easybuild-framework/easybuild/framework/easyblock.py", line 3087, in run_all_steps
    self.run_step(step_name, step_methods)
  File "/work/maintainers/easybuild-framework/easybuild/framework/easyblock.py", line 2926, in run_step
    step_method(self)()
  File "/work/maintainers/easybuild-framework/easybuild/framework/easyblock.py", line 2186, in extensions_step
    txt = ext.run()
  File "/work/maintainers/easybuild-easyblocks/easybuild/easyblocks/generic/pythonpackage.py", line 631, in run
    self.build_step()
  File "/work/maintainers/easybuild-easyblocks/easybuild/easyblocks/t/tensorflow.py", line 444, in build_step
    if LooseVersion(self.version) >= LooseVersion('v1.12.1'):
  File "/usr/lib64/python3.6/distutils/version.py", line 70, in __ge__
    c = self._cmp(other)
  File "/usr/lib64/python3.6/distutils/version.py", line 337, in _cmp
    if self.version < other.version:
TypeError: '<' not supported between instances of 'int' and 'str'

The version check is also faulty when using Python 2, since:

>>> LooseVersion('1.15.2') >= LooseVersion('v1.12.1')
False

@boegel boegel added the bug fix label Apr 11, 2020
@boegel boegel added this to the next release (4.2.0) milestone Apr 11, 2020
Copy link
Copy Markdown
Contributor

@zao zao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zao zao merged commit 70a0b4d into easybuilders:develop Apr 11, 2020
@zao
Copy link
Copy Markdown
Contributor

zao commented Apr 11, 2020

Going in, thanks @boegel !

@boegel boegel deleted the tf_fix_version_check branch April 11, 2020 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants