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.1 · Release notes
Documentation · Quick start · Explore the dashboard · Tutorials · API reference
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.
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jayrun-0.3.1.tar.gz | 430.7 kB | With provenance | Details for jayrun-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jayrun-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for jayrun-0.3.1-py3-none-any.whl |
Total release size: 944.0 kB
Release files / jayrun-0.3.1.tar.gz
| Download URL | jayrun-0.3.1.tar.gz |
|---|---|
| Size | 430.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3460274aeb81c54c566b846280108b6e65ecf893427c3d49b9f5a5b2af39b6a0
|
|
BLAKE2b-256 checksum How to use checksums |
ba805d6c2deee235feefa957efa434951a56eb8dc6abc5147c449ace5204b8ab
|
| 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 17, 2026.
Transparency logRelease files / jayrun-0.3.1-py3-none-any.whl
| Download URL | jayrun-0.3.1-py3-none-any.whl |
|---|---|
| Size | 513.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9909b79533adfdbc986203afdb23c926840c26d0976a0db5c6efb40358e4f30d
|
|
BLAKE2b-256 checksum How to use checksums |
a2d8d0d3008824e1cefa8871ba51de07dbdd7acf0a313d694e2496835b989077
|
| 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 17, 2026.
Transparency logSecurity for jayrun 0.3.1
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.
Attestation for jayrun-0.3.1.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 17, 2026.
Transparency logA 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.