kennymckormick commited on
Commit
d496ac6
1 Parent(s): f9da5e7
Files changed (1) hide show
  1. gen_table.py +3 -2
gen_table.py CHANGED
@@ -182,7 +182,8 @@ def generate_table(results, fields):
182
  valid, missing = df[~pd.isna(df['Avg Score'])], df[pd.isna(df['Avg Score'])]
183
  valid = valid.sort_values('Avg Score')
184
  valid = valid.iloc[::-1]
185
- missing = missing.sort_values('MMBench_V11')
186
- missing = missing.iloc[::-1]
 
187
  df = pd.concat([valid, missing])
188
  return df
 
182
  valid, missing = df[~pd.isna(df['Avg Score'])], df[pd.isna(df['Avg Score'])]
183
  valid = valid.sort_values('Avg Score')
184
  valid = valid.iloc[::-1]
185
+ if len(fields):
186
+ missing = missing.sort_values('MMBench_V11' if 'MMBench_V11' in fields else fields[0])
187
+ missing = missing.iloc[::-1]
188
  df = pd.concat([valid, missing])
189
  return df