Skip to main content

Experiments as files

Cherries records Python experiments in ordinary local folders: end-of-run inputs//outputs//figs/ copies (using Linux reflinks when available), the entry script plus src/diff.patch against HEAD, logs and Parquet metrics. Remote archiving delegates deduplication, locking, verification and GC to Restic, storing one tagged snapshot per run.

Requires Linux, Python 3.12+ and Git. Remote commands (--remote) require Restic 0.17+.

uv add liblaf-cherries

Run a script

project/
  .git/
  exp/2026/11/15/example/
    README.md
    src/10-run.py
    data/                    # inputs and outputs
    figs/                    # figures
    tmp/                     # debug intermediates; never saved
  cherries/runs/YYYY/mm/dd/  # saved local runs, partitioned by start date

Ignore cherries/ and each study's data/, figs/ and tmp/ in Git:

from pathlib import Path

from liblaf import cherries


class Config(cherries.BaseConfig):
    factor: int = 2
    source: Path = cherries.input("input.txt")
    result: Path = cherries.output("result.txt")


def main(cfg: Config) -> None:
    value = int(cfg.source.read_text()) * cfg.factor
    cfg.result.write_text(str(value))
    cherries.tmp("debug/value.txt").write_text(str(value))
    cherries.log_metric("answer", value)


if __name__ == "__main__":
    cherries.run(main)

Run normally with python src/10-run.py (returns saved run Path), or debug without recording via DEBUG=1 python src/10-run.py (returns None, keeps stdout/stderr in the terminal, works outside Git). Dirty Git LFS files and dirty Git submodules are rejected before and after execution; committed LFS files and clean submodules are allowed.

Manage, prune and archive

cherries list --tag selected --json
cherries show RUN
cherries path RUN
cherries edit RUN --description 'Result checked' --add-tag selected
cherries add RUN analysis.md --as README.md
cherries add RUN figs/loss.png --as figs/loss.png
cherries lineage --tag selected
cherries prune --tag selected --dry-run
cherries verify RUN
cherries remove RUN
cherries --remote /mnt/archive/cherries push RUN
cherries --remote /mnt/archive/cherries pull RUN
cherries --remote /mnt/archive/cherries list --tag selected --json
cherries --remote /mnt/archive/cherries lineage --tag selected
cherries --remote /mnt/archive/cherries prune --tag selected --dry-run
cherries --remote /mnt/archive/cherries gc --dry-run

Local runs are ordinary folders (cherries path RUN prints the path for direct ls/cp). lineage and prune follow transitive SHA-256 dependencies from run.yaml.artifacts (ignoring zero-byte files) on both local runs and Restic archives. Remote snapshots are immutable: edit reports or figures locally with edit/add and re-push.

See the storage design and CLI reference for exact formats and options.

Development

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

License

Copyright © 2026 liblaf. MIT.

Metadata

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

Built distribution (wheel)

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

Total release size: 45.2 kB

Release files / liblaf_cherries-7.0.0.tar.gz

Download URL liblaf_cherries-7.0.0.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3a981db08300f32e18d5db1c7c3fc8b808b2986314004ae74b51234f42dd6643
BLAKE2b-256 checksum
How to use checksums
bde3bce86fe21de1fb90919e6389463aa0ecb42eadf5e085d5e603d4f6b7b849
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 29, 2026.

Transparency log

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

Download URL liblaf_cherries-7.0.0-py3-none-any.whl
Size 24.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08eccf6f074920ef44b109ffe05c4a2a078f730161c741fb82fd1a785a283377
BLAKE2b-256 checksum
How to use checksums
66c565e593aa93352316b7f46a8fc2542029bb6318c0fa92c10d36d8e5e8b2be
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 29, 2026.

Transparency log

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

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