RayModuleTransformSender¶
- class torchrl.weight_update.RayModuleTransformSender(scheme: RayModuleTransformScheme)[source]¶
Specialized sender for
RayModuleTransformactors.This sender handles weight updates for models hosted within Ray actors. Unlike the base WeightSender which uses pipes for multiprocessing, this sender directly communicates with Ray actors via their remote methods.
For Ray actors, there is typically only one shared actor instance, so we store a single transport rather than per-worker transports.
- register_worker(worker_idx: int, pipe_or_context: Any) None[source]¶
For Ray actors, worker registration is a no-op.
Ray actors are shared across all workers, so we don’t need per-worker transports. The actor reference is resolved lazily on first use.