Skip to content

Commit 6693f58

Browse files
huydhnfacebook-github-bot
authored andcommitted
Don't upload compiler benchmark debug info to the benchmark database (#153769)
Summary: During our debug session, wdvr and I found out that the benchmark database is growing much faster than we expect. After taking a closer look, the majority of them coming from TorchInductor benchmark and the top 3 are all debug information not used by any dashboard atm. In the period of 7 days, there are close to 6 millions records ([query](https://paste.sh/GUVCBa0v#UzszFCZaWQxh7oSVsZtfZdVE)) ``` Benchmark,Metric,Count "TorchInductor","user_stack","1926014" "TorchInductor","reason","1926014" "TorchInductor","model","1926014" ``` Let's skip uploading them to avoid bloating the database. X-link: pytorch/pytorch#153769 Approved by: https://github.com/malfet Reviewed By: yangw-dev Differential Revision: D75295298 fbshipit-source-id: 621e582c8908bf58fe79fc5069ea814494d8f78c
1 parent 227fb01 commit 6693f58

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

userbenchmark/dynamo/dynamobench/common.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def load_model_from_path(path_and_class_str):
343343
return model, inputs
344344

345345

346-
def write_outputs(filename, headers, row):
346+
def write_outputs(filename, headers, row, upload_to_benchmark_db: bool = True):
347347
"""
348348
Write both CSV and JSON outputs using the original CSV output interface
349349
"""
@@ -352,7 +352,8 @@ def write_outputs(filename, headers, row):
352352
return
353353

354354
output_csv(filename, headers, row)
355-
output_json(filename, headers, row)
355+
if upload_to_benchmark_db:
356+
output_json(filename, headers, row)
356357

357358

358359
def output_csv(filename, headers, row):
@@ -2847,10 +2848,15 @@ def add_double_quotes(x):
28472848
user_stack = add_double_quotes(
28482849
", ".join([str(x) for x in graph_break.user_stack])
28492850
)
2851+
2852+
# NB: Don't upload them to the benchmark database as they are debugging
2853+
# infomation. There are also around a million records a day which is
2854+
# wasteful to store
28502855
write_outputs(
28512856
filename,
28522857
["model", "reason", "user_stack"],
28532858
[current_name, reason, user_stack],
2859+
False,
28542860
)
28552861

28562862
if self.args.stats:

0 commit comments

Comments
 (0)