tensorflow / hub

A library for transfer learning by reusing parts of TensorFlow models.
https://tensorflow.org/hub
Apache License 2.0
3.49k stars 1.67k forks source link

fix version spec #803

Closed m0tchy closed 3 years ago

m0tchy commented 3 years ago

The current code produces a "=2.5" file because ">=" is redirection.

review-notebook-app[bot] commented 3 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

WGierke commented 3 years ago

Hi @m0tchy Could you elaborate on which problem you had that this change solves? I'm asking because the tutorial works fine for me on Colab. Thanks!

m0tchy commented 3 years ago

Though the original command will install the latest version but the specified version, it may work fine currently. However, it is not the intended result for specifying "tensorflow>=2.5". As the character ">" will be interpreted as redirection by the shell, the useless file "=2.5" will be created. It should be fixed by escaping "<" or double-quoting as explained in "Requirement Specifiers" in pip manual [1].

[1] https://pip.pypa.io/en/stable/cli/pip_install/#requirement-specifiers