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

Recipe Tests Fix for SB 1.0.1 #2523

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft

Recipe Tests Fix for SB 1.0.1 #2523

wants to merge 5 commits into from

Conversation

Adel-Moumen
Copy link
Collaborator

What does this PR do?

Before submitting
  • Did you read the contributor guideline?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Does your code adhere to project-specific code style and conventions?

PR review

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified
  • Confirm that the changes adhere to compatibility requirements (e.g., Python version, platform)
  • Review the self-review checklist to ensure the code is ready for review

@Adel-Moumen
Copy link
Collaborator Author

Hello @flexthink,

Could you please have a look at the recipe tests of the AudioMNIST dataset? They are all failing. I tried to fix the first three but I'd like to get your support w.r.t what I did and the last one. It seems that they are some unexpected arguments such as lens, length in the diffusion train_sample_latent method. There's also a mismatch device issue.

To run the recipe tests on this dataset:

python -c 'from tests.utils.recipe_tests import run_recipe_tests; print("TEST FAILED!") if not(run_recipe_tests(filters_fields=["Dataset"], filters=[["AudioMNIST"]], do_checks=False, run_opts="--device=cuda")) else print("TEST PASSED")'

Please commit on this PR. Thanks!

CC: @mravanelli

@Adel-Moumen
Copy link
Collaborator Author

Issue with REAL-M_row_02:

    fast_rir_builder(ir, time, alpha, visibility.astype(np.int32), Fs, fdl)
  File "pyroomacoustics/build_rir.pyx", line 53, in pyroomacoustics.build_rir.fast_rir_builder
AssertionError

To repro:

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/REAL-M/sisnr-estimation/hparams/pool_sisnrestimator.yaml']], do_checks=False, run_opts='--device=cuda')) else print('TEST PASSED')"

Could you please have a look @ycemsubakan ? Thanks :)

@ycemsubakan
Copy link
Collaborator

Issue with REAL-M_row_02:

    fast_rir_builder(ir, time, alpha, visibility.astype(np.int32), Fs, fdl)
  File "pyroomacoustics/build_rir.pyx", line 53, in pyroomacoustics.build_rir.fast_rir_builder
AssertionError

To repro:

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/REAL-M/sisnr-estimation/hparams/pool_sisnrestimator.yaml']], do_checks=False, run_opts='--device=cuda')) else print('TEST PASSED')"

Could you please have a look @ycemsubakan ? Thanks :)

I will try to but It might take me some time to take a look at this as I am travelling.. Feel free to ping me next week if I don't do it sooner. Thanks.

@Adel-Moumen
Copy link
Collaborator Author

Ping @flexthink :p

@Adel-Moumen Adel-Moumen added this to the v1.0.1 milestone Apr 30, 2024
@Adel-Moumen Adel-Moumen changed the title Recipe Tests Fix for SB 1.01 Recipe Tests Fix for SB 1.0.1 Apr 30, 2024
@flexthink
Copy link
Collaborator

Hello @flexthink,

Could you please have a look at the recipe tests of the AudioMNIST dataset? They are all failing. I tried to fix the first three but I'd like to get your support w.r.t what I did and the last one. It seems that they are some unexpected arguments such as lens, length in the diffusion train_sample_latent method. There's also a mismatch device issue.

To run the recipe tests on this dataset:

python -c 'from tests.utils.recipe_tests import run_recipe_tests; print("TEST FAILED!") if not(run_recipe_tests(filters_fields=["Dataset"], filters=[["AudioMNIST"]], do_checks=False, run_opts="--device=cuda")) else print("TEST PASSED")'

Please commit on this PR. Thanks!

CC: @mravanelli

I found the reason why it is failing. Previously, the model deliberately accepted (and dropped) arbitrary kwargs. This was by design - the idea was to keep the diffusion model independent of the model - while retaining the additional flexibility to pass additional parameters. If we can't have kwargs (e.g. for TorchScript), we'd have to do something else (e.g. filter arguments from the diffusion side). Lengths are used by diffusion but not by UNet... however, models other than UNet (e.g. Transformers) might need lengths.

d4c9f39#diff-9a1eb377a4eaf3ea93b8fd5e980931f6346c38db635ed41f8cebe6437e1382c0
image

@flexthink
Copy link
Collaborator

flexthink commented May 6, 2024

I have a fix

#2540

@Adel-Moumen @mravanelli

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.

None yet

3 participants