We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c95ee0c commit 38eafd2Copy full SHA for 38eafd2
1 file changed
src/tfbench/load.py
@@ -35,5 +35,5 @@ def load_tfb_from_hf(split: str = "base") -> list[BenchmarkTask]:
35
36
def load_gen_results_jsonl(result_file: str) -> list[LMAnswer | None]:
37
"""load generation results from a jsonl file"""
38
- objs: list[dict[str, str | None]] = orjsonl.load(result_file) # type: ignore
39
- return [from_dict(LMAnswer, obj) for obj in objs]
+ objs: list[dict[str, str]] = orjsonl.load(result_file) # type: ignore
+ return [from_dict(LMAnswer, obj) if "answer" in obj else None for obj in objs]
0 commit comments