(self, kvs)
| 169 | self.writer = pywrap_tensorflow.EventsWriter(compat.as_bytes(path)) |
| 170 | |
| 171 | def writekvs(self, kvs): |
| 172 | def summary_val(k, v): |
| 173 | kwargs = {"tag": k, "simple_value": float(v)} |
| 174 | return self.tf.Summary.Value(**kwargs) |
| 175 | |
| 176 | summary = self.tf.Summary(value=[summary_val(k, v) for k, v in kvs.items()]) |
| 177 | event = self.event_pb2.Event(wall_time=time.time(), summary=summary) |
| 178 | event.step = ( |
| 179 | self.step |
| 180 | ) # is there any reason why you'd want to specify the step? |
| 181 | self.writer.WriteEvent(event) |
| 182 | self.writer.Flush() |
| 183 | self.step += 1 |
| 184 | |
| 185 | def close(self): |
| 186 | if self.writer: |
nothing calls this directly
no outgoing calls
no test coverage detected