Skip to main content

stet

A Python library for making parameter sweeps safely resumable.

Stet is a Latin proofreading instruction meaning "let it stand" - written beside a correction that should be ignored. When stet sees a parameter combination it has already run, it does the same: leave it, it's done.

When a long-running experiment script is re-run, whether after a crash, a time limit, or deliberately to extend a sweep, stet automatically skips any parameter combinations that have already been completed.

import stet

@stet.once(store='markov_runs.csv', key=['alpha', 'n_states', 'seed'])
def solve_markov(alpha, n_states, seed, n_iter=10_000):
    # expensive computation
    ...

for alpha in alphas:
    for n_states in [10, 50, 100]:
        for seed in range(20):
            solve_markov(alpha=alpha, n_states=n_states, seed=seed)

On restart, any already-completed (alpha, n_states, seed) combinations are skipped:

[once] Skipping solve_markov(alpha=0.01, n_states=10, seed=0)
[once] Skipping solve_markov(alpha=0.01, n_states=10, seed=1)
...

Installation

uv add stet
# or: python -m pip install stet

With Parquet support:

uv add stet[parquet]
# or: python -m pip install stet[parquet]

Usage

Zero config: uses _stet_store.csv in the current directory, all parameters as the key:

@stet.once
def run_experiment(alpha, seed):
    ...

Named store: backend selected from file extension (.csv, .json, .sqlite, .parquet):

@stet.once(store='runs.sqlite')
def run_experiment(alpha, seed):
    ...

Key subset: only alpha and seed determine whether a run is skipped; n_iter is ignored:

@stet.once(store='runs.csv', key=['alpha', 'seed'])
def run_experiment(alpha, seed, n_iter=1000):
    ...

Utilities

stet.status()            # print a summary of completed runs
stet.reset()             # clear the store
stet.reset(key_dict={'alpha': '0.1', 'seed': '42'})  # remove one entry

Storage backends

Extension Backend Notes
.csv pandas CSV Default. Human-readable.
.json stdlib json No extra dependencies.
.sqlite stdlib sqlite3 Best for large stores and parallel workers.
.parquet pandas + pyarrow Requires stet[parquet].

Documentation

Full documentation including how-to guides, API reference, and explanation of design decisions: docs.

Metadata

Release files for stet 0.0.2

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

Source distribution (sdist)

Source distribution for stet 0.0.2
File Size Uploaded Provenance
stet-0.0.2.tar.gz 144.7 kB With provenance Details

Built distribution (wheel)

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

Total release size: 157.5 kB

Release files / stet-0.0.2.tar.gz

Download URL stet-0.0.2.tar.gz
Size 144.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0263000b9ddeb61d18b00b8a22677d0321ada154349d731934a18016f0c2ae2b
BLAKE2b-256 checksum
How to use checksums
9fc26c293359f203f9d0db69d8311c2af67fc00c8078185fa0a5f5fef8c1cc10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 12, 2026.

Transparency log

Release files / stet-0.0.2-py3-none-any.whl

Download URL stet-0.0.2-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24d3bd62c01b6616afc661ca21c40b80733114d5fe4e0dbe7824d714e6a176f4
BLAKE2b-256 checksum
How to use checksums
2ff7961d16c777b2c341fefbfda55224ef656aa26b1d0976a97c3aa88b8f4543
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 12, 2026.

Transparency log

Security for stet 0.0.2

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for stet-0.0.2.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 Mar 12, 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.

Release history Release notifications | RSS feed

This release

0.0.2 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