Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit 05aa705

Browse files
authored
fix: fix the bug of considering the Path as a str when loading from TREC dataset (allenai#247)
1 parent c7e61da commit 05aa705

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ir_datasets/formats/trec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def _docs_iter(self, path):
159159
elif path_suffix in ['.z', '.0z', '.1z', '.2z']:
160160
# unix "compress" command encoding
161161
unlzw3 = ir_datasets.lazy_libs.unlzw3()
162-
with io.BytesIO(unlzw3.unlzw(path)) as f:
162+
with io.BytesIO(unlzw3.unlzw(Path(path))) as f:
163163
yield from self._parser(f)
164164
else:
165165
with open(path, 'rb') as f:

0 commit comments

Comments
 (0)