Skip to content

Commit

Permalink
updated monitor to have new price columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackie-Lian committed Nov 5, 2024
1 parent eb2c58c commit 615b92e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions fastchat/serve/monitor/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def get_full_table(arena_df, model_table_df, model_to_score):
row.append(model_table_df.iloc[i]["input_token_price"])
# Output Price
row.append(model_table_df.iloc[i]["output_token_price"])

values.append(row)
values.sort(key=lambda x: -x[1] if not np.isnan(x[1]) else 1e9)
return values
Expand Down Expand Up @@ -363,7 +363,7 @@ def process_row(row):
# if model_info.get("Knowledge cutoff date", "-") == "-"
# else model_info.get("Knowledge cutoff date", "Unknown")
# ),
model_info.get("input_token_price", "-"),
model_info.get("input_token_price", "-"),
model_info.get("output_token_price", "-"),
]
)
Expand All @@ -389,8 +389,8 @@ def update_leaderboard_df(arena_table_vals):
"Organization",
# "License",
# "Knowledge Cutoff",
"Input Token Price",
"Output Token Price",
"Input Token Price",
"Output Token Price",
]
elo_dataframe = pd.DataFrame(arena_table_vals, columns=columns)

Expand Down Expand Up @@ -1208,4 +1208,3 @@ def build_demo(elo_results_file, leaderboard_table_file, arena_hard_leaderboard)
max_threads=200,
auth=(args.password[0], args.password[1]) if args.password else None,
)

0 comments on commit 615b92e

Please sign in to comment.