Exemple #1
0
def latest_events(base_dir):
    """Parse events from latest event file in base_dir.

  Args:
    base_dir: Base directory in which TF event flies are stored.
  Returns:
    Iterable of event protos.
  Raises:
    ValueError: if no event files exist under base_dir.
  """
    file_path = latest_event_file(base_dir)
    return summary_io.summary_iterator(file_path) if file_path else []
Exemple #2
0
def latest_events(base_dir):
  """Parse events from latest event file in base_dir.

  Args:
    base_dir: Base directory in which TF event flies are stored.
  Returns:
    Iterable of event protos.
  Raises:
    ValueError: if no event files exist under base_dir.
  """
  file_path = latest_event_file(base_dir)
  return summary_io.summary_iterator(file_path) if file_path else []