pyabsa.tasks.RNAClassification.dataset_utils.data_utils_for_inference
Module Contents
Classes
An abstract class representing a |
|
An abstract class representing a |
|
An abstract class representing a |
- class pyabsa.tasks.RNAClassification.dataset_utils.data_utils_for_inference.RNACInferenceDataset(config, tokenizer, dataset_type='infer')[source]
Bases:
torch.utils.data.Dataset
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 manySampler
implementations and the default options ofDataLoader
.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.
- class pyabsa.tasks.RNAClassification.dataset_utils.data_utils_for_inference.BERTRNACInferenceDataset(config, tokenizer, dataset_type='infer')[source]
Bases:
RNACInferenceDataset
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 manySampler
implementations and the default options ofDataLoader
.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.
- class pyabsa.tasks.RNAClassification.dataset_utils.data_utils_for_inference.GloVeRNACInferenceDataset(config, tokenizer, dataset_type='infer')[source]
Bases:
RNACInferenceDataset
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 manySampler
implementations and the default options ofDataLoader
.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.