Skip to main content

Jayrun

Build, run, and inspect Python computation graphs with reusable resources and a live dashboard.

Jayrun is a Python execution framework for pipelines, iterative experiments and application services. Define each step with a synchronous or asynchronous Python method. Jayrun passes artifact values between steps and manages the lifetimes of intermediate results and shared resources.

PyPI version Read the Docs Python 3.11 or later CI Apache 2.0 license

Quick start · Documentation · Tutorials · API reference · 0.3.4 release notes

What Jayrun does

  • Reuse expensive resources. Share models, calibration data and clients across compatible runs, with managed acquisition and teardown.
  • Release intermediate data automatically. Let Jayrun release consumed artifact values when execution no longer needs them. Retention policies and application references determine what stays alive.
  • Inspect and control execution. Visualize graphs before running them, follow live work in the dashboard, and inspect captured results, timings and records afterward.

Declare a graph once, then submit it with different inputs and configuration. Graphs can include branches, conditional routes and iteration. They can also act as observers or controllers for other work—the dashboard itself is built as a graph.

See the overview for applications and data and lifetimes for how artifacts, configuration and resources fit together.

Quick start

Install Jayrun with Python 3.11 or later.

python -m pip install jayrun

Save the following as first_graph.py. The Scale operator multiplies an input artifact by a configurable factor.

from jayrun import (
    Artifact, ArtifactContext,
    ArtifactField, ArtifactFlow,
    BaseOperator, ConfigContext,
    ConfigField, Engine, GraphDefinition,
)
from jayrun.context import ContextState


class Scale(BaseOperator):
    def __init__(self, *, source, outputs):
        super().__init__()
        self.source = ArtifactField()
        self.factor = ConfigField(value_type=int)
        self.outputs = (ArtifactField(),)

    def execute(self):
        value = self.source.value
        result = value * self.factor.value
        self.context.record("scaled", result)
        return result


source = Artifact(name="source")
result = Artifact(name="result")
scale = Scale(
    source=source, outputs=(result,)
)
flow = ArtifactFlow(
    scale, artifact=source
)
graph = GraphDefinition(
    flow, entry_flows=flow
)
graph.confirm()

with Engine() as engine:
    run = engine.submit(
        graph,
        ArtifactContext({source: 7}),
        ConfigContext({scale.factor: 3}),
    )
    run.wait(timeout=10)
    if run.state is not ContextState.FINISHED:
        failure = run.report.data.failure
        raise RuntimeError(str(failure))
    print(run.artifact(result).value)

Run the program. With input 7 and factor 3, it prints 21.

$ python first_graph.py
21

Each submission returns a ContextRun. Once it finalizes, check its outcome before reading the result. The first graph walkthrough explains field binding, reads the recorded value and visualizes the run.

The core runtime requires packaging. Install jayrun[yaml] for YAML configuration. Individual applications can add libraries such as PyTorch.

Inspect your graphs and runs

The quick start sends source through Scale to produce result. To save the completed run as interactive HTML, add run.plot.save("run.html") after the example’s print line. Open the file to inspect the executed step, timing and recorded values.

Completed graph showing the source artifact flowing through Scale to the result artifact

Explore the completed Scale run.

You can also inspect a graph before running it. Save its declaration with graph.plot.save("graph.html"). This split-and-join example shows two processing branches meeting at a Join operator.

Split-and-join graph with an explicit Splitter, two processing branches and a Join operator

A split-and-join graph with two processing branches. Click to explore the interactive declaration.

For live work, the dashboard lets you follow running contexts and find recent completions.

Jayrun dashboard listing running and paused contexts with graph versions, progress and iteration counts

Explore the dashboard or build a monitoring graph with a Controller. The visualization and reporting guide also covers declarations, registries and completed runs.

To keep diagnostic history beyond an Engine session, pass Database("execution.sqlite") from jayrun.persistence to Engine(database=...). The Engine owns the database lifecycle. After computation finishes, call engine.database.flush() to check that pending history was stored successfully. The Persistence and Database guide shows how to write history and read it after the Engine closes. Stored history is separate from application checkpoints and arbitrary artifact storage.

Tutorials

Each tutorial includes a walkthrough, Python source and a notebook. All seven have a small offline CPU example.

The tutorial sources and notebooks live in the GitHub tutorials directory; they are not included in pip install jayrun. Start with the tutorial setup guide to get the repository, install lesson dependencies and choose a CPU or optional GPU/model workload. For a specific task, follow the guides on graph construction, resources, component interfaces or application integration.

Community

Have a question or a workflow to share? Join GitHub Discussions. Report bugs and request features through GitHub Issues; for bugs, include a small reproducible example and your Python and Jayrun versions.

You can also help by reporting confusing examples, suggesting documentation improvements or sharing how you use Jayrun. The documentation sources are included in this repository.

Scope and project status

Jayrun manages graph execution and ownership. Applications supply network transport, authentication, external side effects and checkpoint contents. Placement accounts for declared capacity rather than allocating devices, and cleanup releases framework references rather than guaranteeing an immediate drop in process memory. See supported behavior and limitations.

Jayrun provides a tested foundation for graph execution, with ongoing improvements to reliability, usability and documentation. Use imports from jayrun and its documented public modules; jayrun.core and jayrun.engine are implementation details.

License

Apache License 2.0. Copyright 2026 Masoud Yavari.

Metadata

Release files for jayrun 0.3.4

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

Source distribution (sdist)

Source distribution for jayrun 0.3.4
File Size Uploaded Provenance Actions
jayrun-0.3.4.tar.gz 439.2 kB With provenance Details for jayrun-0.3.4.tar.gz

Built distribution (wheel)

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

Total release size: 960.2 kB

Release files / jayrun-0.3.4.tar.gz

Download URL jayrun-0.3.4.tar.gz
Size 439.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8f4f218e492fee2316b63705ff3dfe1baa95fcc9d9a89bbfb9db4e33c7002b0e
BLAKE2b-256 checksum
How to use checksums
cf2b70be685e5dc8828f59f1526c33d96ba1850700bde85435c69a976ae6b3bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 25, 2026.

Transparency log

Release files / jayrun-0.3.4-py3-none-any.whl

Download URL jayrun-0.3.4-py3-none-any.whl
Size 521.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61bc41e07f4d36aa2baf1d4ca33d2ea6444c9b5f1c39d2dc07161b81e15c34d2
BLAKE2b-256 checksum
How to use checksums
ab26edf898dbf8800467987f10e474aad6034b04cb3bd14af7eee88f48259564
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 25, 2026.

Transparency log

Security for jayrun 0.3.4

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 jayrun-0.3.4.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 Nov 25, 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.

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