langtest.utils.hf_utils.build_dataset#

build_dataset(dataset_name: str, dataset_subset: str, label_name: str, text_fields: List[str], natural_language_labels: List[str]) Tuple[Dict[str, str], Dict[str, str], bool]#

Uses inputted dataset details to build dictionaries of train/test values.

Parameters:
  • dataset_name (str) – The name of the dataset.

  • dataset_subset (str) – The name of the dataset subset.

  • label_name (str) – The name of the label.

  • text_fields (List[str]) – The list of text fields.

  • natural_language_labels (List[str]) – The list of natural language labels.

Returns:

A tuple containing train and test dictionaries and a boolean indicating the presence of validation data.

Return type:

Tuple[Dict[str, str], Dict[str, str], bool]