bootphon / ABXpy

ABX discrimination task in python
https://docs.cognitive-ml.fr/ABXpy
MIT License
43 stars 16 forks source link

make test fails on master #18

Closed RobinAlgayres closed 4 years ago

RobinAlgayres commented 4 years ago

I followed the README procedure on RedHat Linux 7.

conda env create -n abx -f environment.yml source activate abx make install make test

And I get after make test "6 failed, 15 passed, 2 warnings in 17.17s"

More precisely the error is:

def dtw_cosine_distance(x, y, normalized): return dtw.dtw(x, y, cosine.cosine_distance, normalized) E AttributeError: module 'ABXpy.distances.metrics.dtw' has no attribute 'dtw'

If I run abx-distance I get this error:

Job 1: computing distances for block 0 on 199 Traceback (most recent call last): File "/gpfswork/rech/jvn/uul35qx/.conda/envs/ralg_env/bin/abx-distance", line 11, in sys.exit(main()) File "/gpfswork/rech/jvn/uul35qx/.conda/envs/ralg_env/lib/python3.6/site-packages/ABXpy/distance.py", line 93, in main distance=args.distance, njobs=args.njobs, group=args.group) File "/gpfswork/rech/jvn/uul35qx/.conda/envs/ralg_env/lib/python3.6/site-packages/ABXpy/distance.py", line 46, in run distancefun, normalized=normalized, n_cpu=njobs) File "/gpfswork/rech/jvn/uul35qx/.conda/envs/ralg_env/lib/python3.6/site-packages/ABXpy/distances/distances.py", line 316, in comput e_distances feature_files, feature_groups, splitted_features, 1, normalized) File "/gpfswork/rech/jvn/uul35qx/.conda/envs/ralg_env/lib/python3.6/site-packages/ABXpy/distances/distances.py", line 199, in run_di stance_job by_db = store['featdbs/' + by] TypeError: must be str, not numpy.bytes

mmmaat commented 4 years ago

Hi Robin!

I cannot replicate your issue. On a CentOS 6 machine (you know it as oberon ;) ) I did:

git clone git@github.com:bootphon/ABXpy.git
cd ABXpy
conda env create -n abx-test -f environment.yml
source activate abx-test
make develop  # instead of make install to avoid using sudo
make test

All the tests are passing as expected.

RobinAlgayres commented 4 years ago

Indeed it was the make install. I cannot use sudo on my cluster but the "make develop" worked fine!

Thank you!