Skip to main content

Batch inference

Partition a large input, infer concurrently, and merge traceable predictions.

Batch inference

Activity responsibilities

ActivityResponsibility
load-modelExecute the load model stage and publish its declared outputs for downstream activities.
partition-inputExecute the partition input stage and publish its declared outputs for downstream activities.
infer-shard-aExecute the infer shard A stage and publish its declared outputs for downstream activities.
infer-shard-bExecute the infer shard B stage and publish its declared outputs for downstream activities.
infer-shard-nExecute the infer shard N stage and publish its declared outputs for downstream activities.
merge-predictionsExecute the merge predictions stage and publish its declared outputs for downstream activities.
publishExecute the publish stage and publish its declared outputs for downstream activities.

Inputs

  • Approved model
  • Input dataset
  • Inference configuration

Outputs

  • Prediction shards
  • Merged predictions
  • Completeness report

Provenance to preserve

  • Shard boundaries
  • Model digest
  • Per-shard logs

Runnable example

This is the complete checked-in bundle for this pattern. Download the environment, scope, topology, workflow, input, container recipe, runner, and validation contract from this page before executing it.

Verified local execution

These captures and the output manifest were produced by the fixture's local Docker run and validator. They are published with the same bundle as the runnable files.

Batch inference workflow execution evidence
Workflow evidence
Batch inference execution evidence
Execution evidence
Batch inference output evidence
Output evidence
Open verified output manifest ↓

Execution considerations

Place shards according to memory, accelerator availability, and data locality. The merge stage must detect missing shards.

AkôFlow boundary: the engine schedules, deploys, executes, transfers data, and records evidence. The ML or agent framework remains an implementation choice inside each activity.