Lisa Dunlap
commited on
Commit
β’
a2fadac
1
Parent(s):
ed08878
fixed model ordering
Browse files
app.py
CHANGED
@@ -238,9 +238,11 @@ def create_ranking_str(ranking, ranking_difference):
|
|
238 |
return f"{int(ranking)}"
|
239 |
|
240 |
def get_arena_table(arena_df, model_table_df, arena_subset_df=None):
|
|
|
241 |
arena_df = arena_df.sort_values(by=["final_ranking"], ascending=True)
|
242 |
# sort by rating
|
243 |
if arena_subset_df is not None:
|
|
|
244 |
arena_subset_df = arena_subset_df.sort_values(by=["final_ranking"], ascending=True)
|
245 |
# join arena_df and arena_subset_df on index
|
246 |
arena_df = arena_subset_df.join(arena_df["final_ranking"], rsuffix="_global", how="inner")
|
|
|
238 |
return f"{int(ranking)}"
|
239 |
|
240 |
def get_arena_table(arena_df, model_table_df, arena_subset_df=None):
|
241 |
+
arena_df = arena_df.sort_values(by=["rating"], ascending=False)
|
242 |
arena_df = arena_df.sort_values(by=["final_ranking"], ascending=True)
|
243 |
# sort by rating
|
244 |
if arena_subset_df is not None:
|
245 |
+
arena_subset_df = arena_subset_df.sort_values(by=["rating"], ascending=False)
|
246 |
arena_subset_df = arena_subset_df.sort_values(by=["final_ranking"], ascending=True)
|
247 |
# join arena_df and arena_subset_df on index
|
248 |
arena_df = arena_subset_df.join(arena_df["final_ranking"], rsuffix="_global", how="inner")
|