dockyard_rl.data_plane.factory

Single entrypoint that maps a :class:DataPlaneConfig to a client.

Module Contents

Functions

build_data_plane_client

Construct the configured data-plane client.

API

dockyard_rl.data_plane.factory.build_data_plane_client(cfg: dockyard_rl.data_plane.interfaces.DataPlaneConfig | None, *, bootstrap: bool = True) dockyard_rl.data_plane.interfaces.DataPlaneClient

Construct the configured data-plane client.

Dispatches on cfg["impl"]:

  • "transfer_queue" — the production TransferQueue-backed adapter.

  • "noop" — the in-memory reference adapter (single-process / CI / local dry-runs); a dockyard addition over the upstream, which kept NoOp test-only. Selecting it is explicit (impl="noop"), never a silent fallback.

Raises if data_plane is disabled — the colocated trainer (dockyard_rl.algorithms.grpo.grpo_train) should be used in that case rather than a NoOp fallback here.

Args: cfg: Data-plane config; must have enabled=True. bootstrap: True on the driver — bootstraps the TQ controller. False on worker processes — connects to the existing controller (avoids creating a second named actor). Ignored by the noop adapter (single-process).

Returns: A configured DataPlaneClient; wrapped in :class:MetricsDataPlaneClient when observability is enabled.