fakufaku / fast_bss_eval

A fast implementation of bss_eval metrics for blind source separation
https://fast-bss-eval.readthedocs.io/en/latest/
MIT License
130 stars 8 forks source link

Bugfix: inifinite loop when nan in torch permutation solver #4

Closed fakufaku closed 2 years ago

fakufaku commented 2 years ago

This PR corrects a bug in the torch permutation solver whereas when a nan is present in the cost matrix, the algorithm will go in an infinite loop.

A test was added to check this case in the future.

codecov[bot] commented 2 years ago

Codecov Report

Merging #4 (1d99957) into main (2b8afcb) will increase coverage by 0.05%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
+ Coverage   86.51%   86.57%   +0.05%     
==========================================
  Files          14       14              
  Lines         964      968       +4     
  Branches      133      149      +16     
==========================================
+ Hits          834      838       +4     
  Misses         84       84              
  Partials       46       46              
Impacted Files Coverage Δ
fast_bss_eval/numpy/cgd.py 85.20% <100.00%> (ø)
fast_bss_eval/numpy/metrics.py 94.40% <100.00%> (ø)
fast_bss_eval/torch/cgd.py 85.11% <100.00%> (ø)
fast_bss_eval/torch/helpers.py 63.49% <100.00%> (+1.19%) :arrow_up:
fast_bss_eval/torch/hungarian.py 95.09% <100.00%> (+0.09%) :arrow_up:
fast_bss_eval/torch/metrics.py 94.36% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more