Skip to content

Commit a9dc2bd

Browse files
author
mat_vast
committed
2 parents 2fe26cd + 008d72e commit a9dc2bd

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

src/datamaestro_text/config/com/github/apple/ml-qrecc.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@
2525
checker=HashCheck("f88fcc7ef3678cd6312080389c8abd67"),
2626
)
2727
@dataset(
28-
Supervised[QReCCDataset, None, QReCCDataset],
2928
url="https://github.com/apple/ml-qrecc",
3029
doi="https://doi.org/10.48550/arXiv.2010.04898",
3130
id="",
3231
)
33-
def main(data: Path):
32+
def main(data: Path) -> Supervised[QReCCDataset, None, QReCCDataset]:
3433
"""Open-Domain Question Answering Goes Conversational via Question Rewriting
3534
3635
We introduce QReCC (Question Rewriting in Conversational Context), an
@@ -40,10 +39,10 @@ def main(data: Path):
4039
answering that includes the individual subtasks of question rewriting,
4140
passage retrieval and reading comprehension
4241
"""
43-
return {
44-
"train": QReCCDataset(path=data / "qrecc_train.json"),
45-
"test": QReCCDataset(path=data / "qrecc_test.json"),
46-
}
42+
return Supervised(
43+
train=QReCCDataset(path=data / "qrecc_train.json"),
44+
test=QReCCDataset(path=data / "qrecc_test.json"),
45+
)
4746

4847

4948
@dataset(
@@ -52,7 +51,6 @@ def main(data: Path):
5251
)
5352
class Content(LZ4JSONLDocumentStore):
5453
"""QReCC mentionned URLs content"""
55-
5654
@staticmethod
5755
def __create_dataset__(dataset, options=None):
5856
ds = reference(reference=main).setup(dataset, options)
@@ -67,7 +65,7 @@ def __create_dataset__(dataset, options=None):
6765
"id",
6866
).setup(dataset, options)
6967

70-
return LZ4JSONLDocumentStore(jsonl_path=store_path)
68+
return Content(jsonl_path=store_path)
7169

7270
@staticmethod
7371
def _documents(path: Path):

src/datamaestro_text/data/conversation/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def children(self) -> List["ConversationNode"]:
129129

130130

131131
class ConversationTree(ABC):
132+
"""Represents a conversation tree"""
132133
@abstractmethod
133134
def root(self) -> ConversationNode:
134135
...

src/datamaestro_text/data/conversation/orconvqa.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from functools import cached_property
21
from typing import Iterator, List, Optional
32
from attr import define
43
import json

0 commit comments

Comments
 (0)