Commit
·
777fcbc
1
Parent(s):
c1f07e3
prior sets off by default
Browse files
app.py
CHANGED
|
@@ -239,6 +239,8 @@ def regex_table(dataframe, regex, filter_button, style=True):
|
|
| 239 |
if isinstance(filter_button, list) or isinstance(filter_button, str):
|
| 240 |
if "Prior Sets" not in filter_button and 'Prior Sets (0.5 weight)' in dataframe.columns:
|
| 241 |
update_scores = True
|
|
|
|
|
|
|
| 242 |
if "Seq. Classifiers" not in filter_button:
|
| 243 |
dataframe = dataframe[~dataframe["Model Type"].str.contains("Seq. Classifier", case=False, na=False)]
|
| 244 |
if "DPO" not in filter_button:
|
|
@@ -253,7 +255,8 @@ def regex_table(dataframe, regex, filter_button, style=True):
|
|
| 253 |
# if update the score to not use prior sets, do so
|
| 254 |
if update_scores:
|
| 255 |
data["Score"] = (data["Chat"] + data["Chat Hard"] + data["Safety"] + data["Reasoning"]) / 4
|
| 256 |
-
|
|
|
|
| 257 |
# sort array by Score column
|
| 258 |
data = data.sort_values(by='Score', ascending=False)
|
| 259 |
|
|
@@ -302,7 +305,7 @@ with gr.Blocks(css=custom_css) as app:
|
|
| 302 |
placeholder="Model Search (delimit with , )",
|
| 303 |
show_label=False)
|
| 304 |
model_types_1 = gr.CheckboxGroup(["Seq. Classifiers", "DPO", "Custom Classifiers", "Generative", "Prior Sets"],
|
| 305 |
-
value=["Seq. Classifiers", "DPO", "Custom Classifiers", "Generative"
|
| 306 |
label="Model Types",
|
| 307 |
show_label=False,
|
| 308 |
# info="Which model types to include.",
|
|
@@ -316,7 +319,7 @@ with gr.Blocks(css=custom_css) as app:
|
|
| 316 |
visible=False,
|
| 317 |
)
|
| 318 |
rewardbench_table = gr.Dataframe(
|
| 319 |
-
regex_table(rewardbench_data_avg.copy(), "", ["Seq. Classifiers", "DPO", "Custom Classifiers", "Generative"
|
| 320 |
datatype=col_types_rewardbench_avg,
|
| 321 |
headers=rewardbench_data_avg.columns.tolist(),
|
| 322 |
elem_id="rewardbench_dataframe_avg",
|
|
|
|
| 239 |
if isinstance(filter_button, list) or isinstance(filter_button, str):
|
| 240 |
if "Prior Sets" not in filter_button and 'Prior Sets (0.5 weight)' in dataframe.columns:
|
| 241 |
update_scores = True
|
| 242 |
+
# remove the column "Prior Sets (0.5 weight)" from the outputted table
|
| 243 |
+
dataframe = dataframe.drop(columns=['Prior Sets (0.5 weight)'])
|
| 244 |
if "Seq. Classifiers" not in filter_button:
|
| 245 |
dataframe = dataframe[~dataframe["Model Type"].str.contains("Seq. Classifier", case=False, na=False)]
|
| 246 |
if "DPO" not in filter_button:
|
|
|
|
| 255 |
# if update the score to not use prior sets, do so
|
| 256 |
if update_scores:
|
| 257 |
data["Score"] = (data["Chat"] + data["Chat Hard"] + data["Safety"] + data["Reasoning"]) / 4
|
| 258 |
+
# if "Prior Sets (0.5 weight)" in data.columns:
|
| 259 |
+
# data["Prior Sets (0.5 weight)"] = np.NaN
|
| 260 |
# sort array by Score column
|
| 261 |
data = data.sort_values(by='Score', ascending=False)
|
| 262 |
|
|
|
|
| 305 |
placeholder="Model Search (delimit with , )",
|
| 306 |
show_label=False)
|
| 307 |
model_types_1 = gr.CheckboxGroup(["Seq. Classifiers", "DPO", "Custom Classifiers", "Generative", "Prior Sets"],
|
| 308 |
+
value=["Seq. Classifiers", "DPO", "Custom Classifiers", "Generative"],
|
| 309 |
label="Model Types",
|
| 310 |
show_label=False,
|
| 311 |
# info="Which model types to include.",
|
|
|
|
| 319 |
visible=False,
|
| 320 |
)
|
| 321 |
rewardbench_table = gr.Dataframe(
|
| 322 |
+
regex_table(rewardbench_data_avg.copy(), "", ["Seq. Classifiers", "DPO", "Custom Classifiers", "Generative"]),
|
| 323 |
datatype=col_types_rewardbench_avg,
|
| 324 |
headers=rewardbench_data_avg.columns.tolist(),
|
| 325 |
elem_id="rewardbench_dataframe_avg",
|