pytorch_beam_search icon indicating copy to clipboard operation
pytorch_beam_search copied to clipboard

torch version pinned to 1.8.1 is not optimal

Open fabienGenhealth opened this issue 2 years ago • 2 comments

The setup file pins the version of pytorch to >=1.8.1. I don't think any of the APIs used require a very specific pytorch release (would 2.0.1 not work equally well?). Pinning to >=1.8.1 is a bit too specific to support a wide use of this package in different repos (some of them may already be on torch ^2.0.0, for instance, and >=1.8.1 does not allow 2.0).

Would it be possible to release a version that is a bit less specific about the version of torch it can work with?

Such a release on pypi would be great.

fabienGenhealth avatar Sep 24 '23 15:09 fabienGenhealth

I'm sorry, I don't understand.... I just installed it with pytorch 2.1.1, it works fine.

Screenshot from 2023-12-14 13-59-14

jarobyte91 avatar Dec 14 '23 20:12 jarobyte91

I think it depends on which package manager you use. If you pip install packages independently manually, then yes, it will work. However, some of us rely on package managers to figure out complex dependencies. For instance, poetry will refuse to install both packages together because the syntax on the version constraint tells it that it is not a supported combination (>=1.8.1 is OK with any torch 1.8.1+, but not with 2.0.0 for instance). If you pinned to ^1.8.1,^2.0.0 I think it should work because you would allow both 1.8+ and 2.+ major releases. This is no longer a block for me however, so up to you.

fabienGenhealth avatar Dec 14 '23 21:12 fabienGenhealth