3 ms·
What's the difference to using joblibs Memory class similar to this implementation: https://github.com/stanfordnlp/dspy/blob/main/dsp/modules/cache_utils.py ht
by rassibassi 3y ago
What's the difference to using joblibs Memory class similar to this implementation:
https://github.com/stanfordnlp/dspy/blob/main/dsp/modules/cache_utils.py https://github.com/stanfordnlp/dspy/blob/main/dsp/modules/ca...
- khaledh 3y agoI was going to mention this as well. It's fairly similar: memory = joblib.memory.Memory(...) @memory.cache def slow_func(...): ...
- rassibassi 3y agoThe diskcache docs state: """ Caching Libraries joblib.Memory provides caching functions and works by explicitly saving the inputs and outputs to files. It is designed to work with non-hashable and potentially large input and output data types such as numpy arrays. """ From https://pypi.org/project/diskcache/ https://pypi.org/project/diskcache/
- williamzeng0 3y agoThis is great! I see it also supports an 'ignore' parameter.