Closed GaganCodes closed 11 months ago
Merging #184 (4a47eaf) into main (a975ef6) will increase coverage by
0.01%
. The diff coverage is96.24%
.
@@ Coverage Diff @@
## main #184 +/- ##
==========================================
+ Coverage 95.71% 95.73% +0.01%
==========================================
Files 178 184 +6
Lines 10278 10571 +293
==========================================
+ Hits 9838 10120 +282
- Misses 440 451 +11
Files | Coverage Δ | |
---|---|---|
tests/metrics/statistical/test_wasserstein.py | 100.00% <100.00%> (ø) |
|
...rcheval/metrics/functional/statistical/__init__.py | 100.00% <100.00%> (ø) |
|
torcheval/metrics/statistical/__init__.py | 100.00% <100.00%> (ø) |
|
torcheval/metrics/statistical/wasserstein.py | 100.00% <100.00%> (ø) |
|
torcheval/utils/random_data.py | 100.00% <100.00%> (ø) |
|
...eval/metrics/functional/statistical/wasserstein.py | 90.90% <90.90%> (ø) |
|
...metrics/functional/statistical/test_wasserstein.py | 93.40% <93.40%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Also looks like there are some linting errors, could you make sure to run pre-commit and fix?
Thank you for the quick feedback @bobakfb, I'll fix these and get back to you ASAP.
@bobakfb has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@bobakfb code lint and extra files comments are resolved. Thanks!
@bobakfb has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Hi @bobakfb , @ananthsub , I am not sure why pre-commit is failing for flake8, it's showing "Passed" on my local machine. I have also manually ensured that no imported module is unused.
For transparency, python version on my machine is 3.10.12, whereas in pre-commit check here it seems to be 3.12.0.
@bobakfb has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Summary: Implemented the wasserstein distance function and metric class for 1 dimensional case.
Test plan: Every feature of the code is tested via unitTest framework in "torcheval\tests\metrics\statistical\test_wasserstein.py" and "torcheval\tests\metrics\functional\statistical\test_wasserstein.py".
Fixes #{issue number} https://github.com/pytorch/torcheval/issues/137