Skip to content

Commit b9a0998

Browse files
Varun Purifacebook-github-bot
authored andcommitted
Remove logic blocking PyTorchObserver lines from being parsed
Summary: Not sure why we require metrics to have "NET" in the name - it's confusing and undocumented. RE: https://fb.workplace.com/groups/1690415234371429/permalink/8607242839355266/ Reviewed By: Jack-Khuu Differential Revision: D66785827 fbshipit-source-id: d2c04fc168b14215268bf6853a887edd11e83794
1 parent 629c0cf commit b9a0998

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

benchmarking/data_converters/json_converter/json_converter.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ def collect(self, data, args=None):
4242
else:
4343
result = json.loads(match[0])
4444
if (
45-
(
46-
"type" in result
47-
and result["type"] == "NET"
48-
and "value" in result
49-
)
45+
("type" in result and "value" in result)
5046
or ("NET" in result)
5147
or ("custom_output" in result)
5248
): # for backward compatibility
@@ -70,8 +66,14 @@ def convert(self, data):
7066
table_name = d["table_name"] if "table_name" in d else "Custom Output"
7167
details["custom_output"][table_name].append(d["custom_output"])
7268

73-
elif "type" in d and "metric" in d and "unit" in d:
69+
if (
70+
"type" in d
71+
and "metric" in d
72+
and "unit" in d
73+
and "custom_output" not in d
74+
):
7475
# new format
76+
getLogger().info("New format")
7577
key = d["type"] + " " + d["metric"]
7678
if "info_string" in d:
7779
if "info_string" in details[key]:

0 commit comments

Comments
 (0)