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

Spectrograms Not Equal When Running Tests #9

Open
jvel07 opened this issue Nov 27, 2023 · 1 comment
Open

Spectrograms Not Equal When Running Tests #9

jvel07 opened this issue Nov 27, 2023 · 1 comment

Comments

@jvel07
Copy link

jvel07 commented Nov 27, 2023

Hi, thanks for the repo, seems to be promising. We have run some tests with your test file and got:

AssertionError: 
Not equal to tolerance rtol=1e-07, atol=0.0001
(shapes (513, 30), (513, 1, 14977) mismatch)
 x: array([[4.878030e-09, 4.919218e-07, 3.511721e-04, ..., 1.196331e-01,
        3.467581e-02, 9.270541e-03],
       [1.071588e-08, 1.510490e-06, 3.254034e-04, ..., 9.578773e-02,...
 y: array([[[4.892740e-09, 5.184347e-09, 5.963557e-09, ..., 1.972358e-02,
         1.956094e-02, 1.939876e-02]],

This is just for the spectrograms --not currently testing mel_specs. We are testing test_melpec_vs_torchaudio().
Any ideas on the possible reasons?

UPDATE: similar outcome with test_melpec_vs_librosa()

@urinieto
Copy link
Collaborator

urinieto commented Feb 13, 2024

Apologies for the huge delay. I just re-ran the tests and they are all passing on my macOS arm64 machine:

❯ python -m unittest test_equivalence
/Users/onieto/micromamba/envs/convspec/lib/python3.9/site-packages/librosa/util/files.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import resource_filename
/Users/onieto/micromamba/envs/convspec/lib/python3.9/site-packages/pkg_resources/__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
Enabling ConvertibleSpectrogram debug hooks
.Enabling ConvertibleSpectrogram debug hooks
.
----------------------------------------------------------------------
Ran 2 tests in 0.703s

OK
Deleting ConvertibleSpectrogram debug hooks
Deleting ConvertibleSpectrogram debug hooks

To reproduce this, I basically created a micromamba environment called convspec as follows (conda should work too):

micromamba env create -n convspec python=3.9
micromamba activate convspec
pip install -e .

And then ran the tests as showed above.

What system are you trying this on?

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

No branches or pull requests

2 participants