-
Notifications
You must be signed in to change notification settings - Fork 2.2k
upgrade to pytorch 0.4.1 + make work with python 3.7 (but still 3.6 also) #1543
Conversation
Seems fine to just lower the precision of that test. 6 decimals is plenty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
setup.py
Outdated
@@ -101,7 +101,7 @@ | |||
packages=find_packages(exclude=["*.tests", "*.tests.*", | |||
"tests.*", "tests"]), | |||
install_requires=[ | |||
'torch==0.4.0', | |||
'torch==0.4.1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>=0.4.0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the rationale for allowing 0.4.0 still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think torch.tanh
makes it so we require at least 0.4.1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically, the less restrictive we can be about requirements here, the better - it gives downstream users more flexibility in their code. But I think this PR requires the bump.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
torch.tanh seems ok with 0.4.0, I just started getting the deprecation warning to use it under 0.4.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my thinking was mostly that supporting users is easier if we know they're on a specific pytorch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's also a valid point, if the version matters for our support. I could go either way here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For minor versions of the key library that we depend on, this seems a bit inflexible. But, if you feel strongly, go ahead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only other thing I'd add is that if we have a lower bound, we should have an upper bound too. Not sure if that should be 0.4.2
, 0.5.0
, or 1.0.0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
setup.py
Outdated
@@ -101,7 +101,7 @@ | |||
packages=find_packages(exclude=["*.tests", "*.tests.*", | |||
"tests.*", "tests"]), | |||
install_requires=[ | |||
'torch==0.4.0', | |||
'torch==0.4.1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think torch.tanh
makes it so we require at least 0.4.1
.
Hi Team, any plan for a new release of this bugfix? |
It should be released either today or tomorrow. (There are a couple of bugs that I still have to fix before I can do the release.) |
Thank you! |
…lso) (allenai#1543) * changes for pytorch 0.4.1 * increase tolerance for srl test * update versions in setup.py * add script to check requirements.txt vs setup.py + fix setup.py * loosen bounds on pytorch version
tested under (3.6 + 0.4), (3.6 + 0.4.1), (3.7 + 0.4.1)
(I am pretty sure that 3.7 requires 0.4.1)
nasty subtlety where Python 3.7 changed an undocumented feature I was relying on to identify annotations as Dicts or Lists.
also, I added a script to check whether setup.py and requirements.txt are in sync, it's kind of hacky, but it found me a discrepancy already