CSTR-Edinburgh / merlin

This is now the official location of the Merlin project.
http://www.cstr.ed.ac.uk/projects/merlin/
Apache License 2.0
1.31k stars 440 forks source link

TypeError: No loop matching the specified signature and casting was found for ufunc add #466

Closed mirfan899 closed 5 years ago

mirfan899 commented 5 years ago

I'm getting the following error on Google VM using Ubuntu 18.04, Python 3.6 when I try to run /merlin/egs/slt_arctic/s1 recipe.

  File "/home/virtuoso_irfan/merlin/src/run_merlin.py", line 1020, in main_function
    valid_dur_rmse, valid_dur_corr = calculator.compute_distortion(valid_file_id_list, ref_data_dir, gen_dir, cfg.dur_ext, cfg.dur_dim)
  File "/home/virtuoso_irfan/merlin/src/utils/compute_distortion.py", line 206, in compute_distortion
    dur_corr = self.compute_corr(ref_all_files_data, gen_all_files_data)
  File "/home/virtuoso_irfan/merlin/src/utils/compute_distortion.py", line 257, in compute_corr
    corr_coef = pearsonr(ref_data, gen_data)
  File "/home/virtuoso_irfan/.local/lib/python3.6/site-packages/scipy/stats/stats.py", line 3410, in pearsonr
    xmean = x.mean(dtype=dtype)
  File "/home/virtuoso_irfan/.local/lib/python3.6/site-packages/numpy/core/_methods.py", line 75, in _mean
    ret = umr_sum(arr, axis, dtype, out, keepdims)
TypeError: No loop matching the specified signature and casting
was found for ufunc add
mirfan899 commented 5 years ago

The issue is with numpy version, reverting back to 1.15 fixed the issue.

Hallicopter commented 5 years ago

I tried switching back to numpy 1.15, but now I get a different error while running the demo:

Traceback (most recent call last):
  File "/home/advait/Documents/Merlin/merlin/src/run_merlin.py", line 65, in <module>
    from frontend.parameter_generation import ParameterGeneration
  File "/home/advait/Documents/Merlin/merlin/src/frontend/parameter_generation.py", line 50, in <module>
    from .mlpg_fast import MLParameterGenerationFast as MLParameterGeneration
  File "/home/advait/Documents/Merlin/merlin/src/frontend/mlpg_fast.py", line 53, in <module>
    import bandmat as bm
  File "/usr/local/lib/python3.5/dist-packages/bandmat/__init__.py", line 99, in <module>
    from bandmat.core import *
  File "__init__.pxd", line 861, in init bandmat.core (bandmat/core.c:13778)
ValueError: numpy.ufunc has the wrong size, try recompiling
Addishiwot commented 5 years ago

i have this exact same issue. reverting numpy to 1.15 did not help me fix it either

mirfan899 commented 5 years ago

Okay, you can change the version to numpy==1.13.1. For my conda environment is also working.

Addishiwot commented 5 years ago

hi Mirfan Thanks for your info. Deactivating my virtual environment, and the re-installing the packages globally worked fine. i used numpy (1.13.3). Not really sure though why they did not specify working versions of all the needed packages in the requirments.txt file.