utils#
This package contains utility functions used by all datasets, including the base dataset class (ContinualDataset).
Functions#
- datasets.utils.build_torchvision_transform(transform_specs)[source]#
Builds the transformation pipeline from the given specifications.
- Parameters:
transform_specs (List[dict]) – the specifications of the transformations
- Returns:
the transformation pipeline
- Return type:
transforms.Compose
- datasets.utils.get_default_args_for_dataset(dataset_name)[source]#
Get the default arguments defined by set_default_from_args for the given dataset.
- datasets.utils.is_static_call(*args)[source]#
Check if the function is called without any arguments.
- Returns:
True if the function is called without any arguments, False otherwise.
- Return type:
- datasets.utils.load_dataset_config(dataset_config, dataset)[source]#
Loads the configuration file for the dataset.
- datasets.utils.set_default_from_args(arg_name)[source]#
Decorator to define the default value of an argument of a given dataset.
- Parameters:
arg_name (str) – The name of the argument to set the default value for.
- Returns:
The decorator to set the default value of the argument.
- Return type:
function
- datasets.utils.build_torchvision_transform(transform_specs)[source]#
Builds the transformation pipeline from the given specifications.
- Parameters:
transform_specs (List[dict]) – the specifications of the transformations
- Returns:
the transformation pipeline
- Return type:
transforms.Compose
- datasets.utils.get_default_args_for_dataset(dataset_name)[source]#
Get the default arguments defined by set_default_from_args for the given dataset.
- datasets.utils.is_static_call(*args)[source]#
Check if the function is called without any arguments.
- Returns:
True if the function is called without any arguments, False otherwise.
- Return type: