API reference

Core

The one-line cloud sampling API.

cloud Context manager that intercepts PyMC operations with remote execution,
sample Run a single remote PyMC sampling job on Modal.
map Fit many models in parallel on the cloud.
cleanup_volumes Delete the Modal Volume for a single project.
cleanup_cache Delete the local disk cache tree. Returns the number of entries removed.

Configuration

Right-size the remote VM.

config.RemoteConfig Configuration for remote sampling.

Caching

Result caches (in-memory and on-disk).

cache.MemoryCache In-memory LRU cache. Fast, lives for the session.
cache.DiskCache Persistent disk cache with human-readable directory hierarchy.