Spaces:
Running
Running
jasonshaoshun
commited on
Commit
·
28169bd
1
Parent(s):
56d1796
debug
Browse files
app.py
CHANGED
@@ -120,20 +120,25 @@ def init_leaderboard_mib_subgraph(dataframe, track):
|
|
120 |
)
|
121 |
|
122 |
def init_leaderboard_mib_causalgraph(dataframe, track):
|
123 |
-
print(
|
|
|
124 |
|
125 |
if dataframe is None or dataframe.empty:
|
126 |
raise ValueError("Leaderboard DataFrame is empty or None.")
|
127 |
|
128 |
-
#
|
129 |
-
|
130 |
-
print("Expected columns
|
131 |
|
132 |
-
#
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
|
|
|
|
|
|
|
|
|
137 |
return Leaderboard(
|
138 |
value=dataframe,
|
139 |
datatype=[c.type for c in fields(AutoEvalColumn_mib_causalgraph)],
|
|
|
120 |
)
|
121 |
|
122 |
def init_leaderboard_mib_causalgraph(dataframe, track):
|
123 |
+
print("init_leaderboard_mib: starting...")
|
124 |
+
print(f"DataFrame columns after entering function: {dataframe.columns.tolist()}")
|
125 |
|
126 |
if dataframe is None or dataframe.empty:
|
127 |
raise ValueError("Leaderboard DataFrame is empty or None.")
|
128 |
|
129 |
+
# Let's check our expected columns
|
130 |
+
expected_cols = [c.name for c in fields(AutoEvalColumn_mib_causalgraph)]
|
131 |
+
print(f"Expected columns: {expected_cols}")
|
132 |
|
133 |
+
# Check if every expected column exists
|
134 |
+
missing_cols = [col for col in expected_cols if col not in dataframe.columns]
|
135 |
+
if missing_cols:
|
136 |
+
print(f"Missing columns: {missing_cols}")
|
137 |
|
138 |
+
# Print first few rows to see the data structure
|
139 |
+
print("\nFirst few rows of DataFrame:")
|
140 |
+
print(dataframe.head().to_string())
|
141 |
+
|
142 |
return Leaderboard(
|
143 |
value=dataframe,
|
144 |
datatype=[c.type for c in fields(AutoEvalColumn_mib_causalgraph)],
|