ggcristian commited on
Commit
99baaf6
·
1 Parent(s): 6cf1214

Spacing between cols

Browse files
Files changed (2) hide show
  1. app.py +7 -9
  2. utils.py +27 -25
app.py CHANGED
@@ -280,15 +280,13 @@ with gr.Blocks(
280
  ],
281
  interactive=False,
282
  column_widths=[
283
- "7%",
284
- "25%",
285
- "10%",
286
- "8%",
287
- "8%",
288
- "8%",
289
- "8%",
290
- "8%",
291
- "8%",
292
  ],
293
  )
294
 
 
280
  ],
281
  interactive=False,
282
  column_widths=[
283
+ "5%",
284
+ "27%",
285
+ "15%",
286
+ "9%",
287
+ "12%",
288
+ "9%",
289
+ "14%",
 
 
290
  ],
291
  )
292
 
utils.py CHANGED
@@ -86,29 +86,32 @@ def filter_bench(subset: pd.DataFrame, df_agg=None, agg_column=None) -> pd.DataF
86
  axis=1,
87
  )
88
  pivot_df["Type"] = pivot_df["Model Type"].map(lambda x: type_emoji.get(x, ""))
 
 
 
 
89
  pivot_df.rename(
90
  columns={
91
- "Syntax (STX)": "STX",
92
- "Functionality (FNC)": "FNC",
93
- "Synthesis (SYN)": "SYN",
94
- "Performance": "Perf",
95
  },
96
  inplace=True,
97
  )
98
-
99
  columns_order = [
100
  "Type",
101
  "Model",
102
  "Params",
103
- "STX",
104
- "FNC",
105
- "SYN",
106
- "Power",
107
- "Perf",
108
- "Area",
109
  ]
110
  pivot_df = pivot_df[[col for col in columns_order if col in pivot_df.columns]]
111
- pivot_df = pivot_df.sort_values(by="FNC", ascending=False).reset_index(drop=True)
 
 
112
  return pivot_df
113
 
114
 
@@ -165,16 +168,17 @@ def filter_bench_all(
165
  axis=1,
166
  )
167
  pivot_df["Type"] = pivot_df["Model Type"].map(lambda x: type_emoji.get(x, ""))
 
 
 
168
 
169
  pivot_df.rename(
170
  columns={
171
  "Exact Matching (EM)": "EM",
172
- "Syntax (STX)": "Agg STX",
173
- "Functionality (FNC)": "Agg FNC",
174
- "Synthesis (SYN)": "Agg SYN",
175
- "Power": "Agg Power",
176
- "Performance": "Agg Perf",
177
- "Area": "Agg Area",
178
  },
179
  inplace=True,
180
  )
@@ -183,15 +187,13 @@ def filter_bench_all(
183
  "Type",
184
  "Model",
185
  "Params",
186
- "Agg STX",
187
- "Agg FNC",
188
- "Agg SYN",
189
- "Agg Power",
190
- "Agg Perf",
191
- "Agg Area",
192
  ]
193
  pivot_df = pivot_df[[col for col in columns_order if col in pivot_df.columns]]
194
- pivot_df = pivot_df.sort_values(by="Agg FNC", ascending=False).reset_index(
195
  drop=True
196
  )
197
  return pivot_df
 
86
  axis=1,
87
  )
88
  pivot_df["Type"] = pivot_df["Model Type"].map(lambda x: type_emoji.get(x, ""))
89
+ pivot_df["Post-Synthesis (PSQ)"] = (
90
+ pivot_df[["Power", "Performance", "Area"]].mean(axis=1).round(2)
91
+ )
92
+
93
  pivot_df.rename(
94
  columns={
95
+ "Syntax (STX)": "Syntax",
96
+ "Functionality (FNC)": "Functionality",
97
+ "Synthesis (SYN)": "Synthesis",
98
+ "Post-Synthesis (PSQ)": "Post-Synthesis",
99
  },
100
  inplace=True,
101
  )
 
102
  columns_order = [
103
  "Type",
104
  "Model",
105
  "Params",
106
+ "Syntax",
107
+ "Functionality",
108
+ "Synthesis",
109
+ "Post-Synthesis",
 
 
110
  ]
111
  pivot_df = pivot_df[[col for col in columns_order if col in pivot_df.columns]]
112
+ pivot_df = pivot_df.sort_values(by="Functionality", ascending=False).reset_index(
113
+ drop=True
114
+ )
115
  return pivot_df
116
 
117
 
 
168
  axis=1,
169
  )
170
  pivot_df["Type"] = pivot_df["Model Type"].map(lambda x: type_emoji.get(x, ""))
171
+ pivot_df["Post-Synthesis Quality"] = (
172
+ pivot_df[["Power", "Performance", "Area"]].mean(axis=1).round(2)
173
+ )
174
 
175
  pivot_df.rename(
176
  columns={
177
  "Exact Matching (EM)": "EM",
178
+ "Syntax (STX)": "Syntax",
179
+ "Functionality (FNC)": "Functionality",
180
+ "Synthesis (SYN)": "Synthesis",
181
+ "Post-Synthesis Quality": "Post-Synthesis",
 
 
182
  },
183
  inplace=True,
184
  )
 
187
  "Type",
188
  "Model",
189
  "Params",
190
+ "Syntax",
191
+ "Functionality",
192
+ "Synthesis",
193
+ "Post-Synthesis",
 
 
194
  ]
195
  pivot_df = pivot_df[[col for col in columns_order if col in pivot_df.columns]]
196
+ pivot_df = pivot_df.sort_values(by="Functionality", ascending=False).reset_index(
197
  drop=True
198
  )
199
  return pivot_df