-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[metrics] Update SSIM #4566
[metrics] Update SSIM #4566
Conversation
Thanks for working on this! |
Hello @ydcjeff! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-11-19 01:34:41 UTC |
Codecov Report
@@ Coverage Diff @@
## master #4566 +/- ##
======================================
Coverage 93% 93%
======================================
Files 117 117
Lines 8957 8963 +6
======================================
+ Hits 8324 8330 +6
Misses 633 633 |
@teddykoker @SkafteNicki mind review a bit so far? |
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 ! I had a doubt with F.pad, but it is correct usage.
Co-authored-by: chaton <[email protected]>
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, but I am not a metrics guy 🐰
@@ -50,7 +51,7 @@ def _sk_metric(preds, target, data_range, multichannel): | |||
[(i.preds, i.target, i.multichannel) for i in _inputs], | |||
) | |||
class TestSSIM(MetricTester): | |||
atol = 1e-3 # TODO: ideally tests should pass with lower tolerance | |||
atol = 6e-5 | |||
|
|||
# TODO: for some reason this test hangs with ddp=True | |||
# @pytest.mark.parametrize("ddp", [True, False]) |
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.
Do tests pass with ddp=True?
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.
The test hangs with ddp=True
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.
@ydcjeff I just tried locally and the test does not hang for me when ddp=True
.
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.
When I tried before, the test hangs on drone, will try again.
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.
Okay test still hangs on drone, so lets just disable ddp. Really not sure why it is not working.
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.
DDP tests hang locally for me, but I guess its fine
* [metrics] Update SSIM * [metrics] Update SSIM * [metrics] Update SSIM * [metrics] Update SSIM * [metrics] update ssim * dist_sync_on_step True * [metrics] update ssim * Update tests/metrics/regression/test_ssim.py Co-authored-by: chaton <[email protected]> * Update pytorch_lightning/metrics/functional/ssim.py Co-authored-by: Jirka Borovec <[email protected]> * ddp=True * Update test_ssim.py Co-authored-by: chaton <[email protected]> Co-authored-by: Sean Naren <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Nicki Skafte <[email protected]>
* [metrics] Update SSIM * [metrics] Update SSIM * [metrics] Update SSIM * [metrics] Update SSIM * [metrics] update ssim * dist_sync_on_step True * [metrics] update ssim * Update tests/metrics/regression/test_ssim.py Co-authored-by: chaton <[email protected]> * Update pytorch_lightning/metrics/functional/ssim.py Co-authored-by: Jirka Borovec <[email protected]> * ddp=True * Update test_ssim.py Co-authored-by: chaton <[email protected]> Co-authored-by: Sean Naren <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Nicki Skafte <[email protected]> (cherry picked from commit c361213)
What does this PR do?
Update SSIM and tests to compare with lower absolute tolerance
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In in short, see following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃