Liking cljdoc? Tell your friends :D

scicloj.metamorph.ml.cache

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.

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.
raw docstring

disable-cache!clj

(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!`
sourceraw docstring

enable-atom-cache!clj

(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.

sourceraw docstring

enable-disk-cache!clj

(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.

sourceraw docstring

enable-redis-cache!clj

(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

sourceraw docstring

when-requiring-resolve-macrocljmacro

(when-requiring-resolve-macro sym & body)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close