jasonshaoshun commited on
Commit
924fb19
·
1 Parent(s): b56a213
Files changed (1) hide show
  1. app.py +8 -12
app.py CHANGED
@@ -120,23 +120,19 @@ def init_leaderboard_mib_subgraph(dataframe, track):
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(
 
120
  )
121
 
122
  def init_leaderboard_mib_causalgraph(dataframe, track):
123
+ print("Debugging column issues:")
124
+ print("\nActual DataFrame columns:")
125
+ print(dataframe.columns.tolist())
126
 
127
+ print("\nExpected columns for Leaderboard:")
 
 
 
128
  expected_cols = [c.name for c in fields(AutoEvalColumn_mib_causalgraph)]
129
+ print(expected_cols)
130
 
131
+ print("\nMissing columns:")
132
  missing_cols = [col for col in expected_cols if col not in dataframe.columns]
133
+ print(missing_cols)
 
134
 
135
+ print("\nSample of DataFrame content:")
 
136
  print(dataframe.head().to_string())
137
 
138
  return Leaderboard(