-
Notifications
You must be signed in to change notification settings - Fork 517
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
Feature/sg 000 no explicit pil #908
Conversation
But there are multiple places in our code which we use PIL....I am a bit concerned about this since we dont have an upper limit on torchvision version (assuming thats where we get our pil version from) Dont know whats worse TBH, maybe we should consult with @Shani-Perl , I also think crashing notebooks are a disaster. |
There are indeed places where we use Pillow. However you're pointed earlier right that torchvision also has PIL dependency in it, so we still get Pillow installed. My understanding why removing Pillow from our requirements helps - torchvision has Pillow version requirements that are different, free from this bug. |
Yes, but the 9.2.0 might have been an overkill. I looked at @tomerkeren42 commit message from when we updated the requirement in #417:
I feel a bit more comfortable fixing it to 8.4.0, after checking we dont get this (actually, I think predict uses it internally). WDYT? |
torchvision uses this range of versions:
Ok, let's try this. What about we go with |
Sounds good! |
just remember that many users are installing SG and then installing PyTorch again (because of CUDA compatibility). |
@ofrimasad here's the problem we have:
Solutions: |
So what I did is duplicated torchvision requirements for pillow. This makes our dependency bot happy, while also gives much more freedom to re-use installed Pillow (Fixes the problem of restarting kernel in Colab). |
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
Looks like this PR fixes the problem with PIL in Colab and users having to restart the runtime
https://colab.research.google.com/drive/1XpTQvHAPvQRhLFRpCpwoVzrNcYNT72yE#scrollTo=0IIEfRas22hg