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 the steps and manages execution and resource lifetimes.

Latest release: 0.3.3 · Release notes

PyPI version Python CI Documentation License

Documentation · Quick start · Explore the dashboard · Tutorials · API reference

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

Follow running and paused work in the dashboard. Click to explore the offline preview and learn how to start your own.

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. The example below introduces these ideas with a single calculation.

Quick start

Install Jayrun with Python 3.11 or later:

python -m pip install jayrun

The only required third-party runtime dependency is packaging. Install jayrun[yaml] if you need YAML configuration support; workload libraries such as PyTorch are application dependencies.

Save this program as first_graph.py and run python first_graph.py. It declares a multiplication, confirms the graph, supplies input and configuration, and prints 21:

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):
        result = self.source.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:
        raise RuntimeError(str(run.report.data.failure))
    print(run.artifact(result).value)  # 21

ArtifactContext supplies the input value, and ConfigContext supplies the multiplication factor. The constructor declares fields; Jayrun automatically binds the source argument to self.source by name and the outputs tuple to self.outputs by position.

Each submission returns its own ContextRun. run.wait() waits for finalization, which can include failure, so the example checks the outcome before reading the result. Execution settings separately control policies such as retries and iteration limits.

The same confirmed graph can serve another submission. The complete walkthrough explains each step, reads the recorded value and visualizes the finished run.

Inspect your graphs and runs

Once you have a graph, save its structure with graph.plot.save("graph.html"). After execution, save the completed run with run.plot.save("run.html") to explore captured outcomes, timings, records and reports. Both create interactive HTML viewers that open in a browser.

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, use the dashboard shown above. You can also build your own monitoring or coordination graph using self.runtime; see the Controller example. The visualization and reporting guide covers declarations, registries, completed runs and the dashboard.

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

Ready for a larger workflow? Each tutorial includes a walkthrough, Python source and a notebook, with a small offline CPU path:

Tutorial What it demonstrates Run it
Build and validate Properties, diagnostics and corrected execution Python · Notebook
Image service Async service, shared client and routing Python · Notebook
Shared model inference Read-only model reuse and placement Python · Notebook
Supervised training Iteration, mutable state and scoped supervision Python · Notebook
Document service Long-running jobs and transactional publication Python · Notebook
Adapter checkpointing Model/optimizer/RNG checkpoints Python · Notebook
Scientific campaign Adaptive control and reproducibility Python · Notebook

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.3

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.3
File Size Uploaded Provenance Actions
jayrun-0.3.3.tar.gz 431.7 kB With provenance Details for jayrun-0.3.3.tar.gz

Built distribution (wheel)

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

Total release size: 946.0 kB

Release files / jayrun-0.3.3.tar.gz

Download URL jayrun-0.3.3.tar.gz
Size 431.7 kB
Tags Source
SHA-256 checksum
How to use checksums
42451686de0f47f7b3603a61ae1d6fead1a3658b99a5a75c7c9f5b8fe13fbb22
BLAKE2b-256 checksum
How to use checksums
dd84d9d9b87039f400a010d0cadb675becc10d26d62f0508bac5faf18acbba5a
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 22, 2026.

Transparency log

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

Download URL jayrun-0.3.3-py3-none-any.whl
Size 514.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d912eb6d98cdd36ed0394efd44f5059550ded7e863b701cf45887f4b9af0d7d1
BLAKE2b-256 checksum
How to use checksums
696c6e1bbd84786c131d57d4d38102f22cfa6ba827855c641f02d4c9e12b16aa
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 22, 2026.

Transparency log

Security for jayrun 0.3.3

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.3.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 22, 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