A family of Python packages for composable scientific pipelines, built on two foundations you can use on their own: pipekit-ops for operators and pipekit-array for named-dim arrays.
Every step of a scientific workflow (reading a scene, a QC check, a composite, a model, a forecast step, a training loop) becomes an Operator that takes a carrier and returns one.
Operators chain with |, wire into graphs, wrap in retries, caches and observers, map over many inputs, and save to JSON, and each of those is itself an Operator.
Install only what you need: each package is its own distribution, and the pipekit umbrella is there for when you want all of them.
The layering¶
your pipeline
│
pipekit-cycle time steps, DA cycles
pipekit-train training loops
pipekit-experiment registry, trackers
pipekit-evaluate benchmarks, scorers
pipekit-jax JAX / Equinox models
│
▼ build on
┌─────────────────────────────────┐
│ pipekit-array │
│ named dims, any Array API │
│ backend │
├─────────────────────────────────┤
│ pipekit-ops │
│ Operator, Sequential, Graph; │
│ pure Python, no dependencies │
└─────────────────────────────────┘
two foundations, each usable
on its ownpipekit-ops is a zero-dependency operator graph for any carrier:
Operator,|andGraph, control flow, caching and stores, parallelMap, observers, QC and a JSON round-trip with a content hash. The tour of the core covers every name.pipekit-array is named-dim array operators on any Array API backend: one operator runs on NumPy, JAX, CuPy, PyTorch or dask, and on a
DimArray, anxr.DataArrayor any carrier that registers an adapter.
The rest of the family builds on them. pipekit-ops depends on nothing, and pipekit-array, pipekit-cycle, pipekit-experiment and pipekit-train depend on pipekit-ops only; pipekit-evaluate adds NumPy, and pipekit-jax adds pipekit-cycle, JAX, Equinox and jaxtyping.
Both foundations in one example¶
A year of Sentinel-2 over one tile: twelve monthly scenes, four bands and 64 by 64 pixels.
pipekit-array gives the named cube and the steps by dim name; pipekit-ops gives the shape check, the |, the summary and the JSON round-trip.
import numpy as np
import pipekit_array as pa
import pipekit_ops as pk
# Shapes: T = 12 monthly scenes; B = 4 bands; Y = X = 64 pixels; K = 3 months per season
rng = np.random.default_rng(0)
reflectance = rng.uniform(0.0, 0.4, size=(12, 4, 64, 64)).astype(np.float32)
# today (pipekit-array)
cube = pa.DimArray(
reflectance, # (T, B, Y, X)
("time", "band", "y", "x"),
{"band": ("B02", "B03", "B04", "B08")},
)
# today (pipekit-ops)
check = pk.AssertSignature("time band y x", dtype="float32")
# today (pipekit-array)
# s_{q,b,i,j} = (1/K) ∑ₖ x_{Kq+k,b,i,j}
seasonal = pa.Coarsen("mean", time=3)
# today (pipekit-array)
# m_{q,b} = (1/(Y X)) ∑ᵢ ∑ⱼ s_{q,b,i,j}
scene_mean = pa.Reduce("mean", ("y", "x"))
# today (pipekit-ops)
pipeline = check | seasonal | scene_mean
table = pipeline(cube) # (T, B, Y, X) → (T/K, B)
# every intermediate shape, before or after running
print(pipeline.summary(pk.signature_of(cube)))
# today (pipekit-ops)
again = pk.loads(pk.dumps(pipeline))
assert pk.pipeline_hash(again) == pk.pipeline_hash(pipeline)
# the same pipeline on an xarray carrier: band labels come back as a coordinate
table_xr = pipeline(cube.to_xarray()) # (T, B, Y, X) → (T/K, B)To train an emulator, register it and forecast with it as the forward model, follow Getting Started.
Three doors¶
From git clone to your first pipeline, first DA cycle, and first registered model, in five minutes of copy and paste.
The 10-minute mental model. What’s an Operator? Why carrier-agnostic? How does dispatch work?
One worked example across the packages: clean an archive, train an emulator, store it in a registry, and run it as a cycle’s forward model. The other tutorials sit with their package in the sidebar.
Per-package install matrix. Every extra spelled out.
mkdocstrings-generated reference, kept in sync with source.
Executed notebooks for pipekit-train: an MLP, the handoff to a cycle, and the NumPyro, BlackJAX and Keras backends.
The packages¶
Each package has a section in the sidebar that starts with its quickstart, and its own README on GitHub, which is also its PyPI page.
| Package | Its operators | Start from | Version | |
|---|---|---|---|---|
| pipekit-ops | any step, and every way of combining steps | Operator, Sequential, Graph, Map | 0.4.0 | |
| pipekit-array | array operations by dim name | DimArray, Reduce, Coarsen, KernelOp | 0.3.1 | |
| pipekit-cycle | a forecast and an analysis, repeated on a clock | Cycle, DACycle, EnsembleDACycle | 0.3.1 | |
| pipekit-train | a fit that returns a trained model | TrainingLoop, HyperSweep | 0.3.1 | |
| pipekit-evaluate | a score against a reference | MetricScorer, evaluate, Benchmark | 0.3.1 | |
| pipekit-experiment | a model stored under its hash | LocalModelRegistry, S3ModelRegistry | 0.2.1 | |
| pipekit-jax | operators that are JAX pytrees | JaxOperator, JaxModelOp, ScanCycle | 0.4.1 |