def _fetch_current_frame(self):
    path = '{}/{}'.format(self.PLUGIN_LOGDIR, SUMMARY_FILENAME)

    try:
      frame = read_tensor_summary(path).astype(np.uint8)
      self.most_recent_frame = frame
      return frame

    except (message.DecodeError, IOError, tf.errors.NotFoundError):
      return self.most_recent_frame
 def _fetch_current_frame(self):
   path = '{}/{}'.format(self.PLUGIN_LOGDIR, shared_config.SUMMARY_FILENAME)
   with self._lock:
     try:
       frame = file_system_tools.read_tensor_summary(path).astype(np.uint8)
       self.most_recent_frame = frame
       return frame
     except (message.DecodeError, IOError, tf.errors.NotFoundError):
       if self.most_recent_frame is None:
         self.most_recent_frame = im_util.get_image_relative_to_script(
             'no-data.png')
       return self.most_recent_frame