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.5.tar.gz (42.0 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.5-py3-none-any.whl (53.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tidyrun-0.0.5.tar.gz
  • Upload date:
  • Size: 42.0 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.5.tar.gz
Algorithm Hash digest
SHA256 8697ef45b278ec881bf5b2cedca416f994a56dd9f76d265cd2a04592b2b8ea71
MD5 f9e52c8d5f7822b83caad027688064ed
BLAKE2b-256 75c651190a9523672b75de91584dff9136fc980f39d52b1aa1f686db4bca75d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for tidyrun-0.0.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: tidyrun-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 53.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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a46726174cf505d78b3ee048169111d7c8c0832d626c045b08b88324293f1223
MD5 4f3dc3df1917eebf95b0bd785bafd70c
BLAKE2b-256 7379205dc8abcbabe59d8f5a5d3e842eca9a263e611e5851b992f6ecaa6c65c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tidyrun-0.0.5-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