-
Notifications
You must be signed in to change notification settings - Fork 7k
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
WIP: Readimage png + jpeg #1632
Conversation
Hi, I just noticed that CI is broken with the PR. I've looked at some of the logs. It seems to boil down to Do you have any resources on how to update circleci so that i can tell it to install Thanks |
Hi @r-zenine , We would need to install Line 44 in cec7ea7 For CircleCI, it's a bit more involved because we have builds for Linux, OSX and Windows (which are all slightly different) For CUDA CI: vision/.circleci/config.yml.in Line 120 in cec7ea7 For conda: vision/packaging/torchvision/meta.yaml Line 14 in cec7ea7
vision/packaging/torchvision/meta.yaml Line 14 in cec7ea7
For wheels: vision/packaging/build_wheel.sh Line 14 in cec7ea7
And for windows I don't actually know much... but probably somewhere in the vs folders in https://github.com/pytorch/vision/tree/master/packaging And once we make CI pass, we still need to see how we will be seeing the story around packaging for the binaries. But let's start with small steps. Thanks a lot for the PR! |
One more thing is that the Also, one thing to check is how PIL package its libraries internally. Maybe just installing PIL is enough to ensure we have the libraries that we need, and we just need to point to those libraries installed by PIL. |
Hi @fmassa, I was planning to dig deep into PIL build system this week-end. I took a first quick look at it and it seemed quite complex. Therefore, I planned to do it this week-end when I have more time. I will take care of the CI in the meantime. Could you please take a look at the code? Or do you prefer to wait until everything is done ? your call ! Have a good day. |
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 this looks pretty good, thanks a lot!
I did a quick pass and made some comments, let me know what you think.
@fmassa Thanks for the review. |
Hi @r-zenine Sounds good, looking forward to the updated version! |
6033b99
to
9d04ed8
Compare
Codecov Report
@@ Coverage Diff @@
## master #1632 +/- ##
===========================================
+ Coverage 0.43% 65.96% +65.53%
===========================================
Files 92 93 +1
Lines 7396 7346 -50
Branches 1113 1111 -2
===========================================
+ Hits 32 4846 +4814
+ Misses 7356 2180 -5176
- Partials 8 320 +312
Continue to review full report at Codecov.
|
9d04ed8
to
fd98023
Compare
Hi @fmassa, I managed to fix one part of the CI ( Travis, linux_wheel, macos_conda ). I spent a day trying various tricks without success for the remaining pipelines. I have no experience with windows nor with anaconda packaging. I might not be able to do more. Can anyone of the team help? Also, I looked into how we could ship the https://github.com/r-zenine/vision/blob/fd980232b76216364a5fc5d846be073dee907b59/setup.py#L146 The questions that remain are :
|
@fmassa If extra care isn't taken to disable GCC mulitlib / multiarch and standard location OS headers, we can again run into the old linking problem when building from source: (my old investigation here: torch/image#171 (comment) ) |
Hi @vadimkantorov, My understanding is that Would this strategy address the issue you raise? Am I missing something? Thanks |
@r-zenine In that old investigation there were two problems discovered: 1) CMake passing library filenames instead of full paths even if a custom library location was specified (maybe this is no longer relevant), 2) at linking time GCC preferring system libraries over custom-built ones (including conda ones) because of multilib / multiarch. Don't remember how binary loading was mixing with this. Differently from many PyTorch dependencies, libjpg/libpng are often present in system OS locations. Concretely, I'm proposing having some test to confirm that build and OS binary loader picks the right libraries in presence of multilib/multiarch system library versions. I also brought this up in pytorch/pytorch#13188 |
3c8de64
to
8bae4e9
Compare
8bae4e9
to
46d25d9
Compare
HI, Another update, Still a work in progress. However, we got
|
Hi There, Making progress here! Even though I have to admit, I am way out of my comfort zone. The I have tried several times to fix the The code is not clean by any means. There are tons of commits, I'll clean things up when we get everything up and running and rebase and clean the commits. I would appreciate some help with the windows pipeline if anyone can take a look into it. Big thanks guys, |
Thanks for working on this @r-zenine! Believe me, I understand how frustrating it is to add a dependency. Here are some suggestions on how to break this problem into smaller pieces given that this is becoming too complex. You could split this into two PRs: png and jpeg separately. That way we can reduce the error surface. In particular if you can split it such that only one dependency needs to be introduced. On Windows: I'd focus on fixing all the other cases first. In fact, there is nothing wrong with selectively disabling the support for these ops for Windows and Mac first. You can use @unittest.skipIf('win' in sys.platform) to disable the tests on Windows. We can then later on add support for this. On the topic of speeding up the feedback loop: Ninja was supposed to help with build times but until we have support for a flag that limits the threads based on the environment we can't enable it just yet. Windows is always its own story and in my experience has terrible feedback loop times. We're working on fixing this, but a good way to avoid it for now is to add support for it in a separate PR. So, in summary, I'd create a PR that adds jpeg reader support for linux only for now. Then a PR that does the same for png. Then a PR for Mac support for jpeg and png each. Then a PR for Windows support for jpeg and png each. I hope this helps. |
Hi @cpuhrsch , Let's proceed that way. I'll do PR's for:
In the meantime, if we could find help for the |
@r-zenine - sounds great! I'll drum up some help once we get to Windows. |
Awesome, Thanks ! |
Hi everyone,
This PR adds reading functions for PNG using
libpng
. It follows a discussion held in #1179.My
C++
being a bit rusty (it's been 8 years haha). Feel free to make feedback. It will be gratefully welcomed.@fmassa I did my best to fix the formatting issue. Sorry about that I did not notice at the time.
Thanks