Skip to content
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

deprecating separation module #382

Merged
merged 7 commits into from
Aug 16, 2024

Conversation

bmcfee
Copy link
Collaborator

@bmcfee bmcfee commented Jun 10, 2024

This PR deprecates the separation module.

Question for @faroit - is sigsep-museval the best replacement to recommend here?

Question for @craffel - should we disable tests on the separation module? They've always been finnicky and the vast majority of build time. If we're deprecating the module anyway, I could see some benefit to disabling these tests.

@bmcfee bmcfee added this to the 0.8 milestone Jun 10, 2024
Copy link
Collaborator

@craffel craffel left a comment

Choose a reason for hiding this comment

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

Thanks. Yes, let's disable the tests too.

@faroit
Copy link

faroit commented Jun 12, 2024

@bmcfee thanks for the initiative. Before we merge this, I would guess we should get some feedback from the community. museval might be a good fit as its an implementation of the bsseval images (unlike _sources) algorithm but it might needs some work to make it future proof as well: wrt to the precision issue, I also had to lower the regression tests tolerance https://github.com/sigsep/sigsep-mus-eval/pull/93/files#diff-6edc05e4134fe68983d08319a22f62d5e4efdd829656595282cf6ef97011c13aL90 myself (testing against older version of museval with older numpy version).

Here are some people that I would def value their opinion on how to proceed with the sdr metrics:

@rabitt @fakufaku @iver56 @adefossez

@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.47%. Comparing base (fddf120) to head (64db1ed).

Files Patch % Lines
mir_eval/util.py 71.42% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #382       +/-   ##
===========================================
- Coverage   95.73%   85.47%   -10.27%     
===========================================
  Files          19       19               
  Lines        2934     2946       +12     
===========================================
- Hits         2809     2518      -291     
- Misses        125      428      +303     
Flag Coverage Δ
unittests 85.47% <83.33%> (-10.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmcfee
Copy link
Collaborator Author

bmcfee commented Jun 12, 2024

Thanks. Yes, let's disable the tests too.

Done.

museval might be a good fit as its an implementation of the bsseval images (unlike _sources) algorithm but it might needs some work to make it future proof as well: wrt to the precision issue, I also had to lower the regression tests tolerance https://github.com/sigsep/sigsep-mus-eval/pull/93/files#diff-6edc05e4134fe68983d08319a22f62d5e4efdd829656595282cf6ef97011c13aL90 myself

I think the precision issue will always be there as long as we're relying on unregularized least squares; even moreso if we're dynamically switching between solve() and lstsq(), as mir_eval and museval both do. This dynamic behavior, IIRC, was intended to mimic what matlab's \ operator does under the hood, and it's always seemed troublesome to me. Museval's implementation at least puts a ridge on the solve(), so it really shouldn't ever hit the lstsq path, but as I noted in the other PR thread #381 , the exception handling there isn't quite correct anymore.

My not-so-humble opinion is that all of these implementations should probably be scrapped and rewritten 😅 But if we're going to do that (as a community), it should only happen once, and in a dedicated package.

@bmcfee
Copy link
Collaborator Author

bmcfee commented Jun 12, 2024

Side note: failures on 3.12 builds are due to matplotlib removeing BrokenBarHCollection. Will fix that in a separate PR.

@craffel
Copy link
Collaborator

craffel commented Jun 12, 2024

Is there a way to tell codecov not to worry about the separation file's lines so it hates us less?

@fakufaku
Copy link

fakufaku commented Jun 12, 2024

Jumping in the discussion here. I have written a fast bss_eval_sources package (fast_bss_eval). At the time, the fast routine was quite faster than the sigsep/bsseval implementation. It also supports numpy/torch, fp32/fp64, cpu/gpu, and solve or conjugate GD.

I think the implementation ideas are applicable to the _images routine for which the savings are potentially even larger.

edit: paper link

@iver56
Copy link

iver56 commented Jun 12, 2024

I'm okay with this. I don't calculate SIR, SAR and ISR anymore when evaluating source separation models/algorithms. I still calculate SDR (with a stripped fork of sigsep/bsseval), but I mostly don't use it. I mainly rely on logWMSE in combination with a few others.

@bmcfee
Copy link
Collaborator Author

bmcfee commented Jun 12, 2024

Is there a way to tell codecov not to worry about the separation file's lines so it hates us less?

I've added separation to the omit section, but it might take a merge before codecov stops comparing to old results that did include it.

@bmcfee
Copy link
Collaborator Author

bmcfee commented Jun 12, 2024

Side note: failures on 3.12 builds are due to matplotlib removing BrokenBarHCollection. Will fix that in a separate PR.

Actually just rolled it into this one - all that needed to happen was to remove an import tweak a docstring, no actual code changes.

@bmcfee bmcfee force-pushed the deprecate-separation branch from da5bf81 to e7ad7fc Compare August 16, 2024 13:45
@bmcfee
Copy link
Collaborator Author

bmcfee commented Aug 16, 2024

Ok, I think this is good to merge now. All matplotlib issues are resolved and tests are workign out of the box. @craffel ?

@bmcfee
Copy link
Collaborator Author

bmcfee commented Aug 16, 2024

Yerp, realized this was already approved. :shipit:

@bmcfee bmcfee merged commit 1fed532 into mir-evaluation:main Aug 16, 2024
8 checks passed
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.

6 participants