Skip to main content

Experiments as files

Cherries records Python experiments in ordinary local folders: end-of-run inputs//outputs/ copies (using Linux reflinks when available), the entry script plus src/diff.patch against base-commit, 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
    assets/                  # figures and report media
    src/10-run.py
    data/                    # inputs and outputs
    tmp/                     # debug intermediates; never saved
  cherries/runs/YYYY/mm/dd/  # saved local runs, partitioned by start date

Ignore cherries/ and each study's assets/, data/ 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 assets/loss.png --as assets/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
mise run lint
mise run docs:build

License

Copyright © 2026 liblaf. MIT.

Metadata

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

Built distribution (wheel)

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

Total release size: 51.8 kB

Release files / liblaf_cherries-8.0.0.tar.gz

Download URL liblaf_cherries-8.0.0.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
51b34578a577cca97c2783637bcb5f3097b5286883fdf1730fdd4e75413ae611
BLAKE2b-256 checksum
How to use checksums
93bffe85b05a60889bfa590cb156017313675c8d48011ed8322350b0eb10f748
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 Dec 1, 2026.

Transparency log

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

Download URL liblaf_cherries-8.0.0-py3-none-any.whl
Size 28.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efd7ca50773581662ba56678442186601ea502ba80cadb86023b7844b05f4119
BLAKE2b-256 checksum
How to use checksums
2dee3d50a7b7d78dcf2e3be5b4f7b97a1a0347dc12fc9f29cbfb20c495c7b3c5
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 Dec 1, 2026.

Transparency log

Security for liblaf-cherries 8.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-8.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 Dec 1, 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

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