rlightning.weights.weight_buffer_mixin¶
- class rlightning.weights.weight_buffer_mixin.WeightBufferMixin[source]¶
Bases:
objectMixin class for weight buffer management functionality. This mixin provides methods for initializing, updating, and managing weight buffers for policy weight transfer between train and eval policies.
- recv_weights(metadata_by_dtype)[source]¶
Receive the weights from the train policy. Only call this method from train policy, in weight_transfer_manager.send_weights()
- recv_weights_local(state_dict)[source]¶
This method is used to receive weights locally without using ray in running on a single process.
- sync_weights_layer_by_layers(module_name, name, dtype, shape, is_last: bool = False)[source]¶
Sync the weight from the train policy layer by layer.