baybe.utils.basic.cache_to_disk

baybe.utils.basic.cache_to_disk(func: Callable, /)[source]

Cache a callable to the filesystem using joblib.Memory.

Allows for persistent caching across different Python sessions. The cache directory is retrieved on-the-fly from the global settings configuration.

Parameters:

func (Callable) – The callable to be cached.

Return type:

Callable

Returns:

A wrapped version of the function with filesystem caching enabled.