def _process_event(self, event, tagged_data):
    """Processes a single tf.Event and records it in tagged_data."""
    event_type = event.WhichOneof('what')
    # Handle the most common case first.
    if event_type == 'summary':
      for value in event.summary.value:
        value = data_compat.migrate_value(value)
        tag, metadata, values = tagged_data.get(value.tag, (None, None, []))
        values.append((event.step, event.wall_time, value.tensor))
        if tag is None:
          # Store metadata only from the first event.
          tagged_data[value.tag] = sqlite_writer.TagData(
              value.tag, value.metadata, values)
    elif event_type == 'file_version':
      pass  # TODO: reject file version < 2 (at loader level)
    elif event_type == 'session_log':
      if event.session_log.status == event_pb2.SessionLog.START:
        pass  # TODO: implement purging via sqlite writer truncation method
    elif event_type in ('graph_def', 'meta_graph_def'):
      pass  # TODO: support graphs
    elif event_type == 'tagged_run_metadata':
      pass
def _process_event ( self , event , tagged_data ) : event_type = event . WhichOneof ( 'what' ) if event_type == 'summary' : for value in event . summary . value : value = data_compat . migrate_value ( value ) tag , metadata , values = tagged_data . get ( value . tag , ( None , None , [ ] ) ) values . append ( ( event . step , event . wall_time , value . tensor ) ) if tag is None : tagged_data [ value . tag ] = sqlite_writer . TagData ( value . tag , value . metadata , values ) elif event_type == 'file_version' : pass elif event_type == 'session_log' : if event . session_log . status == event_pb2 . SessionLog . START : pass elif event_type in ( 'graph_def' , 'meta_graph_def' ) : pass elif event_type == 'tagged_run_metadata' : pass
Processes a single tf.Event and records it in tagged_data.