class_docstr: Logs train_steps_per_second.
class_docstr_tok: ["Logs","train_steps_per_second","."]
docstr: Initializes a StepPerSecondLogTrigger.
  
  Args:
    train_step: `tf.Variable` which keeps track of the number of train steps.
    interval: How often, in train_steps, the trigger will save. Note that as
      long as the >= `interval` number of steps have passed since the last
      trigger, the event gets triggered. The current value is not necessarily
      `interval` steps away from the last triggered value.
    log_to_terminal: If True ouputs steps/sec to logging.info.
docstr_tok: ["Initializes","a","StepPerSecondLogTrigger",".","Args",":","train_step",":","`","tf.Variable","`","which","keeps","track","of","the","number","of","train","steps",".","interval",":","How","often",",","in","train_steps",",","the","trigger","will","save",".","Note","that","as","long","as","the",">","=","`","interval","`","number","of","steps","have","passed","since","the","last","trigger",",","the","event","gets","triggered",".","The","current","value","is","not","necessarily","`","interval","`","steps","away","from","the","last","triggered","value",".","log_to_terminal",":","If","True","ouputs","steps\/sec","to","logging.info","."]
code: def __init__(
      self,
      train_step: tf.Variable,
      interval: int,
      log_to_terminal: bool = True,
  ):
      """Initializes a StepPerSecondLogTrigger.
  
      Args:
        train_step: `tf.Variable` which keeps track of the number of train steps.
        interval: How often, in train_steps, the trigger will save. Note that as
          long as the >= `interval` number of steps have passed since the last
          trigger, the event gets triggered. The current value is not necessarily
          `interval` steps away from the last triggered value.
        log_to_terminal: If True ouputs steps/sec to logging.info.
      """
      self._train_step = train_step
      self._log_to_terminal = log_to_terminal
      self._step_timer = step_per_second_tracker.StepPerSecondTracker(
          train_step
      )
  
      super(StepPerSecondLogTrigger, self).__init__(
          interval, self._log_steps_per_sec
      )
  
imports: import os
  from typing import Mapping, Optional, Sequence, Text, Tuple, Union
  from absl import logging
  import tensorflow.compat.v2
  from tf_agents.agents import tf_agent
  from tf_agents.metrics import py_metric
  from tf_agents.policies import async_policy_saver
  from tf_agents.policies import greedy_policy
  from tf_agents.policies import policy_saver
  from tf_agents.policies import tf_policy
  from tf_agents.train import interval_trigger
  from tf_agents.train import learner
  from tf_agents.train import step_per_second_tracker
  from tf_agents.typing import types
label_desc: Use image node_id 1 to create a new StepPerSecondLogTrigger object from inherited base classes: interval_trigger with example: obj = StepPerSecondLogTrigger(train_step, interval, log_to_terminal)