df7332c3ba49e782f14414639e537f37a19133a8,catalyst/utils/plotly.py,,get_tensorboard_scalars,#Any#Any#Any#,18
Before Change
def get_tensorboard_scalars(
logdir: Union[str, Path], metrics: Optional[List[str]], step: str
) -> Dict[str, List]:
event_acc = EventAccumulator(str(logdir))
event_acc.Reload()
if metrics is not None:
scalar_names = [
n for n in event_acc.Tags()["scalars"]
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
def get_tensorboard_scalars(
logdir: Union[str, Path], metrics: Optional[List[str]], step: str
) -> 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
def get_scatter(scalars: List[SummaryItem], name: str) -> go.Scatter:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 15
Instances
Project Name: Scitator/catalyst
Commit Name: df7332c3ba49e782f14414639e537f37a19133a8
Time: 2019-05-13
Author: vvelicodnii@snapchat.com
File Name: catalyst/utils/plotly.py
Class Name:
Method Name: get_tensorboard_scalars
Project Name: pantsbuild/pants
Commit Name: fdb77374313a8f53d5f5ab192ad88e96c4b65c23
Time: 2020-10-16
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/core/util_rules/stripped_source_files.py
Class Name:
Method Name: strip_source_roots