Skip to content

hf_dataset

allennlp.tango.hf_dataset

[SOURCE]


AllenNLP Tango is an experimental API and parts of it might change or disappear every time we release a new version.

HuggingfaceDataset

@Step.register("hf_dataset")
class HuggingfaceDataset(Step)

This steps reads a huggingface dataset and returns it in DatasetDict format.

DETERMINISTIC

class HuggingfaceDataset(Step):
 | ...
 | DETERMINISTIC = True

VERSION

class HuggingfaceDataset(Step):
 | ...
 | VERSION = "001"

CACHEABLE

class HuggingfaceDataset(Step):
 | ...
 | CACHEABLE = False

run

class HuggingfaceDataset(Step):
 | ...
 | def run(self, dataset_name: str) -> DatasetDict

Reads and returns a huggingface dataset. dataset_name is the name of the dataset.