-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Fixed broken test_random_choice #7315
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
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 for the PR @vfdev-5 , the changes to RandomChoice LGTM, however I don't think we should mark the other tests as xfail
.
Those tests are passing on most jobs, they're only failing on 3.10. But the problem isn't the tests in themselves, the tests are merely surfacing a (packaging?) issue that is tracked in #7299, and which hopefully the releng team will be able to address soon.
I'd prefer keeping those tests in to make sure our warnings work as expected, and ignore the 3.10 signals for now
In fact the 3.9 and 3.8 jobs are now failing because we use strict xfail: pytest expects those tests to fail but they actually pass, so it raises an error/ |
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 @vfdev-5 !
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!
@@ -822,7 +822,7 @@ def test_random_choice(self, probabilities): | |||
v2_transforms.Resize(256), | |||
legacy_transforms.CenterCrop(224), | |||
], | |||
probabilities=probabilities, | |||
p=probabilities, |
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.
Nit: should we also rename the parameter to p
?
p=probabilities, | |
p=p, |
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 it is ok
Hey @vfdev-5! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Reviewed By: vmoens Differential Revision: D44416538 fbshipit-source-id: cc263e069795e0059f9a6708976f1f8232c9a304
test_random_choice
is broken on main:Description:
test_random_choice
andtest_asserts
.cc @pmeier