Skip to main content

Ariadne is a lightweight and minimal Python library for managing computational experiments and their results. To install, run:

uv add ariadne-lib

or

pip install ariadne-lib

[!WARNING] This library is developed for personal use. Anyone is welcome to use it and give feedback, but be ready for sharp edges and breaking changes.

Basic Usage

The primary goal of Ariadne is to help keep track of what you did and what the results were. The rapid prototyping workflow that research encourages often leads to issues with reproducibility. Plots and results can become stale and lack provenance, results may often become overwritten and lost.

The solution Ariadne provides is the simplest one possible: assign each experiment to a different unique folder, and provide simple utilities for creating and managing these folders, as well as saving useful metadata (like timestamps, notes, and configs). Other features like logging, experiment visualization and aggregation are out of scope for this project; the explicit goal is a minimal, lightweight, dependency-free library that composes well and makes few assumptions about how your workflow. The primary experiment management happens in the Theseus class. Calling start returns a id for that experiment, along with the dedicated folder that everything should be stored under.

from ariadne import Theseus
import logging

experiment = Theseus(db_path="experiments.db", base_dir="results")
experiment_id, experiment_folder = experiment.start(name="resnet", run_config={"architecture": "resnet-50"}, notes="try resnet instead of mlp")

for epoch in range(len(50)):
    x = [0, 1]
    yhat = [0, 0]
    y = [1, 1]
    loss = 1
    logging.info(f"{epoch=}, {loss=}")

    plt.plot(x, yhat, "-")
    plt.plot(x, y, "--")
    plt.savefig(experiment_folder / f"predictions{epoch}.png")

Ariadne then provides utilities for querying the experiment database by name, and id, to quickly associate an experiment with its dedicated folder on disk.

experiment_id, experiment_folder = experiment.get("resnet") # searches by substring match
experiment_id, experiment_folder = experiment.peek() # last run experiment
experiment_id = 3
experiment_folder = experiment.get_by_id(experiment_id) # or exact id match

img = plt.imread(experiment_folder / "predictions49.png")
plt.imshow(img)

Finally, Ariadne provides a simple cli for querying and summarizing experiments. Run ariadne --help for more information.

FAQ:

Q: Why the name?

A: My project directories often end up evolving into a tangled mess of results, plots, and files, not unlike a maze. In greek mythology, Ariadne's red string was the crucial key for helping Theseus escape the labyrinth of Crete.

Q: Why not weights and biases, tensorboard, or other experiment management tools?

A: You probably should use them instead if you can! But here's a brief reason why I wrote this library instead:

  • Experiments are stored locally and a simple CLI is provided. No need for a web server or a browser.
  • Because all Ariadne does is handle creation and management of experiment folders, it composes well with other libraries. Your logging, plot creation and saving, and checkpointing code can remain exactly the same - just prepend the experiment folder in front of the save path.
  • I simply don't need most of the features these other experiment management frameworks offer.

Q: Why not git lfs?

A: Git LFS is great for versioning large files. But, when you are rapidly iterating and creating throwaway experiments that you might not need to share, constantly writing and overwriting rich data like plots makes for horribly ugly diffs, and can bloat your cloud storage.

Metadata

Release files for ariadne-lib 0.4.1

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

Source distribution (sdist)

Source distribution for ariadne-lib 0.4.1
File Size Uploaded Provenance
ariadne_lib-0.4.1.tar.gz 503.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ariadne-lib 0.4.1
File Interpreter ABI Platform
ariadne_lib-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 523.2 kB

Release files / ariadne_lib-0.4.1.tar.gz

Download URL ariadne_lib-0.4.1.tar.gz
Size 503.6 kB
Tags Source
SHA-256 checksum
How to use checksums
39aec7f4ad1d428ce595f0777c2766efc55054ae19e98e701d47c1353c89aef2
BLAKE2b-256 checksum
How to use checksums
b87a239777a34c3dd257338bb460890a694d47c2eee57dc401f3f369ca6695da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.24

Release files / ariadne_lib-0.4.1-py3-none-any.whl

Download URL ariadne_lib-0.4.1-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ecf71565d0a80f586b382158acac38c6684d8193d898ec310e72c82eb95353d
BLAKE2b-256 checksum
How to use checksums
97eb33dd942cf5aa65eee9ebfffef701507c0e89e83c3233a307d33252c84b5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.24

Security for ariadne-lib 0.4.1

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.

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