cvangysel / pytrec_eval

pytrec_eval is an Information Retrieval evaluation tool for Python, based on the popular trec_eval.
http://ilps.science.uva.nl/
MIT License
282 stars 32 forks source link

kernel will die with empty inputs #13

Open amirj opened 5 years ago

amirj commented 5 years ago

providing empty qrel/run file leads to kernel crash!

qrel = {}
run = {}
evaluator = pytrec_eval.RelevanceEvaluator(qrel, pytrec_eval.supported_measures)
results = evaluator.evaluate(run)

It should be catched in anyway.

seanmacavaney commented 4 years ago

This should be fixed in here: https://github.com/seanmacavaney/pytrec_eval/blob/master/tests/pytrec_eval_tests.py#L224