Skip to content

Conversation

@vfdev-5
Copy link
Contributor

@vfdev-5 vfdev-5 commented Feb 23, 2023

test_random_choice is broken on main:

Description:

  • Fixed test_random_choice and test_asserts.
  • Improved error message in RandomChoice

cc @pmeier

@vfdev-5 vfdev-5 requested a review from NicolasHug February 24, 2023 08:52
Copy link
Member

@NicolasHug NicolasHug left a 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

@NicolasHug
Copy link
Member

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/

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vfdev-5 !

Copy link
Contributor

@pmeier pmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

legacy_transforms.CenterCrop(224),
],
probabilities=probabilities,
p=probabilities,
Copy link
Contributor

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?

Suggested change
p=probabilities,
p=p,

Copy link
Contributor Author

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

@vfdev-5 vfdev-5 merged commit aef00c4 into pytorch:main Feb 24, 2023
@vfdev-5 vfdev-5 deleted the fix-test_random_choice branch February 24, 2023 10:57
@github-actions
Copy link

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

NicolasHug pushed a commit to NicolasHug/vision that referenced this pull request Feb 24, 2023
facebook-github-bot pushed a commit that referenced this pull request Mar 29, 2023
Reviewed By: vmoens

Differential Revision: D44416538

fbshipit-source-id: cc263e069795e0059f9a6708976f1f8232c9a304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants