original_docstring:  Populates the attribute :attr:`_time_stats` with the start start time, end time and
          data points for each session id within the loaded session if it has not already been
          calculated.
  
          If the main Session is currently training, then the training session ID is updated with the
          latest stats.
          
docstring: Populates the attribute :attr:`_time_stats` with the start start time, end time and
  data points for each session id within the loaded session if it has not already been
  calculated.
  
  If the main Session is currently training, then the training session ID is updated with the
  latest stats.
docstring_tokens: Populates the attribute : attr : ` _time_stats ` with the start start time end time and data points for each session id within the loaded session if it has not already been calculated . If the main Session is currently training then the training session ID is updated with the latest stats .
code: def _get_time_stats(self):
          """ Populates the attribute :attr:`_time_stats` with the start start time, end time and
          data points for each session id within the loaded session if it has not already been
          calculated.
  
          If the main Session is currently training, then the training session ID is updated with the
          latest stats.
          """
          if self._time_stats is None:
              logger.debug("Collating summary time stamps")
  
              self._time_stats = {
                  sess_id: dict(start_time=np.min(timestamps) if np.any(timestamps) else 0,
                                end_time=np.max(timestamps) if np.any(timestamps) else 0,
                                iterations=timestamps.shape[0] if np.any(timestamps) else 0)
                  for sess_id, timestamps in self._session.get_timestamps(None).items()}
  
          elif Session.is_training:
              logger.debug("Updating summary time stamps for training session")
  
              session_id = Session.session_ids[-1]
              latest = self._session.get_timestamps(session_id)
  
              self._time_stats[session_id] = dict(
                  start_time=np.min(latest) if np.any(latest) else 0,
                  end_time=np.max(latest) if np.any(latest) else 0,
                  iterations=latest.shape[0] if np.any(latest) else 0)
  
          logger.debug("time_stats: %s", self._time_stats)
code_tokens: def _get_time_stats ( self ) : if self . _time_stats is None : logger . debug ( "Collating summary time stamps" ) self . _time_stats = { sess_id : dict ( start_time = np . min ( timestamps ) if np . any ( timestamps ) else 0 , end_time = np . max ( timestamps ) if np . any ( timestamps ) else 0 , iterations = timestamps . shape [ 0 ] if np . any ( timestamps ) else 0 ) for sess_id , timestamps in self . _session . get_timestamps ( None ) . items ( ) } elif Session . is_training : logger . debug ( "Updating summary time stamps for training session" ) session_id = Session . session_ids [ - 1 ] latest = self . _session . get_timestamps ( session_id ) self . _time_stats [ session_id ] = dict ( start_time = np . min ( latest ) if np . any ( latest ) else 0 , end_time = np . max ( latest ) if np . any ( latest ) else 0 , iterations = latest . shape [ 0 ] if np . any ( latest ) else 0 ) logger . debug ( "time_stats: %s" , self . _time_stats )
short_docstring: Populates the attribute :attr:`_time_stats` with the start start time, end time and
  data points for each session id within the loaded session if it has not already been
  calculated.
short_docstring_tokens: Populates the attribute : attr : ` _time_stats ` with the start start time end time and data points for each session id within the loaded session if it has not already been calculated .
comment: """ Populates the attribute :attr:`_time_stats` with the start start time, end time and
          data points for each session id within the loaded session if it has not already been
          calculated.
  
          If the main Session is currently training, then the training session ID is updated with the
          latest stats.
          """