b796de41049aa3b3696a6b7242799284c3f0c641,python/ray/util/metrics.py,Metric,record,#Metric#Any#Any#,75
Before Change
raise TypeError(
f"Tag values must be str, got {type(val)}.")
default_tag_copy = self._default_tags.copy()
default_tag_copy.update(tags or {})
self._metric.record(value, tags=default_tag_copy)
@property
After Change
tags_copy = tags.copy() if tags else {}
for tag_key in self._tag_keys:
// Prefer passed tags over default tags.
if tags is not None and tag_key in tags:
final_tags[tag_key] = tags_copy.pop(tag_key)
elif tag_key in self._default_tags:
final_tags[tag_key] = self._default_tags[tag_key]
else:
raise ValueError(f"Missing value for tag key {tag_key}.")
if len(tags_copy) > 0:
raise ValueError(
f"Unrecognized tag keys: {list(tags_copy.keys())}.")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: ray-project/ray
Commit Name: b796de41049aa3b3696a6b7242799284c3f0c641
Time: 2021-01-20
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/util/metrics.py
Class Name: Metric
Method Name: record
Project Name: rtqichen/torchdiffeq
Commit Name: bcec059159d3799fac85bbbcb0e94c1b8214780c
Time: 2021-01-06
Author: rtqichen@gmail.com
File Name: torchdiffeq/_impl/adjoint.py
Class Name:
Method Name: odeint_adjoint
Project Name: open-mmlab/mmdetection
Commit Name: dd2907ed70a9f29ecbe2fba75de735e96daae3a2
Time: 2018-11-26
Author: chenkaidev@gmail.com
File Name: mmdet/ops/nms/nms_wrapper.py
Class Name:
Method Name: soft_nms