RayModuleTransformScheme¶
- class torchrl.weight_update.RayModuleTransformScheme(strategy: str = 'tensordict')[source]¶
Weight synchronization for RayModuleTransform actors.
This scheme is designed specifically for updating models hosted within Ray actors, such as RayModuleTransform instances. It creates a transport that directly calls the actor’s weight update methods.
- Parameters:
strategy (str) – The weight transmission strategy (“state_dict” or “tensordict”). Default is “tensordict”.
- create_receiver() RayModuleTransformReceiver[source]¶
Create a specialized receiver for Ray actor communication.
- create_sender() RayModuleTransformSender[source]¶
Create a specialized sender for Ray actor communication.
- create_transport(pipe_or_context: Any) TransportBackend[source]¶
Create RayActorTransport for the given actor.
- Parameters:
pipe_or_context – Either a Ray actor reference or a context object from which to extract the actor reference.
- Returns:
RayActorTransport configured with the actor reference.