Skip to content

perform cyclic check for hue in test_rgb2hsv #2477

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

Merged
merged 2 commits into from
Jul 16, 2020
Merged

perform cyclic check for hue in test_rgb2hsv #2477

merged 2 commits into from
Jul 16, 2020

Conversation

KushajveerSingh
Copy link
Contributor

fixes #2433

Test fails for cases when hue=0 and hue=360. As hue is cyclic in nature, add cyclic logic for checking the max difference by taking the sin of the tensor and then comparing the max values.
Copy link
Collaborator

@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.

Hi @KushajveerSingh and thanks for the fix. The linter failed with

./test/test_functional_tensor.py:4:12: W291 trailing whitespace
./test/test_functional_tensor.py:118:69: E231 missing whitespace after ','
./test/test_functional_tensor.py:119:75: E231 missing whitespace after ','
./test/test_functional_tensor.py:120:1: W293 blank line contains whitespace
./test/test_functional_tensor.py:121:42: E226 missing whitespace around arithmetic operator
./test/test_functional_tensor.py:121:44: E226 missing whitespace around arithmetic operator
./test/test_functional_tensor.py:121:75: E226 missing whitespace around arithmetic operator
./test/test_functional_tensor.py:121:77: E226 missing whitespace around arithmetic operator

Could you address that? Otherwise LGTM.

@KushajveerSingh
Copy link
Contributor Author

Made the changes.

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Thanks!

@fmassa fmassa merged commit ab73b44 into pytorch:master Jul 16, 2020
@KushajveerSingh KushajveerSingh deleted the test_rgb2hsv branch July 16, 2020 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_rgb2hsv is flaky
3 participants