Skip to main content

bayescycle

Bayescycle is the Python workflow CLI between Bayeswire model files and either the Bayesite Rust engine (default) or the optional Bayesjax in-process backend. It owns canonical workflow inputs, run-directory paths and provenance, backend planning, and replay—not model or sampler semantics.

Install and sample

uv tool install bayescycle
bayescycle sample model.py --data data.json -o run/

The default installation contains only Bayescycle and stdlib-only Bayeswire. The first Bayesite-backed command downloads and SHA-256-verifies the pinned engine release when no suitable executable is on PATH.

A completed conditioning run contains at least:

run/
  model.ir.json
  data.json
  posterior.ndjson
  run.json

Use --show-plan to inspect the backend action without writing a run directory. When a file has multiple root models, select one with --model ModelName.

Optional Bayesjax backend

uv tool install 'bayescycle[inproc]'
bayescycle sample model.py --data data.json -o run-jax/ --backend bayesjax

The [inproc] extra is the only path by which JAX enters Bayescycle's dependency closure. Unsupported backend capabilities fail explicitly rather than falling back to another backend.

Generation and replay

Generate paired natural-scale parameters and complete datasets from fixed values, the model prior, or a portable posterior source:

bayescycle generate model.py \
  --design design.json \
  --source fixed \
  --parameters parameters.json \
  --count 100 --seed 123 \
  -o generation-run/

Generation runs carry local hash-verified payloads and can be replayed after the directory is moved and the original model source is unavailable:

bayescycle replay generation-run/ -o replayed-run/
bayescycle replay generation-run/ -o replayed-run/ --check-only

Simulation-gate commands remain available for prior prediction, one-scenario simulation/recovery, and SBC:

bayescycle prior-predictive model.py --data inputs.json -o prior-run/
bayescycle simulate model.py --data inputs.json --truth truth.json -o sim-run/
bayescycle recover model.py --scenario scenario.json -o recovery-run/
bayescycle sbc model.py --scenario scenario.json -o sbc-run/

Inspect and visualize

Follow-up commands own their paths and refuse to overwrite existing artifacts:

bayescycle diagnose run/
bayescycle posterior-predictive run/ --seed 456
bayescycle posterior-check run/ --seed 456
bayescycle recover-check run/ --truth truth.json

Export and plot through pinned standalone uvx environments:

bayescycle idata run/          # writes run/fit.nc
bayescycle plot trace run/     # creates fit.nc first when needed
bayescycle warmup              # pre-populates both uvx environments

bayesite-idata owns NetCDF export and bayesite-viz owns plotting. Their ArviZ stack never enters the default Bayescycle environment.

Engine management

bayescycle engine ensure
bayescycle engine path
bayescycle engine info

Use --engine /path/to/bayesite to override resolution or --no-auto-provision/BAYESCYCLE_NO_AUTO_PROVISION=1 to prohibit downloads.

Contracts

Normative artifact formats live in the root spec/, including canonical data, model/data fingerprints, posterior draws, generated datasets, and run directories. Bayescycle writes only model metadata exposed by Bayeswire and sampler facts exposed by the selected backend.

The optional Bayescycle study skill is an agent protocol outside the runtime package.

Development

uv run ruff format --check .
uv run ruff check .
uv run ty check
uv run pytest

See AGENTS.md and docs/invariants.md for working and architecture rules.

Metadata

Release files for bayescycle 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bayescycle 0.7.0
File Size Uploaded Provenance Actions
bayescycle-0.7.0.tar.gz 70.7 kB Without provenance Details for bayescycle-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bayescycle 0.7.0
File Interpreter ABI Platform Actions
bayescycle-0.7.0-py3-none-any.whl Python 3 none any Details for bayescycle-0.7.0-py3-none-any.whl

Total release size: 162.6 kB

Release files / bayescycle-0.7.0.tar.gz

Download URL bayescycle-0.7.0.tar.gz
Size 70.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c7b1e42d5d36313562a04c45e4ec6cf8181724274cd3a7bea25d1710f23144b6
BLAKE2b-256 checksum
How to use checksums
4cbf9a5928d946ee007d5c12cf8afbfb7b5b4a54d1749ea8908aa240ff0c9308
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / bayescycle-0.7.0-py3-none-any.whl

Download URL bayescycle-0.7.0-py3-none-any.whl
Size 91.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d428a49a6616d230a219cae3887b1fcd049a23cee7916dff69fce74bc8ad011
BLAKE2b-256 checksum
How to use checksums
bb671eb4300950a27f20155e46a2e67881d9f444089277dba4d5cfbaea8fc979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for bayescycle 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page