51e9611843caea57bebdc1d8cf2a2c9c1ecf090b,tensorboard/backend/event_processing/event_file_inspector_test.py,EventFileInspectorTest,_WriteScalarSummaries,#EventFileInspectorTest#Any#Any#,41

Before Change


      subdir = os.path.join(self.logdir, subdir_)
      self._MakeDirectoryIfNotExists(subdir)

      sw = tf.summary.FileWriter(subdir)
      for datum in data:
        summary = tf.Summary()
        if "simple_value" in datum:
          summary.value.add(tag=datum["tag"],
                            simple_value=datum["simple_value"])
          sw.add_summary(summary, global_step=datum["step"])
        elif "histo" in datum:
          summary.value.add(tag=datum["tag"], histo=tf.HistogramProto())
          sw.add_summary(summary, global_step=datum["step"])
        elif "session_log" in datum:
          sw.add_session_log(datum["session_log"], global_step=datum["step"])
      sw.close()

  def testEmptyLogdir(self):
    // Nothing was written to logdir
    units = efi.get_inspection_units(self.logdir)

After Change


      subdir = os.path.join(self.logdir, subdir_)
      self._MakeDirectoryIfNotExists(subdir)

      with test_util.FileWriterCache.get(subdir) as sw:
        for datum in data:
          summary = tf.Summary()
          if "simple_value" in datum:
            summary.value.add(tag=datum["tag"],
                              simple_value=datum["simple_value"])
            sw.add_summary(summary, global_step=datum["step"])
          elif "histo" in datum:
            summary.value.add(tag=datum["tag"], histo=tf.HistogramProto())
            sw.add_summary(summary, global_step=datum["step"])
          elif "session_log" in datum:
            sw.add_session_log(datum["session_log"], global_step=datum["step"])

  def testEmptyLogdir(self):
    // Nothing was written to logdir
    units = efi.get_inspection_units(self.logdir)
    self.assertEqual([], units)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: tensorflow/tensorboard
Commit Name: 51e9611843caea57bebdc1d8cf2a2c9c1ecf090b
Time: 2018-12-10
Author: stephanwlee@gmail.com
File Name: tensorboard/backend/event_processing/event_file_inspector_test.py
Class Name: EventFileInspectorTest
Method Name: _WriteScalarSummaries


Project Name: tensorflow/tensorboard
Commit Name: 51e9611843caea57bebdc1d8cf2a2c9c1ecf090b
Time: 2018-12-10
Author: stephanwlee@gmail.com
File Name: tensorboard/plugins/image/images_plugin_test.py
Class Name: ImagesPluginTest
Method Name: setUp


Project Name: tensorflow/tensorboard
Commit Name: 51e9611843caea57bebdc1d8cf2a2c9c1ecf090b
Time: 2018-12-10
Author: stephanwlee@gmail.com
File Name: tensorboard/plugins/audio/audio_plugin_test.py
Class Name: AudioPluginTest
Method Name: setUp