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: Optional[Union[str, Path]] = None, verbose: Optional[str] = None)[source]#

Configuration 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. If use is False, the save_* and overwrite_* keys will be ignored.

  • overwrite_* (bool) – This flag specifies whether to overwrite the disk cache in case it exist.

  • path (None | str) – Location of where to look for the data storing location. If None, the environment variable or config parameter MNE_DATASETS_(signifier)_PATH is 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

New in version 1.0.0.

__hash__ = None#
classmethod make(dic: Union[None, Dict, CacheConfig] = None) CacheConfig[source]#

Create a CacheConfig object from a dict or another CacheConfig object.

Examples

Using default parameters:

>>> CacheConfig.make()
CacheConfig(save=True, use=True, overwrite=True, path=None)

From a dict:

>>> dic = {'save': False}
>>> CacheConfig.make(dic)
CacheConfig(save=False, use=True, overwrite=True, path=None)