Skip to main content

Experiment stores

Cherries records computations and visualizations as editable run folders. All projects in a store share SHA-256 file contents; ordinary YAML, reports, logs and Parquet metrics remain directly readable. Each execution retains a real Git end ref and an independent source archive, including submodules and Git LFS data.

Linux and Python 3.12 or newer are supported. Git is required; source histories containing LFS files also require Git LFS.

uv add liblaf-cherries
cherries store init /data/cherries
cherries --store /data/cherries project add my-project --repo .

Select the project and storage at the source repository root:

# cherries.toml
[project]
id = "my-project"

[recording]
on_error = "keep"
metric_durability = "fsync"
# cherries.local.toml, normally Git ignored
[store]
path = "/data/cherries"

--store overrides CHERRIES_STORE and configured paths. --project overrides CHERRIES_PROJECT and [project].id. Opening a store never initializes or cleans it implicitly.

Record an experiment

from liblaf import cherries

with cherries.run(name="baseline", parameters={"steps": 200}) as run:
    result = run.output("answer.txt")
    result.write_text("42\n")
    run.log_metric("loss", 0.001, step=200)
    run.report("README.md").write_text("# Baseline\n\nAnswer: 42.\n")

print(run.result.run_id)

Execute normally with uv run python experiment.py, or use the CLI to record an external command and its native output:

cherries run exec --name baseline -- uv run python experiment.py

A CLI controller and an inner Python context share one run. During execution, CHERRIES_RUN_DIR identifies the ordinary work directory. input() fixes content before returning a readable copy; output() and figure() declare required files; scratch() provides unretained working paths. Complete all asynchronous writes before returning from the context.

Metrics append to JSONL with explicit durability, then convert to Parquet when saved. Duplicate steps and timestamps are retained. Execution failures keep marked diagnostic runs by default; recording failures preserve unpublished work.

Read, explain and visualize

cherries run list --status succeeded --where 'metrics["loss"].last < 0.01'
cherries run show <run-id>
cherries file get <run-id> outputs/answer.txt --to ./answer.txt
cherries run tag add <run-id> selected
cherries report edit <run-id> README.md

Reports, assets, names and tags can change after execution. Original execution parameters, results, source commits and consumed inputs stay fixed. A new calculation or visualization creates a new run and binds exact input contents:

store = cherries.Store.open("/data/cherries")
project = store.projects.get("my-project")
saved = project.runs.get("<run-id>")
source = saved.file("outputs/answer.txt").ref()

with project.run(name="comparison", kind="analysis") as analysis:
    answer = analysis.input(source, name="answer.txt")
    analysis.output("comparison.txt").write_text(answer.read_text())

Archive and reclaim space

cherries run copy <run-id> --to-store /archive/cherries
cherries code checkout <run-id> --to ./source-copy
cherries project verify my-project --git --lfs --offline
cherries run delete <run-id> --dry-run
cherries store gc --dry-run

Initialize the destination store before copying. Copy includes source runs, CAS and source Git/LFS closure and checks conflicts before publication. Deletion checks retained dependents. Global GC reads authoritative references across every project. Remove --dry-run to apply the reviewed deletion or GC operation.

Storage and compatibility

store/
  store.yaml
  objects/sha256/ab/cd/<full-digest>.<suffix>
  projects/<project>/
    project.yaml
    <project>.git/
    runs/<uuid>.tmp/             # unpublished work
    runs/<uuid>/
      run.yaml  run.log  metrics.parquet
      inputs/...lfs  outputs/...lfs  figs/...lfs
      README.md  reports/...  assets/...

The CAS contains real file bytes. Standard pointer files reference digest and size; suffix changes do not invalidate them. Reports carry ordinary asset copies. Each bare repository has its own self-contained LFS store, which can duplicate bytes also retained by CAS. SQLite indexes and materialized file copies live in machine-local caches and can be rebuilt.

The v4 immutable collection format remains available through liblaf.cherries.legacy and cherries legacy .... Existing explicit v4 configuration uses its old recorder; new stores are never opened as collections. Explicit imports preserve original IDs and evidence limitations:

cherries run import /old/collection --inspect
cherries run import /old/collection

Legacy source evidence is retained as audit attachments; importing bytes does not establish executable source recovery or verified replay.

Read the workflow and CLI documentation, detailed storage workflow and API design.

Development

uv sync
uv run pytest
uv run nox
uv run ruff check .
uv run lint-imports
uv build

License

Copyright © 2026 liblaf. MIT.

Metadata

Release files for liblaf-cherries 5.0.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 liblaf-cherries 5.0.0
File Size Uploaded Provenance Actions
liblaf_cherries-5.0.0.tar.gz 128.6 kB With provenance Details for liblaf_cherries-5.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for liblaf-cherries 5.0.0
File Interpreter ABI Platform Actions
liblaf_cherries-5.0.0-py3-none-any.whl Python 3 none any Details for liblaf_cherries-5.0.0-py3-none-any.whl

Total release size: 286.5 kB

Release files / liblaf_cherries-5.0.0.tar.gz

Download URL liblaf_cherries-5.0.0.tar.gz
Size 128.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3642c7c17166ff429ed83f31abc4c4f6933b6fbd255189952939ed785fac7b9a
BLAKE2b-256 checksum
How to use checksums
fa6f17ab7f9cf41681868d3fb73ac44283abd62ed3554304f0d605f777c201a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / liblaf_cherries-5.0.0-py3-none-any.whl

Download URL liblaf_cherries-5.0.0-py3-none-any.whl
Size 157.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1645476110401f309655cfc13e4883540f27520a2efa1a786ff9d84f07eaf4c
BLAKE2b-256 checksum
How to use checksums
89111aa44ad84473bcf7170544945b3fdcef8e373b588062aa89820edc9999f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for liblaf-cherries 5.0.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for liblaf_cherries-5.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

5.0.0 This release

2 release files Full provenance

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