if step in n and any(m in n for m in metrics)
]
else:
scalar_names = [n for n in event_acc.Tags()["scalars"] if step in n]
scalars = {sn: event_acc.Scalars(sn) for sn in scalar_names}
return scalars
def get_scatter(scalars: List[ScalarEvent], name: str) -> go.Scatter:
After Change
) -> Dict[str, List]:
summary_reader = SummaryReader(logdir, type_filter="scalar")
items = defaultdict(list)
for item in summary_reader:
if step in item.tag and (metrics is None or any(m in item.tag for m in metrics)):
items[item.tag].append(item.value)
return items