types

Classes

BaseData([id])

A common dataclass for representing examples in a dataset.

Example([id, question, answer])

A common dataclass for representing examples in a dataset.

GSM8KData([id, question, answer, ...])

A dataclass for representing examples in the GSM8K dataset.

HotPotQAData([id, question, answer, ...])

A dataclass for representing examples in the HotPotQA dataset.

TrecData([id, question, class_name, class_index])

A dataclass for representing examples in the TREC dataset.

class BaseData(id: str = 'e8f1eed0-1cd4-486e-b43c-2cf5927a7fc2')[source]

Bases: DataClass

A common dataclass for representing examples in a dataset.

id: str = 'e8f1eed0-1cd4-486e-b43c-2cf5927a7fc2'
class Example(id: str = '9df2c18a-470c-4c27-ae44-e237ce1236d2', question: str = None, answer: str = None)[source]

Bases: DataClass

A common dataclass for representing examples in a dataset.

id: str = '9df2c18a-470c-4c27-ae44-e237ce1236d2'
question: str = None
answer: str = None
class GSM8KData(id: str = '9df2c18a-470c-4c27-ae44-e237ce1236d2', question: str = None, answer: str = None, gold_reasoning: str = None, reasoning: str = None)[source]

Bases: Example

A dataclass for representing examples in the GSM8K dataset.

You can reset the output fields:

GSM8KData.set_output_fields(["answer"])
gold_reasoning: str = None
reasoning: str = None
class HotPotQAData(id: str = '9df2c18a-470c-4c27-ae44-e237ce1236d2', question: str = None, answer: str = None, gold_titles: set = None, context: Dict[str, object] = None)[source]

Bases: Example

A dataclass for representing examples in the HotPotQA dataset.

gold_titles: set = None
context: Dict[str, object] = None
class TrecData(id: str = 'e8f1eed0-1cd4-486e-b43c-2cf5927a7fc2', question: str = None, class_name: str = None, class_index: int = -1)[source]

Bases: BaseData

A dataclass for representing examples in the TREC dataset.

question: str = None
class_name: str = None
class_index: int = -1