pipekit’s interoperability story is structural: algorithm and domain libraries plug in by satisfying a Protocol, never by inheriting from a pipekit base class or importing pipekit at all.
Every protocol except pipekit-train’s Callback (whose hooks are all optional) is @runtime_checkable, so isinstance(obj, ForwardModel) succeeds on any structurally compatible class, and adapters in filterax, vardax, geotoolz and xrtoolz stay dependency-free.
This page is the inventory: what each protocol is for, where it lives, and who satisfies it.
Carrier-agnostic seams for model-inference wrappers.
Protocol
Contract
Satisfied by
Predictor
predict(x)
scikit-learn estimators, Keras models, geotoolz GeoTensorEstimator, xrtoolz XarrayEstimator
FittableTransformer
fit(x) + transform(x)
scikit-learn transformers, the carrier-aware sklearn wrappers in geotoolz / xrtoolz
Models invoked via bare __call__ (PyTorch modules, JAX functions) are covered by callable(model); a __call__-only Protocol would match nearly everything, so pipekit deliberately doesn’t define one.
Carriers and stores (pipekit_ops.carriers, pipekit_ops.saving)¶
Protocol
Contract
Satisfied by
NamedArrayAdapter
dims(x), data(x), labels(x, dim), rewrap(…), … per carrier family
pipekit-array’s DimArrayAdapter and xarray adapter, or a carrier library’s own; registered with register_adapter
LabelledAdapter
relabel(x, labels)
adapters that can set the labels of new or renamed dims (optional)
ConvertingAdapter
to_backend(x, backend)
adapters whose carriers have more arrays than their data (optional)
MissingValueAdapter
keep_missing(out, *inputs)
adapters whose carriers mark missing elements in their data, such as a fill value (optional)
Store
key in store, load(key), save(key, value)
MemoryStore, DirectoryStore; where a Cache(op, store=name) keeps its entries
A rollout component that says how gradients flow through it, with a spec from pipekit_cycle.cycles; integrix.adjoint.to_diffrax_adjoint and integrix.adjoint.truncated_scan interpret it
your own adapters and ad-hoc writers; none ships yet (the [mlflow] and [wandb] extras only pin those libraries)
MetricWriter
write(step, metrics), close()
pipekit_experiment.JSONLWriter (re-exported by pipekit-train) and FanoutWriter, your own writers; TrainingLoop and sesmax-experiment’s run record write to it
Protocols are minimal: only the members the consuming cycle or loop actually calls. Optional capabilities (e.g. ObservationOperator.linearize) may raise NotImplementedError.
runtime_checkable checks method presence, not signatures, so treat isinstance as a structural sniff, not a type-safety guarantee.
Domain-specific interfaces stay in domain libraries: vardax keeps its
Prior / GradModulator / CostFunction / Minimiser protocols,
geotoolz keeps band resolution and tiled inference. Only seams shared
by two or more consumers are promoted here.