Caching infrastructure for metamorph.ml train/predict operations.
This namespace provides flexible caching backends to store and retrieve results of machine learning training and prediction operations. This is useful for avoiding redundant computations when working with the same models and data.
Supported cache backends:
Usage: (enable-atom-cache! (atom {})) ; Enable in-memory caching ;; or (enable-disk-cache! "/tmp/ml-cache") ; Enable disk-based caching ;; or (enable-redis-cache! {...}) ; Enable Redis caching
To disable caching: (disable-cache!)
See individual function docs for more details on each backend.
Caching infrastructure for metamorph.ml train/predict operations.
This namespace provides flexible caching backends to store and retrieve results
of machine learning training and prediction operations. This is useful for
avoiding redundant computations when working with the same models and data.
Supported cache backends:
- **Atom cache**: In-memory caching using a Clojure atom (fast, ephemeral)
- **Disk cache**: File-based caching using Nippy serialization (persistent)
- **Redis cache**: Distributed caching via Redis (requires carmine library)
Usage:
(enable-atom-cache! (atom {})) ; Enable in-memory caching
;; or
(enable-disk-cache! "/tmp/ml-cache") ; Enable disk-based caching
;; or
(enable-redis-cache! {...}) ; Enable Redis caching
To disable caching:
(disable-cache!)
See individual function docs for more details on each backend.(disable-cache!)Disables caching of train/predict calls.
Resets the cache configuration to a disabled state. After calling this, train and predict operations will not use any caching mechanism.
See also: enable-atom-cache!, enable-disk-cache!, enable-redis-cache!
Disables caching of train/predict calls. Resets the cache configuration to a disabled state. After calling this, train and predict operations will not use any caching mechanism. See also: `enable-atom-cache!`, `enable-disk-cache!`, `enable-redis-cache!`
(enable-atom-cache! cache-atom)Enables the caching of train/predict calls in an atom.
cache-atom: Clojure atom used for caching.
Enables the caching of train/predict calls in an atom. `cache-atom`: Clojure atom used for caching.
(enable-disk-cache! cache-dir)Enables the caching of train/predict calls in an directory on disk.
cacche-dir: Directory used for caching.
Enables the caching of train/predict calls in an directory on disk. `cacche-dir`: Directory used for caching.
(enable-redis-cache! wcar-opts)Enables the caching of train/predict calls in an redis server using carmine library
wcar-opts: Clojure atom used for caching.
'com.taoensso/carmine' needed to be added as depenency
Enables the caching of train/predict calls in an redis server using [carmine](https://github.com/taoensso/carmine) library `wcar-opts`: Clojure atom used for caching. 'com.taoensso/carmine' needed to be added as depenency
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |