rllib/agents/trainer_config.py
def reporting(
        self,
        *,
        keep_per_episode_custom_metrics: Optional[bool] = None,
        metrics_episode_collection_timeout_s: Optional[int] = None,
        metrics_num_episodes_for_smoothing: Optional[int] = None,
        min_time_s_per_reporting: Optional[int] = None,
        min_train_timesteps_per_reporting: Optional[int] = None,
        min_sample_timesteps_per_reporting: Optional[int] = None,
    ) -> "TrainerConfig":
        """Sets the config's reporting settings.

        Args:
            keep_per_episode_custom_metrics: Store raw custom metrics without
                calculating max, min, mean
            metrics_episode_collection_timeout_s: Wait for metric batches for at most
                this many seconds. Those that have not returned in time will be
                collected in the next train iteration.
            metrics_num_episodes_for_smoothing: Smooth metrics over this many episodes.
            min_time_s_per_reporting: Minimum time interval to run one `train()` call
                for: If - after one `step_attempt()`, this time limit has not been
                reached, will perform n more `step_attempt()` calls until this minimum
                time has been consumed. Set to None or 0 for no minimum time.
            min_train_timesteps_per_reporting: Minimum train timesteps to
                optimize for per `train()` call. This value does not affect learning,
                only the length of train iterations. If - after one `step_attempt()`,
                the training timestep counts have not been reached, will
                perform n more `step_attempt()` calls until the minimum timesteps have
                been executed. Set to None or 0 for no minimum timesteps.
            min_sample_timesteps_per_reporting: Minimum sample timesteps to
                optimize for per `train()` call. This value does not affect learning,
                only the length of train iterations. If - after one `step_attempt()`,
                the sampling timestep counts (have not been reached, will
                perform n more `step_attempt()` calls until the minimum timesteps have
                been executed. Set to None or 0 for no minimum timesteps.

        Returns:
            This updated TrainerConfig object.
        """
        if keep_per_episode_custom_metrics is not None:
            self.keep_per_episode_custom_metrics = keep_per_episode_custom_metrics
        if metrics_episode_collection_timeout_s is not None:
            self.metrics_episode_collection_timeout_s = (
                metrics_episode_collection_timeout_s
            )
        if metrics_num_episodes_for_smoothing is not None:
            self.metrics_num_episodes_for_smoothing = metrics_num_episodes_for_smoothing
        if min_time_s_per_reporting is not None:
            self.min_time_s_per_reporting = min_time_s_per_reporting
        if min_train_timesteps_per_reporting is not None:
            self.min_train_timesteps_per_reporting = min_train_timesteps_per_reporting
        if min_sample_timesteps_per_reporting is not None:
            self.min_sample_timesteps_per_reporting = min_sample_timesteps_per_reporting

        return self
Sets the config's reporting settings.

        Args:
            keep_per_episode_custom_metrics: Store raw custom metrics without
                calculating max, min, mean
            metrics_episode_collection_timeout_s: Wait for metric batches for at most
                this many seconds. Those that have not returned in time will be
                collected in the next train iteration.
            metrics_num_episodes_for_smoothing: Smooth metrics over this many episodes.
            min_time_s_per_reporting: Minimum time interval to run one `train()` call
                for: If - after one `step_attempt()`, this time limit has not been
                reached, will perform n more `step_attempt()` calls until this minimum
                time has been consumed. Set to None or 0 for no minimum time.
            min_train_timesteps_per_reporting: Minimum train timesteps to
                optimize for per `train()` call. This value does not affect learning,
                only the length of train iterations. If - after one `step_attempt()`,
                the training timestep counts have not been reached, will
                perform n more `step_attempt()` calls until the minimum timesteps have
                been executed. Set to None or 0 for no minimum timesteps.
            min_sample_timesteps_per_reporting: Minimum sample timesteps to
                optimize for per `train()` call. This value does not affect learning,
                only the length of train iterations. If - after one `step_attempt()`,
                the sampling timestep counts (have not been reached, will
                perform n more `step_attempt()` calls until the minimum timesteps have
                been executed. Set to None or 0 for no minimum timesteps.

        Returns:
            This updated TrainerConfig object.
        
Sets the config's reporting settings.
Sets the config ' s reporting settings .
def reporting(
        self,
        *,
        keep_per_episode_custom_metrics: Optional[bool] = None,
        metrics_episode_collection_timeout_s: Optional[int] = None,
        metrics_num_episodes_for_smoothing: Optional[int] = None,
        min_time_s_per_reporting: Optional[int] = None,
        min_train_timesteps_per_reporting: Optional[int] = None,
        min_sample_timesteps_per_reporting: Optional[int] = None,
    ) -> "TrainerConfig":
        if keep_per_episode_custom_metrics is not None:
            self.keep_per_episode_custom_metrics = keep_per_episode_custom_metrics
        if metrics_episode_collection_timeout_s is not None:
            self.metrics_episode_collection_timeout_s = (
                metrics_episode_collection_timeout_s
            )
        if metrics_num_episodes_for_smoothing is not None:
            self.metrics_num_episodes_for_smoothing = metrics_num_episodes_for_smoothing
        if min_time_s_per_reporting is not None:
            self.min_time_s_per_reporting = min_time_s_per_reporting
        if min_train_timesteps_per_reporting is not None:
            self.min_train_timesteps_per_reporting = min_train_timesteps_per_reporting
        if min_sample_timesteps_per_reporting is not None:
            self.min_sample_timesteps_per_reporting = min_sample_timesteps_per_reporting
        return self
def reporting ( self , * , keep_per_episode_custom_metrics : Optional [ bool ] = None , metrics_episode_collection_timeout_s : Optional [ int ] = None , metrics_num_episodes_for_smoothing : Optional [ int ] = None , min_time_s_per_reporting : Optional [ int ] = None , min_train_timesteps_per_reporting : Optional [ int ] = None , min_sample_timesteps_per_reporting : Optional [ int ] = None , ) -> "TrainerConfig" : if keep_per_episode_custom_metrics is not None : self . keep_per_episode_custom_metrics = keep_per_episode_custom_metrics if metrics_episode_collection_timeout_s is not None : self . metrics_episode_collection_timeout_s = ( metrics_episode_collection_timeout_s ) if metrics_num_episodes_for_smoothing is not None : self . metrics_num_episodes_for_smoothing = metrics_num_episodes_for_smoothing if min_time_s_per_reporting is not None : self . min_time_s_per_reporting = min_time_s_per_reporting if min_train_timesteps_per_reporting is not None : self . min_train_timesteps_per_reporting = min_train_timesteps_per_reporting if min_sample_timesteps_per_reporting is not None : self . min_sample_timesteps_per_reporting = min_sample_timesteps_per_reporting return self
Sets the config's reporting settings.
Sets the config ' s reporting settings .
"""Sets the config's reporting settings.

        Args:
            keep_per_episode_custom_metrics: Store raw custom metrics without
                calculating max, min, mean
            metrics_episode_collection_timeout_s: Wait for metric batches for at most
                this many seconds. Those that have not returned in time will be
                collected in the next train iteration.
            metrics_num_episodes_for_smoothing: Smooth metrics over this many episodes.
            min_time_s_per_reporting: Minimum time interval to run one `train()` call
                for: If - after one `step_attempt()`, this time limit has not been
                reached, will perform n more `step_attempt()` calls until this minimum
                time has been consumed. Set to None or 0 for no minimum time.
            min_train_timesteps_per_reporting: Minimum train timesteps to
                optimize for per `train()` call. This value does not affect learning,
                only the length of train iterations. If - after one `step_attempt()`,
                the training timestep counts have not been reached, will
                perform n more `step_attempt()` calls until the minimum timesteps have
                been executed. Set to None or 0 for no minimum timesteps.
            min_sample_timesteps_per_reporting: Minimum sample timesteps to
                optimize for per `train()` call. This value does not affect learning,
                only the length of train iterations. If - after one `step_attempt()`,
                the sampling timestep counts (have not been reached, will
                perform n more `step_attempt()` calls until the minimum timesteps have
                been executed. Set to None or 0 for no minimum timesteps.

        Returns:
            This updated TrainerConfig object.
        """
This updated TrainerConfig object.
This updated TrainerConfig object .
self
keep_per_episode_custom_metrics
Optional[bool]
Store raw custom metrics without
calculating max, min, mean
Store raw custom metrics without calculating max min mean
metrics_episode_collection_timeout_s
Optional[int]
Wait for metric batches for at most
this many seconds. Those that have not returned in time will be
collected in the next train iteration.
Wait for metric batches for at most this many seconds . Those that have not returned in time will be collected in the next train iteration .
metrics_num_episodes_for_smoothing
Optional[int]
Smooth metrics over this many episodes.
Smooth metrics over this many episodes .
min_time_s_per_reporting
Optional[int]
Minimum time interval to run one `train()` call
for: If - after one `step_attempt()`, this time limit has not been
reached, will perform n more `step_attempt()` calls until this minimum
time has been consumed. Set to None or 0 for no minimum time.
Minimum time interval to run one ` train () ` call for : If - after one ` step_attempt () ` this time limit has not been reached will perform n more ` step_attempt () ` calls until this minimum time has been consumed . Set to None or 0 for no minimum time .
min_train_timesteps_per_reporting
Optional[int]
Minimum train timesteps to
optimize for per `train()` call. This value does not affect learning,
only the length of train iterations. If - after one `step_attempt()`,
the training timestep counts have not been reached, will
perform n more `step_attempt()` calls until the minimum timesteps have
been executed. Set to None or 0 for no minimum timesteps.
Minimum train timesteps to optimize for per ` train () ` call . This value does not affect learning only the length of train iterations . If - after one ` step_attempt () ` the training timestep counts have not been reached will perform n more ` step_attempt () ` calls until the minimum timesteps have been executed . Set to None or 0 for no minimum timesteps .
min_sample_timesteps_per_reporting
Optional[int]
Minimum sample timesteps to
optimize for per `train()` call. This value does not affect learning,
only the length of train iterations. If - after one `step_attempt()`,
the sampling timestep counts (have not been reached, will
perform n more `step_attempt()` calls until the minimum timesteps have
been executed. Set to None or 0 for no minimum timesteps.
Minimum sample timesteps to optimize for per ` train () ` call . This value does not affect learning only the length of train iterations . If - after one ` step_attempt () ` the sampling timestep counts ( have not been reached will perform n more ` step_attempt () ` calls until the minimum timesteps have been executed . Set to None or 0 for no minimum timesteps .