Skip to main content

TidyRun

Project description

TidyRun

A tool to orchestrate the compute and storage of Python DAGs

Features

Compute Orchestration

TidyRun provides first-class deferred compute primitives for DAG workflows:

  • Deferred Primitives: Model work with Job, ParametrizedJob, and nested DAG
  • Dependency-Aware Scheduling: Evaluate DAGs with topological execution and fail-fast behavior
  • Execution Modes: Choose subprocess (default), thread, or process
  • Parallel Evaluation: Run independent nodes with DAG.evaluate(max_workers=...)
  • Materialized Plans: Compile reproducible execution plans before running jobs
  • Resumable Runs: Re-run materialized plans with execute_materialized(skip_completed=True)
  • Pluggable Executors: Use local executors, SlurmExecutor, or AwsBatchExecutor

Serialization and Storage

TidyRun also includes a comprehensive serialization system for storing and retrieving Python objects:

  • Type-Aware Encoding: Automatically selects folder, Parquet, HDF5, JSON, or pickle based on value type
  • Lazy Evaluation: Directories deserialize into LazyDict objects that load values on-demand
  • Recursive Concatenation: Aggregate DataFrames across nested structures with LazyDict.concat() (optionally parallel with max_workers)
  • Metadata Sidecars: Each output is tracked with .tidyrun metadata files for format versioning and checksums
  • Checksum Return Value: serialize(...) returns checksum information (algorithm, digest) for the serialized payload
  • Extensible Pipeline: Customize encoders or add support for custom types
  • Intelligent Fallback: Parquet → HDF5 → JSON → Pickle chain ensures robust serialization

Quick Example:

Compute (DAG execution):

from tidyrun import DAG, Job


def square(x: int) -> int:
    return x * x


dag = DAG()
dag["a"] = Job(func=square, kwargs={"x": 3})

# Fast local execution without subprocess spawn overhead
outputs = dag.evaluate("./local_dag", execution_mode="thread", max_workers=4)
print(outputs["a"])  # 9

Serialization and lazy loading:

from tidyrun import serialize, deserialize
import pandas as pd

# Save nested data with smart format selection
serialize({
    "metrics": pd.DataFrame({"score": [9]}),
    "config": {"lr": 0.001},
}, "./results/exp_001")

# Load with lazy evaluation
results = deserialize("./results/exp_001")
df = results["metrics"]  # Loads on access

# Aggregate across nested structures
combined = results.concat(names=["run_id"])

Learn More:

  • Quick Start — Local docs workflow and publishing notes
  • DAG Guide — Jobs, parametrized jobs, executors, and evaluation modes
  • Serialization Guide — Complete API reference, quick reference, and examples

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tidyrun-0.0.7.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tidyrun-0.0.7-py3-none-any.whl (57.1 kB view details)

Uploaded Python 3

File details

Details for the file tidyrun-0.0.7.tar.gz.

File metadata

  • Download URL: tidyrun-0.0.7.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tidyrun-0.0.7.tar.gz
Algorithm Hash digest
SHA256 796df2fa817995c5a045215e78c1ccf2ea0f8330a103c9af92eb7bc72b86a7a5
MD5 7f70c0192b9108626d75c2cb121a0c28
BLAKE2b-256 6ac08368b642cd91ef5c451d24477dd7ded9e0afc5d6442cfc13c5d8544d1810

See more details on using hashes here.

Provenance

The following attestation bundles were made for tidyrun-0.0.7.tar.gz:

Publisher: publish-pypi.yml on mwouts/tidyrun

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tidyrun-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: tidyrun-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 57.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tidyrun-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e4c652cc68bf7540e766e9b77d603039f086ee9f90ff6a247f58dc2dc229144f
MD5 cbc3ebb5d14d141800d936f1c3ef7da5
BLAKE2b-256 16122b6b8f2da463cea7d9732068a63c62b2fc2c644a176fc292170cc5766169

See more details on using hashes here.

Provenance

The following attestation bundles were made for tidyrun-0.0.7-py3-none-any.whl:

Publisher: publish-pypi.yml on mwouts/tidyrun

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page