moabb.datasets.base.CacheConfig#
- class moabb.datasets.base.CacheConfig(save_raw: bool = False, save_epochs: bool = False, save_array: bool = False, use: bool = False, overwrite_raw: bool = False, overwrite_epochs: bool = False, overwrite_array: bool = False, path: str | Path = None, verbose: str = None)[source]#
Bases:
objectConfiguration for caching of datasets.
- Parameters:
save_* (bool) – This flag specifies whether to save the output of the corresponding step to disk.
use (bool) – This flag specifies whether to use the disk cache in case it exists. If True, the Raw or Epochs objects returned will not be preloaded (this saves some time). Otherwise, they will be preloaded. The save_* and overwrite_* keys apply regardless of this flag.
overwrite_* (bool) – This flag specifies whether to erase the corresponding disk cache in case it exists, before re-processing the data.
path (None | str) – Location of where to look for the data storing location. If None, the environment variable or config parameter
MNE_DATASETS_(signifier)_PATHis used. If it doesn’t exist, the “~/mne_data” directory is used. If the dataset is not found under the given path, the data will be automatically downloaded to the specified folder.verbose (str) – Verbosity level. See mne.verbose.
Notes
Added in version 1.0.0.
- __hash__ = None#
- __init__(save_raw: bool = False, save_epochs: bool = False, save_array: bool = False, use: bool = False, overwrite_raw: bool = False, overwrite_epochs: bool = False, overwrite_array: bool = False, path: str | Path = None, verbose: str = None) None[source]#
- classmethod make(dic: None | Dict | CacheConfig = None) CacheConfig[source]#
Create a CacheConfig object from a dict or another CacheConfig object.
Examples
Using default parameters:
>>> CacheConfig.make()
From a dict:
>>> dic = {"save_raw": True, "use": True} >>> CacheConfig.make(dic)