nip.code_validation.data.AppsCodeValidationDataset#
- class nip.code_validation.data.AppsCodeValidationDataset(hyper_params: HyperParameters, settings: ExperimentSettings, protocol_handler: ProtocolHandler, split: Literal['train', 'test', 'validation'] = 'train')[source]#
The APPS [HBK+21] dataset for code validation.
Methods Summary
__getitem__(index)__init__(hyper_params, settings, ...[, split])__len__()__repr__()Return repr(self).
Load the dataset.
_process_data(raw_dataset)Process the dataset.
_reduce_dataset_size(dataset)Reduce the size of a dataset if necessary.
Attributes
dataset_filepath_nameThe name of the dataset file.
instance_keysThe keys specifying the input instance.
keysThe keys (field names) in the dataset.
max_test_sizeThe maximum size of the test set.
max_train_sizeThe maximum size of the training set.
processed_dirThe path to the directory containing the processed data.
raw_dirThe path to the directory containing the raw data.
reduce_shuffle_seedThe seed used to shuffle the dataset before reducing its size.
split_dirThe name of the folder containing the split data.
validation_proportionThe proportion of the training set to use for validation.
Methods
- __getitem__(index: Any) NestedArrayDict[source]#
- __init__(hyper_params: HyperParameters, settings: ExperimentSettings, protocol_handler: ProtocolHandler, split: Literal['train', 'test', 'validation'] = 'train')[source]#
- _load_raw_dataset() Dataset[source]#
Load the dataset.
- Returns:
raw_data (HuggingFaceDataset) – The unprocessed dataset.