Skip to content

Commit 1052380

Browse files
committed
Change qor key to metric
Signed-off-by: Jack Luar <jluar@precisioninno.com>
1 parent 32d87fb commit 1052380

File tree

1 file changed

+6
-4
lines changed
  • tools/AutoTuner/src/autotuner/utils

1 file changed

+6
-4
lines changed

tools/AutoTuner/src/autotuner/utils/plot.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
# Only does plotting for AutoTunerBase variants
1212
AT_REGEX = r"variant-AutoTunerBase-([\w-]+)-\w+"
1313

14+
# TODO: Make sure the distributed.py METRIC variable is consistent with this, single source of truth.
15+
METRIC = "metric"
16+
1417
cur_dir = os.path.dirname(os.path.abspath(__file__))
1518
root_dir = os.path.join(cur_dir, "../../../../../")
1619
os.chdir(root_dir)
@@ -94,13 +97,12 @@ def preprocess(df: pd.DataFrame) -> pd.DataFrame:
9497
]
9598
rename_dict = {
9699
"time_this_iter_s": "runtime",
97-
"_SDC_CLK_PERIOD": "clk_period",
98-
"minimum": "qor",
100+
"_SDC_CLK_PERIOD": "clk_period", # param
99101
}
100102
try:
101103
df = df.rename(columns=rename_dict)
102104
df = df.drop(columns=cols_to_remove)
103-
df = df[df["qor"] != 9e99]
105+
df = df[df[METRIC] != 9e99]
104106
df["timestamp"] -= df["timestamp"].min()
105107
return df
106108
except KeyError as e:
@@ -172,7 +174,7 @@ def main(platform: str, design: str, experiment: str):
172174
os.makedirs(img_dir, exist_ok=True)
173175
df = load_dir(results_dir)
174176
df = preprocess(df)
175-
keys = ["qor", "runtime", "clk_period", "worst_slack"]
177+
keys = [METRIC] + ["runtime", "clk_period", "worst_slack"]
176178

177179
# Plot only if more than one entry
178180
if len(df) < 2:

0 commit comments

Comments
 (0)