rllib/agents/dqn/r2d2.py
def validate_config(self, config: TrainerConfigDict) -> None:
        """Checks and updates the config based on settings.

        Rewrites rollout_fragment_length to take into account burn-in and
        max_seq_len truncation.
        """
        # Call super's validation method.
        super().validate_config(config)

        if config["replay_buffer_config"]["replay_sequence_length"] != -1:
            raise ValueError(
                "`replay_sequence_length` is calculated automatically to be "
                "model->max_seq_len + burn_in!"
            )
        # Add the `burn_in` to the Model's max_seq_len.
        # Set the replay sequence length to the max_seq_len of the model.
        config["replay_buffer_config"]["replay_sequence_length"] = (
            config["burn_in"] + config["model"]["max_seq_len"]
        )

        if config.get("batch_mode") != "complete_episodes":
            raise ValueError("`batch_mode` must be 'complete_episodes'!")
Checks and updates the config based on settings.

        Rewrites rollout_fragment_length to take into account burn-in and
        max_seq_len truncation.
        
Checks and updates the config based on settings.
Rewrites rollout_fragment_length to take into account burn-in and
max_seq_len truncation.
Checks and updates the config based on settings . Rewrites rollout_fragment_length to take into account burn - in and max_seq_len truncation .
def validate_config(self, config: TrainerConfigDict) -> None:
        super().validate_config(config)
        if config["replay_buffer_config"]["replay_sequence_length"] != -1:
            raise ValueError(
                "`replay_sequence_length` is calculated automatically to be "
                "model->max_seq_len + burn_in!"
            )
        config["replay_buffer_config"]["replay_sequence_length"] = (
            config["burn_in"] + config["model"]["max_seq_len"]
        )
        if config.get("batch_mode") != "complete_episodes":
            raise ValueError("`batch_mode` must be 'complete_episodes'!")
def validate_config ( self , config : TrainerConfigDict ) -> None : super ( ) . validate_config ( config ) if config [ "replay_buffer_config" ] [ "replay_sequence_length" ] != - 1 : raise ValueError ( "`replay_sequence_length` is calculated automatically to be " "model->max_seq_len + burn_in!" ) config [ "replay_buffer_config" ] [ "replay_sequence_length" ] = ( config [ "burn_in" ] + config [ "model" ] [ "max_seq_len" ] ) if config . get ( "batch_mode" ) != "complete_episodes" : raise ValueError ( "`batch_mode` must be 'complete_episodes'!" )
Checks and updates the config based on settings.
Checks and updates the config based on settings .
"""Checks and updates the config based on settings.

        Rewrites rollout_fragment_length to take into account burn-in and
        max_seq_len truncation.
        """ # Call super's validation method. # Add the `burn_in` to the Model's max_seq_len. # Set the replay sequence length to the max_seq_len of the model.
self
config
TrainerConfigDict