﻿# Kedro runner selection: process boundaries change state ownership, not just concurrency

Choose a Kedro runner by examining process boundaries, dataset compatibility and hook execution before moving a model pipeline into concurrent execution.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-kedro-runner-process-boundary-state-ownership/
Language: en

## The model object in the parent process

A retrieval experiment loads an embedding model while constructing its pipeline, then closes over that object in several node functions. Sequential execution works, so an engineer switches runners to overlap document preparation. A failure before inference is easily mistaken for a model defect. The real question is whether the execution boundary supports the objects the project carries across it.

Draw the lifetime of the model, storage client and dataset separately. A Python reference visible during pipeline construction is not evidence that every worker receives a usable equivalent. This distinction also matters when measuring [host and device cooperation](/journal/cpu-gpu-hybrid-architecture/).

## Processes and threads are different contracts

The [runner guide](https://docs.kedro.org/en/stable/build/run_a_pipeline/) distinguishes multiprocessing from threaded execution and explains start-method selection. A fresh worker and an inherited process image make different assumptions about initialization. Neither setting automatically partitions model weights or assigns separate accelerators.

Keep initialization inside a deliberate execution boundary. Pass a model identifier or immutable artifact reference where appropriate, then establish the runtime resources there. This is an architectural choice rather than a promise that any particular object can be serialized safely.

## Validate catalog compatibility

The [ParallelRunner API](https://docs.kedro.org/en/stable/api/runner/kedro.runner.ParallelRunner/) documents catalog validation and process-based workers. A dataset that is restricted to a single process should not be treated as an ordinary transfer container. Storage-backed outputs may provide a clearer boundary, provided their paths and writes are coordinated.

Separate serialization failure from resource exhaustion: a catalog rejected before scheduling says nothing about how much accelerator memory a model needs. Repeatedly reducing batch size cannot repair that category of failure.

## Preserve behavior beyond node returns

The [ThreadRunner API](https://docs.kedro.org/en/stable/api/runner/kedro.runner.ThreadRunner/) describes a thread-based executor. Shared process state still requires attention to concurrent mutation. Also check the documented hook behavior of each runner before relying on a hook for validation, measurement or cleanup.

For a concrete review, identify which component closes the storage connection and which records the completed output. A different execution mechanism should not silently remove the only place that performs either action.

## Test the boundary with an observable result

Run a small immutable input through the intended runner, recording artifact identity, initialization location and successful output publication. Compare actual results rather than assuming concurrent execution preserves every incidental side effect.

Inspect [stream ordering dependencies](/journal/learn-stream-ordering-dependencies/) separately when device work is asynchronous. Pipeline scheduling and accelerator completion are related layers, but a completed Python node is meaningful only under the synchronization contract used by its code.
