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

Nightly build failure on Windows #1756

Closed
peterjc123 opened this issue Jan 16, 2020 · 9 comments · Fixed by #1779
Closed

Nightly build failure on Windows #1756

peterjc123 opened this issue Jan 16, 2020 · 9 comments · Fixed by #1779

Comments

@peterjc123
Copy link
Contributor

Starting from Jan.11, the nightly build started to fail. (commit: 61763fa)
See https://dev.azure.com/pytorch/778b86d3-09b9-4636-a34b-315646862684/_apis/build/builds/18418/logs/122.

@fmassa
Copy link
Member

fmassa commented Jan 17, 2020

I suspect the failure in torchvision is due to a change somewhere in PyTorch, because there has been no changes in torchvision C++ files since then that could potentially be the culprit.

@peterjc123
Copy link
Contributor Author

https://github.com/pytorch/vision/blob/master/torchvision/csrc/vision.cpp#L20 Maybe we should add a PyInit__C function here?

@fmassa
Copy link
Member

fmassa commented Jan 18, 2020

Maybe, but I wonder what has changed since #1348 , so because CI was passing back then.
Could you try sending a PR to see if it fixes it?

@asears
Copy link

asears commented Jan 19, 2020

The integration with PIL 7.0 VERSION API change is breaking some dependencies. I can see these are fixed in Linux / Mac releases.

Doesn't look like Windows version has been published to pypi? https://pypi.org/project/torchvision/0.5.0/#files

Last release appears to be
https://pypi.org/project/torchvision/0.4.1/#files

References #1759 #1712 #1718 #1726

@peterjc123
Copy link
Contributor Author

@asears Your issue doesn't seem to be related to mine. Would you please open a new one?

@asears
Copy link

asears commented Jan 19, 2020

Added #1774

@peterjc123
Copy link
Contributor Author

peterjc123 commented Jan 22, 2020

Well, I think I figured out what happened here. It was caused by the removal of the static library _C.lib at the PyTorch side in pytorch/pytorch#31161. Before that change is merged, building torchvision._C uses the init function PyInit__C from PyTorch, which is actually not correct. We should define our own version of that. Actually, this problem is not Windows only. But I don't know how to fix for other platforms.
Update: Well, it is simply because _custom_ops is now called _C.

@fmassa
Copy link
Member

fmassa commented Jan 22, 2020

Thanks a lot for the investigation and the fix @peterjc123 !

@egbertn
Copy link

egbertn commented Sep 12, 2023

This error still happens, when activating pytorch...

Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import torch
torch._custom_ops
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'torch' has no attribute '_custom_ops'

The code that is generatated when creating a wheel for pytorch vision, uses torch._custom_ops which should be, I understand, torch._C?

torchvision-0.15.0%2B0b41ff0-cp38-cp38-linux_aarch64.whl#sha256=ad8d24697eb2bfdcf4f4a7205433b0b66fa47723162040952e748b1cd8966955

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

Successfully merging a pull request may close this issue.

4 participants