7a5f3c1751bc31f0bd5406bab04845461dd8c88a,google/datalab/ml/_summary.py,Summary,list_events,#Summary#,58

Before Change


    Returns:
      A dictionary. Key is the name of a event. Value is a set of dirs that contain that event.
    
    event_dir_dict = {}
    for event_file in self._glob_events_files(self._paths):
      dir = os.path.dirname(event_file)
      try:
        for record in tf_record.tf_record_iterator(event_file):
          event = event_pb2.Event.FromString(record)
          if event.summary is None or event.summary.value is None:
            continue
          for value in event.summary.value:
            if value.simple_value is None or value.tag is None:
              continue
            if value.tag not in event_dir_dict:
              event_dir_dict[value.tag] = set()
            event_dir_dict[value.tag].add(dir)
      except:
        // It seems current TF (1.0) has a bug when iterating events from a file near the end.
        // For now just catch and pass.

After Change


    Returns:
      A dictionary. Key is the name of a event. Value is a set of dirs that contain that event.
    
    event_dir_dict = collections.defaultdict(set)
    for event_file in self._glob_events_files(self._paths, recursive=True):
      dir = os.path.dirname(event_file)
      for record in tf_record.tf_record_iterator(event_file):
        event = event_pb2.Event.FromString(record)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: googledatalab/pydatalab
Commit Name: 7a5f3c1751bc31f0bd5406bab04845461dd8c88a
Time: 2017-08-08
Author: qimingj@users.noreply.github.com
File Name: google/datalab/ml/_summary.py
Class Name: Summary
Method Name: list_events


Project Name: googledatalab/pydatalab
Commit Name: 7a5f3c1751bc31f0bd5406bab04845461dd8c88a
Time: 2017-08-08
Author: qimingj@users.noreply.github.com
File Name: google/datalab/ml/_summary.py
Class Name: Summary
Method Name: list_events


Project Name: OpenNMT/OpenNMT-tf
Commit Name: ab6f9e4c489beea3bec518d60629c0f8af0b6123
Time: 2019-06-21
Author: guillaume.klein@systrangroup.com
File Name: opennmt/runner.py
Class Name: Runner
Method Name: train


Project Name: biocore/scikit-bio
Commit Name: d7297bc945762c6650cff0477583511eca9da6d3
Time: 2014-05-11
Author: yoshiki89@gmail.com
File Name: skbio/core/genetic_code.py
Class Name: GeneticCode
Method Name: __init__