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.

Release files for graphed 0.0.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 graphed 0.0.3
File Size Uploaded
graphed-0.0.3.tar.gz 6.0 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for graphed 0.0.3
File
graphed-0.0.3-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
graphed-0.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 Details
graphed-0.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ ARM64 Details
graphed-0.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details
graphed-0.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 Details
graphed-0.0.3-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
graphed-0.0.3-cp314-cp314t-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 free-threading macOS 10.15+ x86-64 Details
graphed-0.0.3-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
graphed-0.0.3-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details
graphed-0.0.3-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details
graphed-0.0.3-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
graphed-0.0.3-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
graphed-0.0.3-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
graphed-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 83.1 MB

Release files / graphed-0.0.3.tar.gz

Download URL graphed-0.0.3.tar.gz
Size 6.0 MB
Tags Source
SHA-256 checksum
How to use checksums
4d3a0d38d3f4111f3398cfda359464131708957d3df51bf903ec19c41c8c6574
BLAKE2b-256 checksum
How to use checksums
127f476b7ff0579abf930d21d59b4b8d2d33a236a174d44f2524419d306a4e81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp314-cp314t-win_amd64.whl

Download URL graphed-0.0.3-cp314-cp314t-win_amd64.whl
Size 5.4 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
3bf154d674d820dc0104a0107f9250fff5c834ebb1b25471a43a9f0ebbe47d36
BLAKE2b-256 checksum
How to use checksums
07e7fed319a4dd04a75c27762aaaf8a09df01ab94b4bdece47fd4a965f0f3976
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl

Download URL graphed-0.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl
Size 5.6 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
3c6facac60290a1ccf6bc3ba8a4f403ceb7cbfe88a62c4772b37c50dfce38885
BLAKE2b-256 checksum
How to use checksums
3121b607eacf08961de7c6d600cb51686267d4ea284d52dc6a220a37f0e44169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl

Download URL graphed-0.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl
Size 5.6 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
771cd163bc7b578ace0a116d7606da34e70089a83db6436f2b6b84b8548a9d18
BLAKE2b-256 checksum
How to use checksums
966d9ff2743c632e8f5263de58244f10f9893b355de6f72454878cf1db7f6de6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL graphed-0.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 5.5 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
879fb1531ec2c57477585ace16a121db321dee3f3bc6e0994d7de47c8d30fa75
BLAKE2b-256 checksum
How to use checksums
bfc5779e7e4d367b6d57818641904286ea45dfb9fbb29dc56650d17c3b23b180
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl

Download URL graphed-0.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl
Size 5.5 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
4a49273001c17790b9591d63dad46e3823645c7baca82b45095b7b8462c93ac9
BLAKE2b-256 checksum
How to use checksums
8950d04534b7bc6d38d87f2f055f52ff5348daff81f3d7f96bf5fb3112176f16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp314-cp314t-macosx_11_0_arm64.whl

Download URL graphed-0.0.3-cp314-cp314t-macosx_11_0_arm64.whl
Size 5.5 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
37a80b8a33dabf5e45ea7c0057c266189c3fe3bc21efcab9917141e2706efe7a
BLAKE2b-256 checksum
How to use checksums
cfa0993b5e742b2a82c76802500e6c34455fc243d4414b5be6b2b39b94db8f90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp314-cp314t-macosx_10_15_x86_64.whl

Download URL graphed-0.0.3-cp314-cp314t-macosx_10_15_x86_64.whl
Size 5.5 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
6cc4b201b4ececa30d2e58d90fee01a73f90c1d7256a82fa3796d2534601532e
BLAKE2b-256 checksum
How to use checksums
976304c7be5e6cd3b78b4d60e0512fce96087c5dd799841c2cef81b7a2023738
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp311-abi3-win_amd64.whl

Download URL graphed-0.0.3-cp311-abi3-win_amd64.whl
Size 5.4 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c1132da88c4febc42639590a73e7552d5d32b227e5bee6a19f622180e283257c
BLAKE2b-256 checksum
How to use checksums
fa7cd6afba3f653b14236f2e8d795b2bf61ac16033c09392903c6081cb2dc010
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL graphed-0.0.3-cp311-abi3-musllinux_1_2_x86_64.whl
Size 5.6 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
52cb17cd976e77dd2455dfdaa951fbefcc21688707aa25af54efd0552439f56c
BLAKE2b-256 checksum
How to use checksums
e97aa2e27efeb91565329b8b1b6d3df842cfbdaee2788368a587a3831f79e328
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL graphed-0.0.3-cp311-abi3-musllinux_1_2_aarch64.whl
Size 5.6 MB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
36e4804fc03517c4a080ce8a0f752a7f8ea64a4fb6ffdeef6d8d10715d54ff31
BLAKE2b-256 checksum
How to use checksums
2f4ff676710cc1fe0a2f0eadea3e51b78a79735ca63ccf3b71d08c97b2b0dca5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL graphed-0.0.3-cp311-abi3-manylinux_2_28_x86_64.whl
Size 5.5 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
54e35d7f5b4217874f26f2e7dc246107b1da6f1ebd2e001768c0b5147d8818ab
BLAKE2b-256 checksum
How to use checksums
5a4e854101c94bf3a8533b506fd9ab48cb85a61b106648ceb108306641acc045
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL graphed-0.0.3-cp311-abi3-manylinux_2_28_aarch64.whl
Size 5.5 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
364480aa12a3a80cfc27e2ae7c317bc9339c475f2a89fe3047bc5b9bfe6f4f77
BLAKE2b-256 checksum
How to use checksums
0842208d23c1f87eb403ec7fdd7a2db9ccae6ca12061f66ba5d098d84b20f434
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp311-abi3-macosx_11_0_arm64.whl

Download URL graphed-0.0.3-cp311-abi3-macosx_11_0_arm64.whl
Size 5.5 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5d7003aa36cb0c178f1a6a5c0d1c5180894cc459940fc8225801be5d7f8dbd1c
BLAKE2b-256 checksum
How to use checksums
8fc491d7a0cb766b6af2dcb4515915c6ad6d9293dc72a2c333fdfbb6b32d379b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / graphed-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl

Download URL graphed-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl
Size 5.5 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
08553fedcf58faf2fb86915371f73f83f81d79731f94adc7e571319da628882e
BLAKE2b-256 checksum
How to use checksums
c36ba2cc497c23eec9aa5270c99325ccd2ed167ac44a3aa5a614584d09304050
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.0.6

25 release files

0.0.5

22 release files

0.0.4

15 release files

This release

0.0.3 This release

15 release files

0.0.2

15 release files

0.0.1

21 release 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