Currently some error messages are not quite helpful to identify the problem, say:
when the runfile is somehow broken (e.g. if anserini was interrupted during the searching and left the runfile halfly written)
File "~/anaconda3/envs/MyCapreolus/lib/python3.7/site-packages/capreolus/evaluator.py", line 131, in search_best_run
runs = Searcher.load_trec_run(runfile)
File "~/anaconda3/envs/MyCapreolus/lib/python3.7/site-packages/capreolus/searcher/__init__.py", line 38, in load_trec_run
qid, _, docid, rank, score, desc = line.split(" ")
ValueError: not enough values to unpack (expected 6, got 1)
when runfile does not contain any qid in test set:
~/anaconda3/envs/MyCapreolus/lib/python3.7/site-packages/capreolus/evaluator.py:56: RuntimeWarning: Mean of empty slice.
scores = np.array(scores).mean(axis=0).tolist()
~/anaconda3/envs/MyCapreolus/lib/python3.7/site-packages/numpy/core/_methods.py:170: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
Traceback (most recent call last):
...
File "~/anaconda3/envs/MyCapreolus/lib/python3.7/site-packages/capreolus/task/rerank.py", line 42, in train
rank_results = self.rank.evaluate()
File "~/anaconda3/envs/MyCapreolus/lib/python3.7/site-packages/capreolus/task/rank.py", line 55, in evaluate
self.get_results_path(), self.benchmark, primary_metric=self.config["optimize"], metrics=metrics
File "~/anaconda3/envs/MyCapreolus/lib/python3.7/site-packages/capreolus/evaluator.py", line 138, in search_best_run
benchmark.relevance_level,
File "~/anaconda3/envs/MyCapreolus/lib/python3.7/site-packages/capreolus/evaluator.py", line 57, in _eval_runs
scores = dict(zip(metrics, scores))
TypeError: zip argument #2 must support iteration
Todo: handle these errors in a way that even first time users would know what's happening
Currently some error messages are not quite helpful to identify the problem, say:
when the runfile is somehow broken (e.g. if anserini was interrupted during the searching and left the runfile halfly written)
when runfile does not contain any qid in test set:
Todo: handle these errors in a way that even first time users would know what's happening