Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove script annotations / eager compilation #2210

Merged
merged 1 commit into from
May 18, 2020

Conversation

eellison
Copy link
Contributor

@eellison eellison commented May 13, 2020

After pytorch/pytorch#38050, classes compile recursively so there is no longer any need to annotation them. And we can use _script_if_tracing to not eagerly compile the script functions but still compile them when we trace.

I'm hoping this resolves #2132

Edit looks like #38050 hasnt made its way to nightly yet

@eellison eellison requested a review from fmassa May 13, 2020 15:54
Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

LGTM once tests pass, thanks a lot @eellison !

@fmassa
Copy link
Member

fmassa commented May 18, 2020

@eellison test failures seems related, could you have a look?

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Lint failures are unrelated and have been fixed in master. Thanks a lot Elias!

@fmassa fmassa merged commit 222a599 into pytorch:master May 18, 2020
fmassa pushed a commit to fmassa/vision-1 that referenced this pull request Jun 9, 2020
Co-authored-by: eellison <eellison@fb.com>
@IRDonch
Copy link

IRDonch commented Jul 8, 2020

It's unfortunate that this wasn't included in 0.6.1. Since future releases will apparently only support Python 3.6+, if you just run pip install torch torchvision on Python 3.5 you'll still end up with a broken configuration.

I don't suppose there's a 0.6.2 planned?

@fmassa
Copy link
Member

fmassa commented Jul 8, 2020

@IRDonch There isn't, but we are going to be releasing 0.7.0 in the next few weeks (but no Python 3.5 support)

@fmassa
Copy link
Member

fmassa commented Jul 8, 2020

Also, @IRDonch note that this is only broken for torchhub models, the rest of torchvision should not be broken for the 0.6.1 release on Python 3.5

@IRDonch
Copy link

IRDonch commented Jul 9, 2020

the rest of torchvision should not be broken for the 0.6.1 release on Python 3.5

Just importing torchvision fails for me (with the same error as in #2132), even with torch==1.5.1 torchvision==0.6.1.

@fmassa
Copy link
Member

fmassa commented Jul 9, 2020

@IRDonch are you using virtualenv? It had some bad interactions with @torch.jit.script annotations, but it has since then been fixed in master and the fix will be present in 0.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Torchvision 0.6.0 doesn't work on Ubuntu 16.04.3 with Python 3.5.2
3 participants