serenayj / PyrEval

Automated Pyramid Summarization Evaluation
GNU General Public License v3.0
11 stars 5 forks source link

Error in Step 4: IndexError: cannot do a non-empty take from an empty axes. #8

Closed abdullahkhilji closed 4 years ago

abdullahkhilji commented 4 years ago
0
0
0
Traceback (most recent call last):
  File "/Users/abdullahkhilji/Extras/GitHub/PyrEval/Pyramid/pyramid.py", line 94, in <module>
    BigSet2 = pairwise(segmentpool, N, threshold)
  File "/Users/abdullahkhilji/Extras/GitHub/PyrEval/Pyramid/lib_pyramid.py", line 341, in pairwise
    Q3 = np.percentile(np.asarray(scores), threshold)
  File "/Users/abdullahkhilji/miniconda3/envs/pyreval/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3707, in percentile
    a, q, axis, out, overwrite_input, interpolation, keepdims)
  File "/Users/abdullahkhilji/miniconda3/envs/pyreval/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3826, in _quantile_unchecked
    interpolation=interpolation)
  File "/Users/abdullahkhilji/miniconda3/envs/pyreval/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3405, in _ureduce
    r = func(a, **kwargs)
  File "/Users/abdullahkhilji/miniconda3/envs/pyreval/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3941, in _quantile_ureduce_func
    x1 = take(ap, indices_below, axis=axis) * weights_below
  File "/Users/abdullahkhilji/miniconda3/envs/pyreval/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 189, in take
    return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)
  File "/Users/abdullahkhilji/miniconda3/envs/pyreval/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 56, in _wrapfunc
    return getattr(obj, method)(*args, **kwds)
IndexError: cannot do a non-empty take from an empty axes.
serenayj commented 4 years ago

Hi, it seems that the pyramid algorithm cannot find its input files. Could you check if you see the .ls, .segs files under some folders named by number inside PyrEval-master/Preprocess/wise_crowd_summaires?

abdullahkhilji commented 4 years ago

Thanks for the reply :) Under peer_summaries and wise_crowd_summaries there are .out files generated from step 3. But there are no *.ls, *.segs files present. Is there any file name specification for the files placed in Raw/model and Raw/peers? I have named the peer and system file both as 1.txt and 1.txt, 2.txt and 2.txt, etc.

abdullahkhilji commented 4 years ago

Same error on both macOS Catalina and Ubuntu 16.04

serenayj commented 4 years ago

This is because the Stanford corenlp package is too new. We used an older version, which generated .xml file instead of .out file. So the preprocessor in PyrEval failed to process the .xml files and execute the subsequent steps. I uploaded the Stanford package we were using that is compatible with current PyrEval, which could be found here: link. You could download and replace it with the one you had and rerun PyrEval. Let me know if you could download them.

We have realized this incompatible dependencies and currently we are working on upgrading PyrEval with the new dependencies.

abdullahkhilji commented 4 years ago

Thanks a lot !! The *.lg and *.segs files are generated and the step 4 is completed without any error :)