mshuaibi commited on
Commit
ae8848d
·
1 Parent(s): 7575641

type check

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -188,7 +188,7 @@ class LeaderboardData:
188
  for col in df.columns:
189
  if "mae" in col.lower():
190
  df[col] = (df[col] * 1000).round(2)
191
- else:
192
  df[col] = df[col].round(4)
193
  df = df.sort_values(by=[f"{subsplit}_energy_mae"], ascending=True)
194
  df[f"{subsplit}_energy_mae"] = df[f"{subsplit}_energy_mae"]
@@ -221,7 +221,7 @@ class LeaderboardData:
221
  for col in df.columns:
222
  if "mae" in col.lower():
223
  df[col] = (df[col] * 1000).round(2)
224
- else:
225
  df[col] = df[col].round(4)
226
  df = df.sort_values(by=[eval_columns[0]], ascending=True)
227
  df = df.rename(columns=COLUMN_MAPPING)
 
188
  for col in df.columns:
189
  if "mae" in col.lower():
190
  df[col] = (df[col] * 1000).round(2)
191
+ elif pd.api.types.is_numeric_dtype(df[col]):
192
  df[col] = df[col].round(4)
193
  df = df.sort_values(by=[f"{subsplit}_energy_mae"], ascending=True)
194
  df[f"{subsplit}_energy_mae"] = df[f"{subsplit}_energy_mae"]
 
221
  for col in df.columns:
222
  if "mae" in col.lower():
223
  df[col] = (df[col] * 1000).round(2)
224
+ elif pd.api.types.is_numeric_dtype(df[col]):
225
  df[col] = df[col].round(4)
226
  df = df.sort_values(by=[eval_columns[0]], ascending=True)
227
  df = df.rename(columns=COLUMN_MAPPING)