Skip to content

Caching

Per default, the pipeline output is cached (temporarily stored), to avoid unnecessary reruns of previously computed steps. Yet, for consistency, changes in configuration parameters trigger automatic reruns of previous steps.

Info

To force rerunning a given step, run the pipeline with the option: --no-cache.

memory_location module-attribute

Python
memory_location: PathLike | bool | None = True

If not None (or False), caching will be enabled and the cache files will be stored in the given directory. The default (True) will use a "_cache" subdirectory (name configurable via the memory_subdir variable) in the BIDS derivative root of the dataset.

memory_subdir module-attribute

Python
memory_subdir: str = '_cache'

The caching directory name to use if memory_location is True.

memory_file_method module-attribute

Python
memory_file_method: Literal['mtime', 'hash'] = 'mtime'

The method to use for cache invalidation (i.e., detecting changes). Using the "modified time" reported by the filesystem ('mtime', default) is very fast but requires that the filesystem supports proper mtime reporting. Using file hashes ('hash') is slower and requires reading all input files but should work on any filesystem.

memory_verbose module-attribute

Python
memory_verbose: int = 0

The verbosity to use when using memory. The default (0) does not print, while 1 will print the function calls that will be cached. See the documentation for the joblib.Memory class for more information.