-
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
Help make test dependent on randint compatible with python 3.12 #8119
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8119
Note: Links to docs will display an error until the docs builds have been completed. ❌ 14 New Failures, 18 Unrelated FailuresAs of commit a4bc6b3 with merge base dd66a9d (): NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Thanks for the PR @hmaarrfk . We don't support 3.12 yet but when the time comes, we'll be happy to re-consider this PR. I genuinely hope that this is not here to stay TBH >>> random.randint(0, 4/2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nicolashug/.miniconda3/envs/fuck/lib/python3.12/random.py", line 336, in randint
return self.randrange(a, b+1)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/nicolashug/.miniconda3/envs/fuck/lib/python3.12/random.py", line 312, in randrange
istop = _index(stop)
^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integer |
thanks for looking at this so quickly and taking the time to test on your machine. this seems intentional. see notes about automatic conversation. https://docs.python.org/3/library/random.html#functions-for-integers integer division resolves this issue easily. I mostly just wanted to help given that I had tried to see how far along python 3.12 one could go. I'm not asking you to accelerate your timeline in any way. take it or leave it I guess. |
Just a kind ping hoping you can consider the introduction of a total of 10 characters. |
d922c58
to
472c512
Compare
Thank you for the ping @hmaarrfk . We'll merge the PR in due time, when 3.12 support becomes official for Pytorch and torchvision. I'm sure you're experienced enough to know that the complexity, debt and criteria for inclusion of a PR doesn't correlate with its number of characters. |
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.
Thanks a lot for the PR and for your patience @hmaarrfk. We'll want to release for 3.12 in the next release, so let's get that in now. I'll merge when CI is green.
Failures are unrelated, let's merge |
….12 (#8119) Summary: Co-authored-by: Nicolas Hug <nh.nicolas.hug@gmail.com> Reviewed By: vmoens Differential Revision: D55062798 fbshipit-source-id: e24a223a82eda5ce9ad5ea816d04ab2725f253ff
It seems that python 3.12 is a little stricter on the inputs of randint.
I hope this helps