Unverified Commit bcf29452 authored by Vít Novotný's avatar Vít Novotný
Browse files

Fix SIGSEGV

parent d284ca37
Pipeline #59123 failed with stage
...@@ -103,6 +103,8 @@ def get_ndcg(parsed_run, task, subset): ...@@ -103,6 +103,8 @@ def get_ndcg(parsed_run, task, subset):
""" """
evaluator = EVALUATORS[subset][task] evaluator = EVALUATORS[subset][task]
only_judged_parsed_run = _remove_nonjudged_topics_and_documents(parsed_run, task, subset) only_judged_parsed_run = _remove_nonjudged_topics_and_documents(parsed_run, task, subset)
if not only_judged_parsed_run:
return 0.0
evaluation = evaluator.evaluate(only_judged_parsed_run) evaluation = evaluator.evaluate(only_judged_parsed_run)
ndcg = np.mean([measures['ndcg'] for topic, measures in evaluation.items()]) ndcg = np.mean([measures['ndcg'] for topic, measures in evaluation.items()])
return ndcg return ndcg
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment