In this article
A runner changes where node code executes; serialization, shared state and hook assumptions belong in the execution contract.
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.
Processes and threads are different contracts
The runner guide 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 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 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 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.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.