@@ -65,31 +65,29 @@ def parse_summary(self, tfefile):
65
65
tags = event_accumulator .Tags ()
66
66
for tag in tags [TENSORS ]:
67
67
for m in self .metric_names :
68
- if not _should_consider (tag , m , tfefile ):
69
- continue
70
- for tensor in event_accumulator .Tensors (tag ):
71
- ml = api_pb2 .MetricLog (
72
- time_stamp = rfc3339 .rfc3339 (
73
- datetime .fromtimestamp (tensor .wall_time )
74
- ),
75
- metric = api_pb2 .Metric (
76
- name = m , value = str (tf .make_ndarray (tensor .tensor_proto ))
77
- ),
78
- )
79
- metric_logs .append (ml )
68
+ if _should_consider (tag , m , tfefile ):
69
+ for tensor in event_accumulator .Tensors (tag ):
70
+ ml = api_pb2 .MetricLog (
71
+ time_stamp = rfc3339 .rfc3339 (
72
+ datetime .fromtimestamp (tensor .wall_time )
73
+ ),
74
+ metric = api_pb2 .Metric (
75
+ name = m , value = str (tf .make_ndarray (tensor .tensor_proto ))
76
+ ),
77
+ )
78
+ metric_logs .append (ml )
80
79
# support old-style tensorboard metrics too
81
80
for tag in tags [SCALARS ]:
82
81
for m in self .metric_names :
83
- if not _should_consider (tag , m , tfefile ):
84
- continue
85
- for scalar in event_accumulator .Scalars (tag ):
86
- ml = api_pb2 .MetricLog (
87
- time_stamp = rfc3339 .rfc3339 (
88
- datetime .fromtimestamp (scalar .wall_time )
89
- ),
90
- metric = api_pb2 .Metric (name = m , value = str (scalar .value )),
91
- )
92
- metric_logs .append (ml )
82
+ if _should_consider (tag , m , tfefile ):
83
+ for scalar in event_accumulator .Scalars (tag ):
84
+ ml = api_pb2 .MetricLog (
85
+ time_stamp = rfc3339 .rfc3339 (
86
+ datetime .fromtimestamp (scalar .wall_time )
87
+ ),
88
+ metric = api_pb2 .Metric (name = m , value = str (scalar .value )),
89
+ )
90
+ metric_logs .append (ml )
93
91
94
92
return metric_logs
95
93
0 commit comments