|
11 | 11 | # Only does plotting for AutoTunerBase variants |
12 | 12 | AT_REGEX = r"variant-AutoTunerBase-([\w-]+)-\w+" |
13 | 13 |
|
| 14 | +# TODO: Make sure the distributed.py METRIC variable is consistent with this, single source of truth. |
| 15 | +METRIC = "metric" |
| 16 | + |
14 | 17 | cur_dir = os.path.dirname(os.path.abspath(__file__)) |
15 | 18 | root_dir = os.path.join(cur_dir, "../../../../../") |
16 | 19 | os.chdir(root_dir) |
@@ -94,13 +97,12 @@ def preprocess(df: pd.DataFrame) -> pd.DataFrame: |
94 | 97 | ] |
95 | 98 | rename_dict = { |
96 | 99 | "time_this_iter_s": "runtime", |
97 | | - "_SDC_CLK_PERIOD": "clk_period", |
98 | | - "minimum": "qor", |
| 100 | + "_SDC_CLK_PERIOD": "clk_period", # param |
99 | 101 | } |
100 | 102 | try: |
101 | 103 | df = df.rename(columns=rename_dict) |
102 | 104 | df = df.drop(columns=cols_to_remove) |
103 | | - df = df[df["qor"] != 9e99] |
| 105 | + df = df[df[METRIC] != 9e99] |
104 | 106 | df["timestamp"] -= df["timestamp"].min() |
105 | 107 | return df |
106 | 108 | except KeyError as e: |
@@ -172,7 +174,7 @@ def main(platform: str, design: str, experiment: str): |
172 | 174 | os.makedirs(img_dir, exist_ok=True) |
173 | 175 | df = load_dir(results_dir) |
174 | 176 | df = preprocess(df) |
175 | | - keys = ["qor", "runtime", "clk_period", "worst_slack"] |
| 177 | + keys = [METRIC] + ["runtime", "clk_period", "worst_slack"] |
176 | 178 |
|
177 | 179 | # Plot only if more than one entry |
178 | 180 | if len(df) < 2: |
|
0 commit comments