rllib/agents/trainer.py
def _create_local_replay_buffer_if_necessary(
        self, config: PartialTrainerConfigDict
    ) -> Optional[Union[MultiAgentReplayBuffer, Legacy_MultiAgentReplayBuffer]]:
        """Create a MultiAgentReplayBuffer instance if necessary.

        Args:
            config: Algorithm-specific configuration data.

        Returns:
            MultiAgentReplayBuffer instance based on trainer config.
            None, if local replay buffer is not needed.
        """
        if not config.get("replay_buffer_config") or config["replay_buffer_config"].get(
            "no_local_replay_buffer" or config.get("no_local_replay_buffer"), False
        ):
            return

        buffer_type = config["replay_buffer_config"]["type"]
        return from_config(buffer_type, config["replay_buffer_config"])
Create a MultiAgentReplayBuffer instance if necessary.

        Args:
            config: Algorithm-specific configuration data.

        Returns:
            MultiAgentReplayBuffer instance based on trainer config.
            None, if local replay buffer is not needed.
        
Create a MultiAgentReplayBuffer instance if necessary.
Create a MultiAgentReplayBuffer instance if necessary .
def _create_local_replay_buffer_if_necessary(
        self, config: PartialTrainerConfigDict
    ) -> Optional[Union[MultiAgentReplayBuffer, Legacy_MultiAgentReplayBuffer]]:
        if not config.get("replay_buffer_config") or config["replay_buffer_config"].get(
            "no_local_replay_buffer" or config.get("no_local_replay_buffer"), False
        ):
            return
        buffer_type = config["replay_buffer_config"]["type"]
        return from_config(buffer_type, config["replay_buffer_config"])
def _create_local_replay_buffer_if_necessary ( self , config : PartialTrainerConfigDict ) -> Optional [ Union [ MultiAgentReplayBuffer , Legacy_MultiAgentReplayBuffer ] ] : if not config . get ( "replay_buffer_config" ) or config [ "replay_buffer_config" ] . get ( "no_local_replay_buffer" or config . get ( "no_local_replay_buffer" ) , False ) : return buffer_type = config [ "replay_buffer_config" ] [ "type" ] return from_config ( buffer_type , config [ "replay_buffer_config" ] )
Create a MultiAgentReplayBuffer instance if necessary.
Create a MultiAgentReplayBuffer instance if necessary .
"""Create a MultiAgentReplayBuffer instance if necessary.

        Args:
            config: Algorithm-specific configuration data.

        Returns:
            MultiAgentReplayBuffer instance based on trainer config.
            None, if local replay buffer is not needed.
        """
MultiAgentReplayBuffer instance based on trainer config.
None, if local replay buffer is not needed.
MultiAgentReplayBuffer instance based on trainer config . None if local replay buffer is not needed .
self
config
PartialTrainerConfigDict
Algorithm-specific configuration data.
Algorithm - specific configuration data .