liveBook · Manning

Batch inference

As explained in Machine Learning Platform Engineering

Batch inference is the process of applying a trained machine-learning model to a finite collection of inputs in grouped execution rather than one request at a time.

Batch inference applies a trained model to a finite collection of inputs in grouped execution. In production, it is commonly coordinated as a reproducible pipeline rather than run manually. section 5.0 section 10.1

A production batch-inference workflow typically coordinates these stages:

  • Fetch an entity dataset from object storage. section 5.1.2
  • Retrieve the required features from a feature store. section 5.1.2
  • Load a named model version and run inference over the feature data. section 5.1.2
  • Write predictions to an output bucket for downstream use. section 5.1.2

Income-classifier pipeline

A Kubeflow pipeline connects data loading, feature retrieval, model inference, and output writing. Pipeline parameters include storage credentials, feature configuration, model name, model type, model stage, and output location; compilation produces a YAML workflow for execution. section 5.1.2

Listing 5.11 Income classifier Kubeflow pipeline
import kfp
from kfp import dsl, compiler
fetch_data_op = kfp.components.load_component_from_file(
    "components/read_data/component.yaml"
)
retrieve_features_op = kfp.components.load_component_from_file(
    "components/retrieve_features/component.yaml"
)
run_inference_op = kfp.components.load_component_from_file(
    "components/run_inference/component.yaml"
)

write_data_op = kfp.components.load_component_from_file(
    "components/write_data/component.yaml"
)

The component listing makes the workflow structure concrete by showing separate operations for reading data, retrieving features, running inference, and writing results. section 5.1.2

How Machine Learning Platform Engineering covers it

How deep it goes
Traces data loading, feature retrieval, model execution, output writing, compilation, and pipeline execution, but defers serving implementation.
Examples
Uses an income-classification pipeline with MinIO inputs and outputs, feature retrieval, staged model selection, and compiled KFP YAML.
What it assumes
Assumes familiarity with MLflow, feature management, stored datasets, and trained model versions while teaching orchestration from pipeline components.
What you can do after
Apply it via Kubeflow Pipelines to build, compile, schedule, and track reproducible dataset-scoring workflows.
How it connects
Connects model inference with Kubeflow Pipelines, feature stores, MLflow, object storage, model deployment, and real-time inference.

Also explained in

Compare how 3 books explain batch inference →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.