pyabsa.tasks.AspectPolarityClassification.dataset_utils.__classic__.data_utils_for_inference

Module Contents

Classes

GloVeABSAInferenceDataset

An abstract class representing a Dataset.

class pyabsa.tasks.AspectPolarityClassification.dataset_utils.__classic__.data_utils_for_inference.GloVeABSAInferenceDataset(config, tokenizer)[source]

Bases: pyabsa.tasks.AspectPolarityClassification.dataset_utils.__lcf__.data_utils_for_inference.ABSAInferenceDataset

An abstract class representing a Dataset.

All datasets that represent a map from keys to data samples should subclass it. All subclasses should overwrite __getitem__(), supporting fetching a data sample for a given key. Subclasses could also optionally overwrite __len__(), which is expected to return the size of the dataset by many Sampler implementations and the default options of DataLoader.

Note

DataLoader by default constructs a index sampler that yields integral indices. To make it work with a map-style dataset with non-integral indices/keys, a custom sampler must be provided.

process_data(samples, ignore_error=True)[source]
__getitem__(index)[source]
__len__()[source]