Skip to main content

graphed

Deferred awkward-array analysis with a plan you can save, ship, and debug — dask-awkward's shape, without the giant task graph.

You write ordinary awkward code. Nothing runs yet — graphed records it, and collapses the redundancy as you go, so the cut you wrote twice and the helper that multiplies by 1.0 are gone before they ever cost you anything. When you're ready, you hand the result to a runner. What you get for it:

  • The same analysis produces byte-identical results every run, on 1 worker or 100.
  • A failure on a remote worker comes back pointing at the line you wrote, not an opaque string from another process.
  • Only the columns your analysis touches are read off disk — a file with 400 branches costs you the six you used.
  • The recorded plan is a durable artifact: checkpoint it, resume it after a crash, or bundle it so a colleague reproduces your histograms exactly.

Install

pip install "graphed[awkward]"      # the HEP default: ragged arrays via awkward

Other extras, all opt-in:

pip install graphed                 # frontend + compiled core only (light)
pip install "graphed[numpy]"        # rectilinear numpy backend
pip install "graphed[parquet]"      # Parquet reading/writing (pyarrow)
pip install "graphed[dashboard]"    # live run dashboard
pip install "graphed[preserve]"     # preservation bundles (correctionlib/ONNX)
pip install "graphed[all]"          # everything except the heavy ML frameworks

Wheels ship for Linux, macOS, and Windows; installing from source needs a Rust toolchain (the optimizer is a compiled extension).

Your first analysis

import awkward as ak

import graphed
from graphed import Session
from graphed.awkward import AwkwardBackend, from_awkward, gak

events = ak.Array(
    [
        {"Jet": [{"pt": 40.0, "eta": 0.1}, {"pt": 12.0, "eta": 2.3}]},
        {"Jet": [{"pt": 55.0, "eta": -1.2}]},
        {"Jet": [{"pt": 8.0, "eta": 0.5}]},
    ]
)

session = Session(AwkwardBackend())
evts = from_awkward(session, "events", events)

good = evts.Jet[evts.Jet.pt > 30.0]  # records, doesn't run
leading_pt = gak.max(good.pt, axis=1)  # gak mirrors ak.* signatures

compiled = graphed.compile_ir(session, leading_pt)
(result,) = graphed.evaluate_ir(compiled, AwkwardBackend(), {"events": events})
print(ak.to_list(result))
# [40.0, 55.0, None]

gak is the function surface: it carries the ak.* signatures you already know (gak.num, gak.zip, gak.with_field, …), but each call records a step instead of computing one.

The one thing that's different

There is no .compute(). There are two ways to make the recording happen, and which one you want depends on where the work should run.

In this process, as above: graphed.compile_ir(session, output) reduces the recording, and graphed.evaluate_ir(...) evaluates it right here, on arrays you hand it. Good for a notebook and for small data.

Across partitions of a dataset, which is what you want for a real run: build a plan and hand it to a runner. graphed.aggregate_plan(out1, out2, reduce=..., combine=..., empty=...) compiles every output into one recording and produces one task per partition of the dataset you read from — so it needs a partitioned source such as from_parquet. For histograms, graphed_histogram.plan({"name": h}) builds the same thing for you. Then: SequentialRunner from graphed.core runs it in-process, and a graphed-executors runner runs it on a process pool, a dask cluster, or a parsl HTEX pool. Your first real analysis does exactly this, end to end.

The plan — not a pickle of your Python objects — is what travels, which is why it can be saved, resumed, and reproduced.

Which pieces do I need?

You want Install / import
Ragged HEP analysis (the default) graphed[awkward]graphed.awkward, gak
Read/write Parquet, skims add graphed[parquet]graphed.awkward.from_parquet, to_parquet
Run on a pool or cluster graphed-executors
Deferred hist-style histograms graphed-histogram
Watch a run live add graphed[dashboard]graphed.debug
Hand your analysis to a colleague, exactly add graphed[preserve]graphed.preserve

Everything under one import path, and what each part does for you:

Import path What it does for you Extra
graphed Session, Array, vary (systematic variations), compile/evaluate (base)
graphed.core the compiled optimizer, the plan types runners consume, and SequentialRunner (base)
graphed.awkward ragged backend: gak functions, corrections/ONNX calls [awkward] (+ [parquet] for I/O)
graphed.numpy deferred numpy for rectilinear data [numpy]
graphed.debug errors mapped back to your source line; the live dashboard (base); [dashboard] for the live view
graphed.checkpoint cache results by content; restart a crashed run where it left off (base)
graphed.preserve a self-contained bundle that reproduces your histograms elsewhere (base); [preserve] for correctionlib/ONNX payloads

Next

  • Your first real analysis — a parquet dataset, a jet cut, a systematic variation and a histogram, end to end.
  • How the frontend works — what gets recorded, how duplicate expressions collapse as you build, and the full graphed.vary grammar for systematics.
  • How the awkward backend works — column reading, corrections, ML models, and writing varied skims.
  • API reference.
  • Build the docs locally: pip install -e ".[docs]" && sphinx-build -W -b html docs docs/_build/html

To hack on graphed itself, see CONTRIBUTING.md.

Download files

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

Source Distribution

graphed-0.0.2.tar.gz (5.9 MB view details)

Uploaded Source

Built Distributions

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

graphed-0.0.2-cp314-cp314t-win_amd64.whl (5.4 MB view details)

Uploaded CPython 3.14tWindows x86-64

graphed-0.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl (5.6 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

graphed-0.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl (5.6 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

graphed-0.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

graphed-0.0.2-cp314-cp314t-manylinux_2_28_aarch64.whl (5.5 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ ARM64

graphed-0.0.2-cp314-cp314t-macosx_11_0_arm64.whl (5.5 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

graphed-0.0.2-cp314-cp314t-macosx_10_15_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.14tmacOS 10.15+ x86-64

graphed-0.0.2-cp311-abi3-win_amd64.whl (5.4 MB view details)

Uploaded CPython 3.11+Windows x86-64

graphed-0.0.2-cp311-abi3-musllinux_1_2_x86_64.whl (5.6 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ x86-64

graphed-0.0.2-cp311-abi3-musllinux_1_2_aarch64.whl (5.6 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

graphed-0.0.2-cp311-abi3-manylinux_2_28_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

graphed-0.0.2-cp311-abi3-manylinux_2_28_aarch64.whl (5.5 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

graphed-0.0.2-cp311-abi3-macosx_11_0_arm64.whl (5.5 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

graphed-0.0.2-cp311-abi3-macosx_10_12_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file graphed-0.0.2.tar.gz.

File metadata

  • Download URL: graphed-0.0.2.tar.gz
  • Upload date:
  • Size: 5.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for graphed-0.0.2.tar.gz
Algorithm Hash digest
SHA256 86464ba9b17ddc22084cafc83d451a963d3c0e656840a9eda2bfa5b532d3c435
MD5 bede1bf3695a64fed0abf9b81a73e0a7
BLAKE2b-256 269668d716b9f0a04bc5ea2f3bd1f2ea82acdce9b639f953215d329984fdf78f

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: graphed-0.0.2-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for graphed-0.0.2-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 676a12e4690a40a28caa3bf6751f8dbadd561ccd08379f197225fcf29db20bec
MD5 877d9963098331d371d88a9fa89a52df
BLAKE2b-256 f2f6a7899e29c303bb33aed681494179e9e0e82b696b228d8456d6edf3feaf4c

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 346fee619f394c6952f816bd0f1e2f9a8ebdaf3f0f6b9c784aea1788e2a980e5
MD5 da98d1bbe3a4984d9ba7d0a2dfb8e1d8
BLAKE2b-256 22ab23493cf911a11ea503843854342b0dca086ecf38113db56ee4b9e1886b6b

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 7e33f8d780c908f87a1debfceceeb51a9b5b636999162d56bd3d4fd8280c4aff
MD5 25ea554e3db265e99d2bd9c1333972a4
BLAKE2b-256 f3fd4d519420991f013265332d69d779c0c3d20cd0899a59136f557359f2b5c2

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0433e36a282e421936ac1885ed4cf2b8e920d4836d61a6c98720c7202e465946
MD5 87e1bf92786f2c47ebdeeeefd18caf7d
BLAKE2b-256 f2c6d2b27d1f41982debec61b1f94896085836394d7fc49c09f6ee5386914e92

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp314-cp314t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp314-cp314t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7e8101f7115b9f6dc284028fb7afc0bfac2cb61028f256f060b8d91ca04d1362
MD5 175f216bba4ab1b9fa2324801f846ed8
BLAKE2b-256 27123cabb18c3cf0073fae873c74369c87bdf8032dfb7ea7b5b6ccdaedcbcea0

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 205ad10e51fc3c0e582f4a0737282b29ad78c4004ad803d09e997218c987cda8
MD5 52c69a469e0c5c8087239ca216297889
BLAKE2b-256 785edc52143239c55aa8bfd3a585947b0f65d51e9a6092c8ada738347f59ab6e

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp314-cp314t-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 a90683912067a9c9e388ae1a38c7a059651274e6678afcb1e41d6b0ad6612193
MD5 c4dff6cda1d981328db4a5250df86a10
BLAKE2b-256 61a7128675c283ade78bce665ece95cd2a67030e792f5e94877dbb871ff52f46

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: graphed-0.0.2-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for graphed-0.0.2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 434c888e34301e64d0024f493101b7e9ab41597a604cbd2d05ddf6f0728858f8
MD5 14bf799b377db7a58817434eef936d3a
BLAKE2b-256 cace3af0d34082009151edf7bc59b759ade8c58e08137e44df17c1fe91e6f438

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 46252377081bc159b50363f673fc7c36dc5e60f4ae854efa64107e86abb852f6
MD5 282d6a93a4d357a5cdfa129a20277b22
BLAKE2b-256 644c6e3323d31de472c9e63eb67b44204079399cf72d1d82408336457e2a9933

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp311-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 c9be34f5ace74649743d655acf10455d5723a982d805aedcf5872810d2eef1e8
MD5 dee519b69dfb3ed2ae4881190f1d2589
BLAKE2b-256 6ae58bcabf4474c5f049983b47e6b30ff9164f66aeafeacc8f7c54df73b7e835

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a4367a9a46564c2578e504a911d3b5183abce9308bc8d5b4617db561f11ecd27
MD5 4209b0417a1eb18f230e0c4924e4a597
BLAKE2b-256 7ff7dcaffc0f05bac8ec02dd8e9317d2ddf6baf6f6661adbe3773961428e95c3

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d8508cc457308f8e5017055dd0bbb8ef240956285db8a01b8febf3f869a039d1
MD5 a1c5616069d7d60c07076cadd6901c8e
BLAKE2b-256 e84ff03bedf6d739cd773ce71c23187fde9be96a8fa2b40e2540dc24d010b695

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 220929cb1723ef0300b4b67e3e41b430ad339bac2a4a6a59219e622a39915a40
MD5 624292983e2ac4aa6922d7e30fe1f49a
BLAKE2b-256 8b7b4ada5af246e9ad2da0deaf73f4257a5cea32171e04f98355db0b5a891bd2

See more details on using hashes here.

File details

Details for the file graphed-0.0.2-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for graphed-0.0.2-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 53673f1eb33a098af3d58d777ba4d62660fa74b6e383c631d4fb139dc52100c6
MD5 8a509690b7efb9fd8244cadb339d0f55
BLAKE2b-256 4697ef0313577b5b96c9c1e3d4d10f3efe0584d2e47f8a3016043ee29de24aac

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2 This release

15 files

0.0.1

21 files

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