Skip to content

Conversation

@shucongzhang
Copy link
Contributor

What does this PR do?

This PR provides recipes for training CTC models from scratch (no W2V2, no Whisper). It yields to strong Branchformer-CTC and Conformer-CTC models.

Shucong Zhang/Embedded AI /SRUK/Engineer/Samsung Electronics and others added 3 commits December 5, 2023 12:10
),
torch.nn.Dropout(dropout),
)
self.custom_tgt_module = ModuleList(
Copy link
Collaborator

Choose a reason for hiding this comment

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

@asumagic I guess that this is the place of the problem?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, this change does what I ultimately suggested to do in the discussion in my PR, with the same consequences:

Though, now, I'm thinking that we could just skip the headache and fix the problem by gating it behind num_decoder_layers > 0 and break models: As far as I can tell, actually, the only affected model in the SB repo seems to be the conformer-transducer model.
Then, just in case, we could provide a script that would remove the module from a checkpoint file.

@TParcollet
Copy link
Collaborator

Thanks @shucongzhang ! Could you start by fixing the tests? It can be done locally by installing pre-commit :-)

Shucong Zhang/Embedded AI /SRUK/Engineer/Samsung Electronics added 2 commits December 5, 2023 15:46
@shucongzhang
Copy link
Contributor Author

Thanks @shucongzhang ! Could you start by fixing the tests? It can be done locally by installing pre-commit :-)

Definitely. I have fixed the tests :)

@mravanelli
Copy link
Collaborator

Thank you @shucongzhang! This is a great contribution. My main comment is that we need to update this PR to the new version of speechbrain that is currently available in the unstable branch (but soon will be merged in the development branch).
You can take a look at the recipes available in LibriSpeech/ASR/CTC for a reference. @Adel-Moumen can help with that conversion. With the new version of speechbrain, you can also improve the performance using CTC beamsearch with n-gram LM rescoring.

@Adel-Moumen
Copy link
Collaborator

Hello @shucongzhang,

Thanks for your great work!

We recently released in develop the new SpeechBrain 1.0 version (see: https://colab.research.google.com/drive/1IEPfKRuvJRSjoxu22GZhb3czfVHsAy0s?usp=sharing), and unfortunately, this PR needs to be sync with the latest commits in the develop branch so that we can move forward with this PR.

Best,
Adel

@Adel-Moumen Adel-Moumen self-assigned this Jan 18, 2024
@Adel-Moumen
Copy link
Collaborator

Hi everyone,

I have been modifying this PR so that it complains with SB 1.0. I also added support for beam search decoding (and latter I will run n-gram decoding as well).

I'm in the process of training the models. I found that one epoch is about ~40 minutes on an A100 80GB with fp16. However, in the yaml @shucongzhang specified number_of_epochs: 500. It seems a bit too much, isn't it ? 500 epochs means ~14 days of training ((500 * 40) / 60 / 24). I suppose we could lower this number right ? I can increase the number of GPUs, but it would have been great to have a competitive conformer/branchformer that works on 1 GPU at a time (<2-3 days).

Ping @TParcollet as well as I guess you were part of this PR.

Best,
Adel

@Adel-Moumen
Copy link
Collaborator

Hello @shucongzhang small ping on my previous message about training time. Could you please confirm me that 500 epochs is reasonable ? Ty.

@shucongzhang
Copy link
Contributor Author

shucongzhang commented Jan 25, 2024

Hello @shucongzhang small ping on my previous message about training time. Could you please confirm me that 500 epochs is reasonable ? Ty.

Hi @Adel-Moumen , Yes, the training time also makes me feel annoying. From my knowledge and my experiments, it seems for the vanilla Conformer/Branchformer a large batch size and a large number of epochs are necessary. Based on my Conformer training log,

epoch 250: 3.68 dev-clean WER 
epoch 300: 3.62 dev-clean WER
epoch 400: 3.50 dev-clean WER
epoch 500: 3.45 dev-clean WER

Thus, maybe it is Okay to do some trade off between the training time and WER? Thx!

@Adel-Moumen
Copy link
Collaborator

I'm wondering about something. Why are we using a sentencepiece 128 BPE vocab for our CTC branch/conformer ? If you are training with CTC then why not using label_encoder with chars ? Ping @TParcollet / @shucongzhang

@shucongzhang
Copy link
Contributor Author

I'm wondering about something. Why are we using a sentencepiece 128 BPE vocab for our CTC branch/conformer ? If you are training with CTC then why not using label_encoder with chars ? Ping @TParcollet / @shucongzhang

@Adel-Moumen Hi Adel, I was in China for the Lunar New Year and just back to work. Happy Lunar New Year to you :) I used the 128 BPE to follow some previous works. I didn't test what will be the results if using using label_encoder with chars.

@Adel-Moumen
Copy link
Collaborator

I'm wondering about something. Why are we using a sentencepiece 128 BPE vocab for our CTC branch/conformer ? If you are training with CTC then why not using label_encoder with chars ? Ping @TParcollet / @shucongzhang

@Adel-Moumen Hi Adel, I was in China for the Lunar New Year and just back to work. Happy Lunar New Year to you :) I used the 128 BPE to follow some previous works. I didn't test what will be the results if using using label_encoder with chars.

@shucongzhang Welcome back, and Happy Lunar New Year to you too 🎉! Thanks for the clarification. It makes sense from your point of view. I will try with label_encoder since I think it could be useful here (and from a CTC point of view, I don't really understand the need of using BPE instead of phonemes/chars).

I let you know when I have some results to share. I might take a bit of time due to the next release of SB 1.0, but I'll let you know what happens :)

@TParcollet
Copy link
Collaborator

@Adel-Moumen we should avoid using label_encoder imho. SentencePiece can be degenerated to char only. I don't like our recipes that use label_encoder, we have developed this class because we did not want to use SentencePiece at first, but here we are. Maybe we should deprecate it.

@Adel-Moumen
Copy link
Collaborator

Hello,

So I had the opportunity to train a bit (~200 epochs) with each model (Branchformer and Conformer), and everything ran smoothly :)

I will therefore merge this PR. Thanks a lot @shucongzhang for your very nice work. :)

Tests

python -c 'from tests.utils.recipe_tests import run_recipe_tests; print("TEST FAILED!") if not(run_recipe_tests(filters_fields=["Hparam_file"], filters=[["recipes/LibriSpeech/ASR/CTC/hparams/conformer_large.yaml", "recipes/LibriSpeech/ASR/CTC/hparams/branchformer_large.yaml"]], do_checks=False, run_opts="--device=cuda")) else print("TEST PASSED")'
(1/2) Running test for LibriSpeech_row_41...
        ... 11.01s
(2/2) Running test for LibriSpeech_row_42...
        ... 15.03s
TEST PASSED

Copy link
Collaborator

@Adel-Moumen Adel-Moumen left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks again @shucongzhang :)

@Adel-Moumen Adel-Moumen merged commit d086cde into speechbrain:develop Apr 18, 2024
@shucongzhang
Copy link
Contributor Author

LGTM. Thanks again @shucongzhang :)

Thank you so much @Adel-Moumen !

asumagic added a commit to asumagic/speechbrain that referenced this pull request May 2, 2024
fpaissan added a commit to fpaissan/speechbrain that referenced this pull request May 2, 2024
* Skip lazy imports when the caller is inspect.py

This avoids having certain inspect functions import our lazy modules when we don't want them to. `getframeinfo` in particular appears to do it, and this gets called by PyTorch at some point. IPython might also be doing it but autocomplete still seems to work.

This does not appear to break anything. Added test for hyperpyyaml to ensure we're not breaking that.

* SSL_Semantic_Token _ new PR (speechbrain#2509)

* remove unnecassry  files and move to dasb

* remove extra recepie from test

* update ljspeech qunatization recepie

* add discrete_ssl and remove extra files

* fix precommit

* update kmeans and add tokeizer for postprocessing

* fix precommit

* Update discrete_ssl.py

* fix clone warning

---------

Co-authored-by: Mirco Ravanelli <mirco.ravanelli@gmail.com>

* _ensure_module Raises docstring

* Expose `ensure_module` so that docs get generated for it

This is already an internal class anyway, and this is safe to call.

* Update actions/setup-python

* Use `uv` in test CI + merge some dep installs

The consequence is faster dependency installation. Merging some of the dependency installs helps avoid some packages being reinstalled from one line to the next. Additionally, CPU versions are specified when relevant, to avoid downloading CUDA stuff the CI can't use anyway.

* Use `uv` in doc CI + merge some dep installs

Similar rationale as for the test CI

* Parallelize doc generation with Sphinx

This does not affect the entire doc generation process but should allow some minor multithreading even with the 2-core CI workers.

* Enable `uv` caching on the test CI

* Enable `uv` caching on the docs CI

* CTC-only training recipes for LibriSpeech (code from Samsung AI Cambridge) (speechbrain#2290)

CTC-only pre-training of conformer and branchformer.

---------

Co-authored-by: Shucong Zhang/Embedded AI /SRUK/Engineer/Samsung Electronics <s1.zhang@sruk-ccn4.eu.corp.samsungelectronics.net>
Co-authored-by: Adel Moumen <adelmoumen.pro@gmail.com>
Co-authored-by: Adel Moumen <88119391+Adel-Moumen@users.noreply.github.com>
Co-authored-by: Parcollet Titouan <titouan.parcollet@univ-avignon.fr>

* Update CommonVoice transformer recipes (code from Samsung AI Center Cambridge) (speechbrain#2465)

* Update CV transformer recipes to match latest results with conformer.

---------

Co-authored-by: Titouan Parcollet/Embedded AI /SRUK/Engineer/Samsung Electronics <t.parcollet@sruk-ccn4.eu.corp.samsungelectronics.net>
Co-authored-by: Mirco Ravanelli <mirco.ravanelli@gmail.com>
Co-authored-by: Adel Moumen <adelmoumen.pro@gmail.com>

* Whisper improvements: flash attention, KV caching, lang_id, translation, training... (speechbrain#2450)

Whisper improvements:
- flash attention
- kv caching
- lang identifaction
- translation
- finetuning amelioration 
... and more ...

* Update README.md

* precommit

* update zed download link (speechbrain#2514)

* `RelPosEncXL` refactor and precision fixes (speechbrain#2498)

* Add `RelPosEncXL.make_pe`, rework precision handling

* Rework RelPosEncXL output dtype selection

* Fix in-place input normalization when using `sentence`/`speaker` norm (speechbrain#2504)

* fix LOCAL_RANK to be RANK in if_main_process (speechbrain#2506)

* Fix Separation and Enhancement recipes behavior when NaN encountered (speechbrain#2524)

* Fix Separation and Enhancement recipes behavior when NaN encountered

* Formatting using precommit hooks

* Lock torch version in requirements.txt (speechbrain#2528)

* Fix compatibility for torchaudio versions without `.io` (speechbrain#2532)

This avoids having the Python interpreter attempt to resolve the type annotation directly.

* fix docstrings

* consistency tests - classification

* consistency tests - classification

* consistency tests - interpret

* default to no wham

* fix after tests pass

* fix after tests pass

* tests after that

* fix consistency

---------

Co-authored-by: asu <sdelang@sdelang.fr>
Co-authored-by: Pooneh Mousavi <moosavi.pooneh@gmail.com>
Co-authored-by: Mirco Ravanelli <mirco.ravanelli@gmail.com>
Co-authored-by: shucongzhang <104781888+shucongzhang@users.noreply.github.com>
Co-authored-by: Shucong Zhang/Embedded AI /SRUK/Engineer/Samsung Electronics <s1.zhang@sruk-ccn4.eu.corp.samsungelectronics.net>
Co-authored-by: Adel Moumen <adelmoumen.pro@gmail.com>
Co-authored-by: Adel Moumen <88119391+Adel-Moumen@users.noreply.github.com>
Co-authored-by: Parcollet Titouan <titouan.parcollet@univ-avignon.fr>
Co-authored-by: Parcollet Titouan <parcollet.titouan@gmail.com>
Co-authored-by: Titouan Parcollet/Embedded AI /SRUK/Engineer/Samsung Electronics <t.parcollet@sruk-ccn4.eu.corp.samsungelectronics.net>
Co-authored-by: Yingzhi WANG <41187612+BenoitWang@users.noreply.github.com>
Co-authored-by: Peter Plantinga <plantinga.peter@protonmail.com>
Co-authored-by: Séverin <123748182+SevKod@users.noreply.github.com>
asumagic added a commit to asumagic/speechbrain that referenced this pull request May 6, 2024
asumagic added a commit to asumagic/speechbrain that referenced this pull request May 6, 2024
mravanelli added a commit that referenced this pull request Jul 3, 2024
* works on cnn14 -- but have a bad checkpoint

* fixed l2i as well

* fixed acc in l2i

* fix not listenable

* updated logging for eval

* a bit less verbose

* printing at sample level

* fix logging - was missing avg

* was messing up in the forward

* now running train_piq.py

* minor corrections

* fix l2i training with wham!

* fixed l2i computation

* linters

* add check for wham usage in eval

* add sample saving during eval

* bug fixes

* added predictions info to the logging

* fixed id for overlap test

* cutting sample before saving

* fixed l2i sampling rate

* fixed random seed so eval will match

* running on full set

* faithfulness fix

* remove pdb

* fix smoothgrad and IG

* fix nmf for pre-training

* removed nmf reconstructions

* truncated gaussian fix for smoothgrad

* fix nans in sensitivity

* better l2i psi network

* saving to a different folder. helps not overriding experiments..

* fix l2i

* fix csv logging of exps

* add guided backprop

* added gradcam. guided backprop and guided gradcam need debugging

* l2i encoder 1D

* mel only - ao

* eval for mel only

* changed logging to simple write

* hardcoded checkpoint - to run on cc

* save everything in one folder

* remove joblib import

* fixed eval?

* fix eval again..

* maybe now?

* trying on cc

* add eval_outdir

* runs full eval

* l2i with updated psi

* update gitignore

* l2i logging different loss values

* add us8k classifier

* us8k interpretations

* fixed guided backprop and guided gradcam

* add shap

* normalizing shap attributions

* adding us8k prepare in interp..

* eval on ID

* fixed backward compatibility

* added multiclass classification

* eval xplorer v1

* eval xplorer v2

* implemented multi label interpretation

* update the loss function in multilabel interpretations

* evaluation explorer - minor fixes

* add roar

* roar test

* just removing a print...

* add roar script

* adding the user study parsing script

* savefigs

* fix to roar hparam

* minor

* extract samples for user study

* fix bug roar

* fixed roar

* fix another copy-paste error

* MRT eval

* roar with random baseline

* fix np seed

* computes mrt metrics

* saving masks for mrt viz

* remove rand baseline roar

* abs

* gradcam eval

* fix class

* add mrt to l2i

* train piq us8k

* param in mrt_evaluator

* add viz

* adding the latest

* fixing path problems for multilabelstuff

* changed the loss function to output 10 masks

* more standard maskout term

* changed encoder loading to local

* added accuracy computation

* removed unnecessary evaluation methods

* added all ones mask and average energy computation

* fixed the bug for whitenoise

* pushing eval later

* l2i new ood

* removing useless files

* cleaning up classification as well

* removing useless hparams in interpret

* more useless files

* old linters

* fix paths

* fix paths

* update Cnn14

* restored old piq file

* wham on PIQ

* Adding LMAC - needs refactor (#5)

* WHAM-ing the data

* AO on conv2d classifier

* added interpretability metrics

* fix debug steps -- updated

* minor to train_piq

* fix saving interpretations

* add wham! for L2I

* fix l2i eval

* add NCC

* cross correlation w/ batching

* checked crosscor

* finish finetuning script

* switch to l1

* linters

* add binarized oracle w/ BCE

* fix compute loss in finetuning while saving samples

* comparison script

* fix 0dB mixtures

* add original wav to comparison

* just path to new classifier

* just committing new checkpoint for L2I

* add NMF image logging for debug

* fix bug in viz L2I

* log the number of finetuning masks

* lower crosscor thr

* fix acc

* align L2I debugging w/ PIQ script

* fixed accuracy computation for L2I

* L2I with variable number of components (K=200)

* debugging l2i...

* update hparams

* fixed oracle source

* fixed wrong sources and running finetuning experiments..

* add AST as classifier

* hparams ast -- still not converging

* add ast augmentation

* update training script after merge

* with augmentations is better

* just pushing hparams

* classification with CE

* conv2d fix for CE

* playing with AST augmentation

* fixed thresholding

* starting to experiment with no wham noise stuff

* add wham noise option in classifier training, dot prod correlation in finetuning

* single mask training

* added zero grad

* added the entropy loss

* implemented a psi function for cnn14

* Update README.md

* added stft-mel transformation learning

* add latest eval setup - working on gradient-based

* removed unused brain -- was causing issues in weights loading..

* training l2i on this classifier

* add l2i eval -- removing mosaic; not well defined in the case of L2I

* removed old png file

* debugging eval weight loading..

* was always using vq

* fixed eval AO

* fixed eval -- now everything's fine also for L2I

* better numerical stability

* handling quantus assertionerror

* add saliency from captum

* updated smoothgrad for captum

* added norm to saliency

* IG from captum

* starting gradient-base eval on cnn14...

* commit before merge

* works on cnn14 -- but have a bad checkpoint

* fixed l2i as well

* fixed acc in l2i

* fix not listenable

* updated logging for eval

* a bit less verbose

* printing at sample level

* fix logging - was missing avg

* was messing up in the forward

* now running train_piq.py

* minor corrections

* fix l2i training with wham!

* fixed l2i computation

* linters

* add check for wham usage in eval

* add sample saving during eval

* bug fixes

* added predictions info to the logging

* fixed id for overlap test

* cutting sample before saving

* fixed l2i sampling rate

* fixed random seed so eval will match

* running on full set

* faithfulness fix

* remove pdb

* fix smoothgrad and IG

* fix nmf for pre-training

* removed nmf reconstructions

* truncated gaussian fix for smoothgrad

* fix nans in sensitivity

* better l2i psi network

* saving to a different folder. helps not overriding experiments..

* fix l2i

* fix csv logging of exps

* add guided backprop

* added gradcam. guided backprop and guided gradcam need debugging

* l2i encoder 1D

* mel only - ao

* eval for mel only

* changed logging to simple write

* hardcoded checkpoint - to run on cc

* save everything in one folder

* remove joblib import

* fixed eval?

* fix eval again..

* maybe now?

* trying on cc

* add eval_outdir

* runs full eval

* l2i with updated psi

* update gitignore

* l2i logging different loss values

* add us8k classifier

* us8k interpretations

* fixed guided backprop and guided gradcam

* add shap

* normalizing shap attributions

* adding us8k prepare in interp..

* eval on ID

* fixed backward compatibility

* added multiclass classification

* eval xplorer v1

* eval xplorer v2

* implemented multi label interpretation

* update the loss function in multilabel interpretations

* evaluation explorer - minor fixes

* add roar

* roar test

* just removing a print...

* add roar script

* adding the user study parsing script

* savefigs

* fix to roar hparam

* minor

* extract samples for user study

* fix bug roar

* fixed roar

* fix another copy-paste error

* MRT eval

* roar with random baseline

* fix np seed

* computes mrt metrics

* saving masks for mrt viz

* remove rand baseline roar

* abs

* gradcam eval

* fix class

* add mrt to l2i

* train piq us8k

* param in mrt_evaluator

* add viz

* adding the latest

* fixing path problems for multilabelstuff

* changed the loss function to output 10 masks

* more standard maskout term

* changed encoder loading to local

* added accuracy computation

* removed unnecessary evaluation methods

* added all ones mask and average energy computation

* fixed the bug for whitenoise

* pushing eval later

* l2i new ood

* removing useless files

* cleaning up classification as well

* removing useless hparams in interpret

* more useless files

* old linters

* fix paths

* fix paths

* update Cnn14

* restored old piq file

* wham on PIQ

---------

Co-authored-by: Cem Subakan <csubakan@gmail.com>
Co-authored-by: Francesco Paissan <fpaissan@cedar1.cedar.computecanada.ca>

* removed useless code. needs to be modified to run with self.interpret_sample

* parent class and piq mods

* fix fn names

* simplify viz

* move data prep function

* L2I with parent class

* removed 1 decoderator

* commenting viz_ints. need std

* unifying viz

* change fn call

* removed abstract class

* disable viz_ints

* rm bl comp

* l2i viz

* remove l2i fid

* add lens

* removed some metrics

* extra_metric fix

* removed another metric

* removed another metric

* starting to std viz

* inp fid

* fix ic

* removing metrics as they will be compute elsewhere

* viz piq

* viz piq remove mask_ll

* uniform piq viz

* PIQ fits parent class

* starting to unify metrics eval

* fixed metrics -- missing SPS and COMP

* linters

* lmac into template

* update lmac hparams

* minor

* not converging

* converging now

* computing metrics

* computing extra metrics

* extra metrics for l2i

* starting SPS and COMP

* Adds quantus SPS and COMP metrics to the refactoring code (#6)

* starting to add quantus metrics

* add sps and com

* quantus metrics L2I

* add quantus reqs

* removed unused file

* still throws strange error

* ood eval

* fixed paddedbatch stuff

* eval L2I

* remove useless files

* using right wham preparation

* removing model wrapper as it is not needed

* fix ID samples

* fix linters

* model finetuning test

* pretrained_PIQ -> pretrained_interpreter

* update README.md

* added README instructions for training with WHAM!

* removing the dataset tag on experiment name

* Fix Checks (#8)

* Skip lazy imports when the caller is inspect.py

This avoids having certain inspect functions import our lazy modules when we don't want them to. `getframeinfo` in particular appears to do it, and this gets called by PyTorch at some point. IPython might also be doing it but autocomplete still seems to work.

This does not appear to break anything. Added test for hyperpyyaml to ensure we're not breaking that.

* SSL_Semantic_Token _ new PR (#2509)

* remove unnecassry  files and move to dasb

* remove extra recepie from test

* update ljspeech qunatization recepie

* add discrete_ssl and remove extra files

* fix precommit

* update kmeans and add tokeizer for postprocessing

* fix precommit

* Update discrete_ssl.py

* fix clone warning

---------

Co-authored-by: Mirco Ravanelli <mirco.ravanelli@gmail.com>

* _ensure_module Raises docstring

* Expose `ensure_module` so that docs get generated for it

This is already an internal class anyway, and this is safe to call.

* Update actions/setup-python

* Use `uv` in test CI + merge some dep installs

The consequence is faster dependency installation. Merging some of the dependency installs helps avoid some packages being reinstalled from one line to the next. Additionally, CPU versions are specified when relevant, to avoid downloading CUDA stuff the CI can't use anyway.

* Use `uv` in doc CI + merge some dep installs

Similar rationale as for the test CI

* Parallelize doc generation with Sphinx

This does not affect the entire doc generation process but should allow some minor multithreading even with the 2-core CI workers.

* Enable `uv` caching on the test CI

* Enable `uv` caching on the docs CI

* CTC-only training recipes for LibriSpeech (code from Samsung AI Cambridge) (#2290)

CTC-only pre-training of conformer and branchformer.

---------

Co-authored-by: Shucong Zhang/Embedded AI /SRUK/Engineer/Samsung Electronics <s1.zhang@sruk-ccn4.eu.corp.samsungelectronics.net>
Co-authored-by: Adel Moumen <adelmoumen.pro@gmail.com>
Co-authored-by: Adel Moumen <88119391+Adel-Moumen@users.noreply.github.com>
Co-authored-by: Parcollet Titouan <titouan.parcollet@univ-avignon.fr>

* Update CommonVoice transformer recipes (code from Samsung AI Center Cambridge) (#2465)

* Update CV transformer recipes to match latest results with conformer.

---------

Co-authored-by: Titouan Parcollet/Embedded AI /SRUK/Engineer/Samsung Electronics <t.parcollet@sruk-ccn4.eu.corp.samsungelectronics.net>
Co-authored-by: Mirco Ravanelli <mirco.ravanelli@gmail.com>
Co-authored-by: Adel Moumen <adelmoumen.pro@gmail.com>

* Whisper improvements: flash attention, KV caching, lang_id, translation, training... (#2450)

Whisper improvements:
- flash attention
- kv caching
- lang identifaction
- translation
- finetuning amelioration 
... and more ...

* Update README.md

* precommit

* update zed download link (#2514)

* `RelPosEncXL` refactor and precision fixes (#2498)

* Add `RelPosEncXL.make_pe`, rework precision handling

* Rework RelPosEncXL output dtype selection

* Fix in-place input normalization when using `sentence`/`speaker` norm (#2504)

* fix LOCAL_RANK to be RANK in if_main_process (#2506)

* Fix Separation and Enhancement recipes behavior when NaN encountered (#2524)

* Fix Separation and Enhancement recipes behavior when NaN encountered

* Formatting using precommit hooks

* Lock torch version in requirements.txt (#2528)

* Fix compatibility for torchaudio versions without `.io` (#2532)

This avoids having the Python interpreter attempt to resolve the type annotation directly.

* fix docstrings

* consistency tests - classification

* consistency tests - classification

* consistency tests - interpret

* default to no wham

* fix after tests pass

* fix after tests pass

* tests after that

* fix consistency

---------

Co-authored-by: asu <sdelang@sdelang.fr>
Co-authored-by: Pooneh Mousavi <moosavi.pooneh@gmail.com>
Co-authored-by: Mirco Ravanelli <mirco.ravanelli@gmail.com>
Co-authored-by: shucongzhang <104781888+shucongzhang@users.noreply.github.com>
Co-authored-by: Shucong Zhang/Embedded AI /SRUK/Engineer/Samsung Electronics <s1.zhang@sruk-ccn4.eu.corp.samsungelectronics.net>
Co-authored-by: Adel Moumen <adelmoumen.pro@gmail.com>
Co-authored-by: Adel Moumen <88119391+Adel-Moumen@users.noreply.github.com>
Co-authored-by: Parcollet Titouan <titouan.parcollet@univ-avignon.fr>
Co-authored-by: Parcollet Titouan <parcollet.titouan@gmail.com>
Co-authored-by: Titouan Parcollet/Embedded AI /SRUK/Engineer/Samsung Electronics <t.parcollet@sruk-ccn4.eu.corp.samsungelectronics.net>
Co-authored-by: Yingzhi WANG <41187612+BenoitWang@users.noreply.github.com>
Co-authored-by: Peter Plantinga <plantinga.peter@protonmail.com>
Co-authored-by: Séverin <123748182+SevKod@users.noreply.github.com>

* added wham hparams to vit.yaml

* added focalnet wham hyperparams

* add eval info

* add automatic wham download

* additional instructions on README

* wham prepare uses explicit parameters

* wham docstrings

* edited the instructions on different contamination types

* removing the table

* revert changes to gitignore

* added comments on how to specify custom model

* precommit hooks

* fixed eval.py bug and more instructions in README.md

* remove checkpoint to avoid loading from exp folder

* load pretrained interpreter

* save always during test

* remove checkpointer call in eval.py

* added few more explanations for l2i

* fixed the nmf dictionary error

* fix viz argument for l2i

* added a comment for WHAM! noise

* setting the wham to False in vit and focalnet recipes

* fixed the faithfulness computation in PIQ and added AD AG AI COMPS SPS

* minor documentation improvements

* fixing the bug in SPS computation

* formatting

* Update README.md

* set manifest preparation to True

* fix device (not to add in yaml as it is a runnuing hparam)

* added the missing docstrings for complexity sparseness faithfulness

* fixed the header in eval.py

* added missing l2i command in train_l2i.py

* fixes to train_lmac.py

* description for classifier_temp

* added comments for pretrained_interpreter and ljspeech_path

* updated README to have more information on how to use LJSpeech

* added information for piq_vit.yaml and piq_focalnet.yaml

* added more explanation for LJSpeech downloading

* added missing use_melspectra_log1p attribute to piq_vit.yaml and piq_focalnet.yaml

* added an assert in eval.py for the pretrained path

* updates to the readme, added table, updated l2i to print quantus metrics

* Update README.md

* added the description of pretained_interpreter in README.md.

* fixed the problem in vit

* fixing l2i tests

* fixed ESC50.csv

* fixed the yaml tets

* added links to files

* fixed docstring tests

* bug fix on psi model

* removing the classes from PIQ.py

* fixes in L2I psi classes

* handling sps comp exceptions

* added the dropbox links

* Update README.md

---------

Co-authored-by: Cem Subakan <csubakan@gmail.com>
Co-authored-by: Francesco Paissan <fpaissan@cedar1.cedar.computecanada.ca>
Co-authored-by: asu <sdelang@sdelang.fr>
Co-authored-by: Pooneh Mousavi <moosavi.pooneh@gmail.com>
Co-authored-by: Mirco Ravanelli <mirco.ravanelli@gmail.com>
Co-authored-by: shucongzhang <104781888+shucongzhang@users.noreply.github.com>
Co-authored-by: Shucong Zhang/Embedded AI /SRUK/Engineer/Samsung Electronics <s1.zhang@sruk-ccn4.eu.corp.samsungelectronics.net>
Co-authored-by: Adel Moumen <adelmoumen.pro@gmail.com>
Co-authored-by: Adel Moumen <88119391+Adel-Moumen@users.noreply.github.com>
Co-authored-by: Parcollet Titouan <titouan.parcollet@univ-avignon.fr>
Co-authored-by: Parcollet Titouan <parcollet.titouan@gmail.com>
Co-authored-by: Titouan Parcollet/Embedded AI /SRUK/Engineer/Samsung Electronics <t.parcollet@sruk-ccn4.eu.corp.samsungelectronics.net>
Co-authored-by: Yingzhi WANG <41187612+BenoitWang@users.noreply.github.com>
Co-authored-by: Peter Plantinga <plantinga.peter@protonmail.com>
Co-authored-by: Séverin <123748182+SevKod@users.noreply.github.com>
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.

5 participants