8000 upgrade to pytorch 0.4.1 + make work with python 3.7 (but still 3.6 also) by joelgrus · Pull Request #1543 · allenai/allennlp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

upgrade to pytorch 0.4.1 + make work with python 3.7 (but still 3.6 also) #1543

Merged
merged 7 commits into from
Jul 31, 2018

Conversation

joelgrus
Copy link
Contributor
@joelgrus joelgrus commented Jul 29, 2018

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

@matt-gardner
< 8000 div class=" timeline-comment-group js-minimizable-comment-group js-targetable-element TimelineItem-body my-0 " id="issuecomment-408686336">
Copy link
Contributor

Seems fine to just lower the precision of that test. 6 decimals is plenty.

@joelgrus joelgrus changed the title [WIP] python 3.7 + pytorch 0.4.1 upgrade to pytorch 0.4.1 + make work with python 3.7 (but still 3.6 also) Jul 29, 2018
Copy link
Contributor
@DeNeutoy DeNeutoy left a 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',
Copy link
Contributor
@DeNeutoy DeNeutoy Jul 30, 2018

Choose a reason for hiding this comment

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

>=0.4.0?

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor
@matt-gardner matt-gardner left a 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',
Copy link
Contributor

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.

@huntzhan
Copy link
Contributor

Hi Team, any plan for a new release of this bugfix?

@joelgrus
Copy link
Contributor Author
8000 joelgrus commented Aug 13, 2018

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.)

@huntzhan
Copy link
Contributor

Thank you!

gabrielStanovsky pushed a commit to gabrielStanovsky/allennlp that referenced this pull request Sep 7, 2018
…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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0