Spaces:
Running
Running
jasonshaoshun
commited on
Commit
·
aaed88c
1
Parent(s):
9bb103a
debug
Browse files- app.py +25 -25
- src/populate.py +5 -0
app.py
CHANGED
@@ -592,35 +592,35 @@ def init_leaderboard_mib_subgraph(dataframe, track):
|
|
592 |
|
593 |
|
594 |
|
595 |
-
def init_leaderboard_mib_causalgraph(dataframe, track):
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
|
608 |
-
|
609 |
-
|
610 |
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
|
625 |
def init_leaderboard_mib_causalgraph(dataframe, track):
|
626 |
# print("Debugging column issues:")
|
|
|
592 |
|
593 |
|
594 |
|
595 |
+
# def init_leaderboard_mib_causalgraph(dataframe, track):
|
596 |
+
# # print("Debugging column issues:")
|
597 |
+
# # print("\nActual DataFrame columns:")
|
598 |
+
# # print(dataframe.columns.tolist())
|
599 |
|
600 |
+
# # print("\nExpected columns for Leaderboard:")
|
601 |
+
# expected_cols = [c.name for c in fields(AutoEvalColumn_mib_causalgraph)]
|
602 |
+
# # print(expected_cols)
|
603 |
|
604 |
+
# # print("\nMissing columns:")
|
605 |
+
# missing_cols = [col for col in expected_cols if col not in dataframe.columns]
|
606 |
+
# # print(missing_cols)
|
607 |
|
608 |
+
# # print("\nSample of DataFrame content:")
|
609 |
+
# # print(dataframe.head().to_string())
|
610 |
|
611 |
+
# return Leaderboard(
|
612 |
+
# value=dataframe,
|
613 |
+
# datatype=[c.type for c in fields(AutoEvalColumn_mib_causalgraph)],
|
614 |
+
# select_columns=SelectColumns(
|
615 |
+
# default_selection=[c.name for c in fields(AutoEvalColumn_mib_causalgraph) if c.displayed_by_default],
|
616 |
+
# cant_deselect=[c.name for c in fields(AutoEvalColumn_mib_causalgraph) if c.never_hidden],
|
617 |
+
# label="Select Columns to Display:",
|
618 |
+
# ),
|
619 |
+
# search_columns=["Method"],
|
620 |
+
# hide_columns=[c.name for c in fields(AutoEvalColumn_mib_causalgraph) if c.hidden],
|
621 |
+
# bool_checkboxgroup_label="Hide models",
|
622 |
+
# interactive=False,
|
623 |
+
# )
|
624 |
|
625 |
def init_leaderboard_mib_causalgraph(dataframe, track):
|
626 |
# print("Debugging column issues:")
|
src/populate.py
CHANGED
@@ -84,6 +84,7 @@ def get_leaderboard_df_mib_subgraph(results_path: str, requests_path: str, cols:
|
|
84 |
# aggregated_df = numeric_df.groupby(level=0).max().round(3)
|
85 |
|
86 |
# return aggregated_df
|
|
|
87 |
def aggregate_methods(df: pd.DataFrame) -> pd.DataFrame:
|
88 |
"""Aggregates rows with the same base method name by taking the max value for each column"""
|
89 |
df_copy = df.copy()
|
@@ -272,6 +273,10 @@ def get_leaderboard_df_mib_causalgraph(results_path: str, requests_path: str, co
|
|
272 |
intervention_averaged_df = create_intervention_averaged_df(aggregated_df)
|
273 |
|
274 |
# print("Transformed columns:", detailed_df.columns.tolist())
|
|
|
|
|
|
|
|
|
275 |
|
276 |
return detailed_df, aggregated_df, intervention_averaged_df
|
277 |
|
|
|
84 |
# aggregated_df = numeric_df.groupby(level=0).max().round(3)
|
85 |
|
86 |
# return aggregated_df
|
87 |
+
|
88 |
def aggregate_methods(df: pd.DataFrame) -> pd.DataFrame:
|
89 |
"""Aggregates rows with the same base method name by taking the max value for each column"""
|
90 |
df_copy = df.copy()
|
|
|
273 |
intervention_averaged_df = create_intervention_averaged_df(aggregated_df)
|
274 |
|
275 |
# print("Transformed columns:", detailed_df.columns.tolist())
|
276 |
+
|
277 |
+
print(f"Columns in detailed_df: {detailed_df.columns.tolist()}")
|
278 |
+
print(f"Columns in aggregated_df: {aggregated_df.columns.tolist()}")
|
279 |
+
print(f"Columns in intervention_averaged_df: {intervention_averaged_df.columns.tolist()}")
|
280 |
|
281 |
return detailed_df, aggregated_df, intervention_averaged_df
|
282 |
|