Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Boundaries

1. Open questions & future work

Q1. FFT and advanced linear algebra

The Array API standard’s linalg and fft extensions are specified but inconsistently implemented across backends. None of the v0.1 operators needs them, so they are not in scope for v0.1. When a user asks for Spectrogram, WaveletDecompose or MatchedFilter-style operators (the natural pull), the right answer is probably a pipekit-array[fft] sub-extra that pins array-api-compat[fft] and adds the extension-using operators in their own module (pipekit_array.spectral). This is logged as v0.2 work and does not block anything.

Q2. pipekit_array.ModelOp and torchscript / Keras SavedModel

ModelOp is not built yet. The v0.1 design holds the model object directly and calls it, without serialising the model. The natural next step (“serialise the model alongside the operator”) splits along backend:

A v0.2 ModelOp.serialise(format=...) would orchestrate these. v0.1 expects the user to pickle the whole operator (which works for sklearn and NumPy models) or to supply the serialised model out of band.

Q3. Sharding for BatchAlong

pipekit_array.BatchAlong (shipped in #206) is a single-device sequential loop: split a named dim, apply, concatenate. The natural v0.2 extension is BatchAlong(..., devices=jax.devices()), using jax.experimental.shard_map for JAX inputs and torch.distributed for torch. It is single-backend (no Array API path), so it needs per-backend dispatch, which likely belongs in a pipekit-jax / pipekit-torch follow-up and not in pipekit-array core (ADR A4).

Q4. Streaming Histogram for online statistics

The v0.1 Histogram controller (not built yet) holds all captured arrays in memory and computes the histogram at report() time. For very large arrays, a streaming implementation (a hist field updated on every call via xp.histogram) is the v0.2 polish. The API does not change; only the storage shape does.

Q5. Auto-detect compute() boundary for dask

Per ADR A7, dask laziness is the user’s responsibility. If user demand grows, a pipekit_array.dask.AutoCompute() operator (a no-op for non-dask backends, a .compute() for dask) is the safe escape hatch. It is opt-in, so it does not break the laziness contract for users who want it.

Q6. Mixed-backend pipelines

ADR A1 and the array_namespace(*xs) discipline (architecture R2) make mixed-backend pipelines fail loudly at the first multi-input operator. The alternative, converting automatically at boundaries, was rejected. If a real use case demands it (rare, but for example “compute on JAX, log to NumPy”), we would add a pipekit_array.convert.To(backend) operator: single-purpose, explicit and opt-in. This is logged as a v0.2 issue if anyone asks for it.

Reversed for NumPy and JAX (ADR A24). NumPy next to JAX joins it in every layer, and pipekit_ops.guard reports it on request. Any other mix still fails loudly: dask next to NumPy or JAX, or another library next to JAX, raises BackendError (join_backends in pipekit_array.named).

Plain functions. pipekit_array.arrays goes further (ADR A23): values on the host join any other library, and two libraries other than NumPy raise BackendError.

Q7. Signature integration depth

The v0.1 plan: operators that reshape (ApplyAlong, Subsample, BatchAlong) override compute_output_signature, and operators that pass through inherit. The deeper integration (Array API operators taking part in Sequential.summary’s shape inference and catching shape mismatches at compose time) is a v0.2 polish, tracked by a single follow-up issue once v0.1 lands.

As built. ApplyAlong, BatchAlong, MeanScalar and every dim-function twin implement compute_output_signature, and gate G9 checks it against signature_of(op(x)) on the running example of Dim-level functions: the missing ones.

2. Non-goals

These were explicitly considered and rejected for the v0.1 scope.

3. v0.1 Definition of Done

The v0.1 implementation PRs close on the list below; ticks mark what pipekit-array 0.3.1 has.

4. v0.1 implementation phasing

Suggested chunking for the implementation PRs:

  1. Phase A: Foundations. array_namespace, the conftest fixture, MeanScalar, StackAlong, ConcatenateAlong. About 150 LOC; it sets the per-backend test pattern. One PR. Done.

  2. Phase B: Catalogue body. Subsample, ApplyAlong, BatchAlong, Histogram. About 200 LOC, one PR. Partly done: ApplyAlong and BatchAlong shipped with phase 3 of the dim functions (#206), and Subsample was retired; Histogram is not built.

  3. Phase C: QC suite. AssertClose, AssertValueRange, AssertNoNaN, AssertValidFraction. About 100 LOC, one PR (it delegates the check logic to shared helpers). Not started.

  4. Phase D: ModelOp, docs, notebook and DoD close. About 150 LOC plus docs, one PR, which closes v0.1. Not started.

The total estimate is 4 PRs, about 600 LOC of source, about 400 LOC of tests, and docs. The numbers track Report 3’s “12 operators, ~400 LOC” estimate plus the test fan-out across backends.

The dim-level functions were not in this phasing; they shipped in their own four phases (#204 to #207), described in Dim-level functions: the missing ones §8.

5. Versioning targets

These were the targets when the design was written. The package reached 0.3 by another route: the dim-level functions, the plain-array functions of pipekit_array.arrays and the six areas of ADR A30. None of Q1 to Q5 has shipped.

The cadence matches the rest of the pipekit workspace: roughly one minor bump per quarter, gated on the v0.1 scope landing first.