sample

sample(
    model,
    *,
    draws=1000,
    tune=1000,
    chains=None,
    cores=None,
    nuts_sampler=None,
    instance=None,
    progress=True,
    cache=True,
    notify=False,
    **pm_sample_kwargs,
)

Run a single remote PyMC sampling job on Modal.

For repeated sampling with the same model, use the cp.cloud() context manager instead – it keeps the container warm and only ships sample kwargs after the first call.