question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix source separation unit tests

See original GitHub issue

Tagging @faroit @ecmjohnson

At some point in the last six months, the regression tests for source separation have started failing, specifically on fixtures output00 (Images Frames - Source to Interference and Artifact) and output04 (Images - Source to Interference and Artifact).

Anyone know what’s going on here? The results are off by up to 1e-2 in some cases, so I don’t think this is up to json encoding round-off error. Maybe something changed under the hood in numpy or scipy since the fixtures were generated? If that’s all it is, then it should be a simple matter of revising the expected scores.

It looks like these fixtures were most recently updated by @ecmjohnson in #212 .

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
craffelcommented, Feb 27, 2017

B) relax the tolerance for passing the tests.

This seems fine to me.

0reactions
bmcfeecommented, Feb 25, 2017

I guess dropping blas-enabled numpy builds for the unit tests is not an option for you anaconda users, right?

They’re all blas enabled, it’s just a question of which blas. We could try to do a better job of matching the outputs to the test environments, but I think that’s sort of missing the point, and wouldn’t ensure that different users would get the same results on the same input anyway.

did you test with stock numpy vs. mkl or did you try even more blas backends?

I tried locally on these two numpy builds.

This one passes:

In [6]: np.__config__.show()
lapack_opt_info:
    library_dirs = ['/home/bmcfee/miniconda/envs/clean/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/home/bmcfee/miniconda/envs/clean/include']
    libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
blas_opt_info:
    library_dirs = ['/home/bmcfee/miniconda/envs/clean/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/home/bmcfee/miniconda/envs/clean/include']
    libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
lapack_mkl_info:
    library_dirs = ['/home/bmcfee/miniconda/envs/clean/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/home/bmcfee/miniconda/envs/clean/include']
    libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
openblas_lapack_info:
  NOT AVAILABLE
blas_mkl_info:
    library_dirs = ['/home/bmcfee/miniconda/envs/clean/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/home/bmcfee/miniconda/envs/clean/include']
    libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']

This one fails:

In [2]: np.__config__.show()
lapack_mkl_info:
  NOT AVAILABLE
openblas_info:
    language = c
    library_dirs = ['/home/bmcfee/miniconda/envs/py35/lib']
    define_macros = [('HAVE_CBLAS', None)]
    libraries = ['openblas', 'openblas']
blas_opt_info:
    language = c
    library_dirs = ['/home/bmcfee/miniconda/envs/py35/lib']
    define_macros = [('HAVE_CBLAS', None)]
    libraries = ['openblas', 'openblas']
blis_info:
  NOT AVAILABLE
blas_mkl_info:
  NOT AVAILABLE
openblas_lapack_info:
    language = c
    library_dirs = ['/home/bmcfee/miniconda/envs/py35/lib']
    define_macros = [('HAVE_CBLAS', None)]
    libraries = ['openblas', 'openblas']
lapack_opt_info:
    language = c
    library_dirs = ['/home/bmcfee/miniconda/envs/py35/lib']
    define_macros = [('HAVE_CBLAS', None)]
    libraries = ['openblas', 'openblas']
Read more comments on GitHub >

github_iconTop Results From Across the Web

Software Design, Separation Of Concerns & Unit Testing
In particular, adherence to the principles of separation of concerns and modular design can make software easier to test.
Read more >
How to Split JUnit Tests in a Continuous Integration Environment
In this tutorial you will learn how to split your JUnit tests, and why you need to split them if you're working on...
Read more >
separation of unit testing not working · Issue #294 - GitHub
Hello I wanted to keep unit testing files in separate folder out of app/, I wanted to keep the outside of app/ as...
Read more >
java - Separation of JUnit classes into special test package?
I put my test classes in the same package as what they are testing but in a different source folder or project. Organizing...
Read more >
unittest — Unit testing framework — Python 3.11.1 ...
Source code: Lib/unittest/__init__.py(If you are already familiar with the basic ... check that s.split fails when the separator is not a string with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found