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.

pipekit-train Design Doc

A thin orchestration layer over existing training tools, exposed as pipekit_ops.Operators. Trained models drop into inference pipelines without rewrite.

Structure

docs/design/
├── README.md              # This file — index and reading order.
├── vision.md              # Motivation, scope, three training shapes.
├── architecture.md        # The layered design + integration with
│                          # pipekit, pipekit-cycle, pipekit-experiment.
├── boundaries.md          # Non-goals, open questions, future work.
├── decisions.md           # ADRs D1–D14 (carrier-agnostic + Equinox +
│                          # sharding + NumPyro + BlackJAX).
├── numpyro_adapter.md     # Full design — the NumPyro backends numpyro-svi
│                          # + numpyro-mcmc. Companion to api/adapters.md.
├── blackjax_adapter.md    # Full design — the BlackJAX sampler backend
│                          # (NUTS / SG-MCMC). Sibling to numpyro_adapter.md.
├── keras_adapter.md       # Full design — the Keras 3 backend on JAX
│                          # (compile/fit, KerasModelOp, EquinoxLayer)
│                          # and its plan.
├── api/
│   ├── README.md          # Core abstractions (TrainingDataset,
│   │                      # Loss, TrainingLoop, Callback, MetricWriter).
│   ├── datasets.md        # Layer 0 — TrainingDataset, CatalogDataset,
│   │                      # SimulationDataset, CachedDataset.
│   ├── primitives.md      # Layer 1 — Loss protocol, common Loss ops,
│   │                      # train_step (Equinox), save/restore (Orbax).
│   ├── components.md      # Layer 2 — Callback, MetricWriter,
│   │                      # ValidationStep, EarlyStopping, Checkpoint,
│   │                      # LogToExperiment.
│   ├── models.md          # Layer 3 — TrainingLoop (StatefulOperator),
│   │                      # the outer loop, the TrainingArtifact handshake.
│   └── adapters.md        # Layer 4 — Equinox (v0.1 reference),
│                          # Keras (compile and fit on JAX).
└── examples/
    ├── README.md          # Index and reading order.
    ├── direct.md          # Cloud-mask classifier (CatalogDataset).
    ├── emulator.md        # Chemistry surrogate (SimulationDataset).
    ├── amortized.md       # Neural posterior for plume source (SBI).
    └── integration.md     # With pipekit-cycle, pipekit-experiment,
                           # geocatalog, geopatcher, somax, vardax, pyrox.

Reading Order

  1. Vision — what gap this fills, what it isn’t.

  2. Architecture — the layered design and where each piece sits in the stack.

  3. Design Decisions — the ADRs that lock the shape in.

  4. API Overview — Core Abstractions → drill into datasets → primitives → components → models → adapters.

  5. examples/ — see the three training shapes in code.

  6. Boundaries — what’s deferred and why.

Sources

The design synthesises two upstream sources:

Where the two diverge, this doc resolves the tension explicitly — see Design Decisions for the ADRs.