-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Remove Python linking dependency if USE_PYTHON=OFF #6378
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
Conversation
Hi @laitingsheng! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
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 approach looks reasonable.
@fmassa Any thoughts around this?
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 if tests passes!
Also, ccing @bmanga as you have originally implemented the cmake file
Also, might be worth seeing if we can remove the following lines vision/torchvision/csrc/vision.cpp Lines 17 to 27 in 2e70ee1
since this is what blocks us to have to include python (but this wasn't supposed to be the case). Maybe we can now remove this, or folks from torchaudio have found a different workaround since then? cc @mthrok |
@fmassa Thanks a lot for offering an other pair of eyes. @laitingsheng My intention is to wait a couple of days for the rest of the people to respond and merge afterwards. Please don't close the PR. Thanks in advance! |
My pleasure.
The quote is from comments under #5602. This is surprising to me as the tests failed again. Since I have permission to look at the CircleCI logs for my commit, I reckon this might be an issue due to the CI system environment. I guess the docker image |
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.
@laitingsheng So in the previous commit, for some reason, the CI didn't run all the tests. I'm certain because I checked so I kicked the CI to rerun them.
Unfortunately the failings are related so to avoid accidental merges, I'll mark the PR with "Request Changes". If we can make the CI pass, I'll be happy to unblock. Apologies for the inconvenience.
I found a related issue in python-pillow/Pillow#5813. I think the error indicates that the shared object path resolution might be broken in the testing environment, but adding the Python target to the linkage dependency somehow resolves this issue. The last commit I pushed might solve the problem on CEntOS-based testing environments, but not on those running macOS. From my perspective, it might be necessary to prune the whole building and testing scripts to actually resolve this issue, but this involves a large amount of work. I will now close my PR and see if any smarter coders could propose a better solution instead. |
@laitingsheng Understood, thanks for the effort! |
A similar fix proposed previously by #5602 failed the CI tests. I made some amendments, and it is compilable in my environment.
It should now correct the problem raised in #5863 as well.
Closes #5602.
Resolves #5863.