liujie commited on
Commit
e3ce2e2
·
1 Parent(s): 4817c60

first commit

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. src/utils.py +3 -3
app.py CHANGED
@@ -46,8 +46,8 @@ def color_model_type_column(df, color_map):
46
  return f'background-color: {color}'
47
 
48
  # Format for different columns
49
- format_dict = {col: "{:.2f}" for col in df.columns if col not in ['Average', 'Model', 'Model Type']}
50
- format_dict['Average'] = "{:.2f}"
51
  format_dict[''] = "{:d}"
52
 
53
  return df.style.applymap(apply_color, subset=['Model Type']).format(format_dict, na_rep='')
@@ -96,7 +96,7 @@ repo = snapshot_download(
96
  with zipfile.ZipFile(os.path.join(eval_set_dir, 'videos.zip'), 'r') as zip_ref:
97
  zip_ref.extractall(eval_set_dir)
98
 
99
- rewardbench_data = load_all_data(eval_results_dir).sort_values(by='Average', ascending=False)
100
  col_types_rewardbench = ["number"] + ["markdown"]+ ["str"] + ["number"] * (len(rewardbench_data.columns) - 1)
101
  # for showing random samples
102
  eval_set = pd.read_csv(os.path.join(eval_set_dir, 'videogen-rewardbench.csv'))
 
46
  return f'background-color: {color}'
47
 
48
  # Format for different columns
49
+ format_dict = {col: "{:.2f}" for col in df.columns if col not in ['Avg.', 'Model', 'Model Type']}
50
+ format_dict['Avg.'] = "{:.2f}"
51
  format_dict[''] = "{:d}"
52
 
53
  return df.style.applymap(apply_color, subset=['Model Type']).format(format_dict, na_rep='')
 
96
  with zipfile.ZipFile(os.path.join(eval_set_dir, 'videos.zip'), 'r') as zip_ref:
97
  zip_ref.extractall(eval_set_dir)
98
 
99
+ rewardbench_data = load_all_data(eval_results_dir).sort_values(by='Avg.', ascending=False)
100
  col_types_rewardbench = ["number"] + ["markdown"]+ ["str"] + ["number"] * (len(rewardbench_data.columns) - 1)
101
  # for showing random samples
102
  eval_set = pd.read_csv(os.path.join(eval_set_dir, 'videogen-rewardbench.csv'))
src/utils.py CHANGED
@@ -33,9 +33,9 @@ def load_all_data(data_dir):
33
  data_list.append({
34
  "Model": model_hyperlink(model_link, model),
35
  "Model Type": data.get("model_type", ""),
36
- "Average": avg,
37
- "Average (w/o Ties)": avg_without_tie,
38
- "Average (w/ Ties)": avg_with_tie,
39
  "Overall (w/o Ties)": round(without_tie.get("overall", 0), 2),
40
  "VQ (w/o Ties)": round(without_tie.get("vq", 0), 2),
41
  "MQ (w/o Ties)": round(without_tie.get("mq", 0), 2),
 
33
  data_list.append({
34
  "Model": model_hyperlink(model_link, model),
35
  "Model Type": data.get("model_type", ""),
36
+ "Avg.": avg,
37
+ "Avg. (w/o Ties)": avg_without_tie,
38
+ "Avg. (w/ Ties)": avg_with_tie,
39
  "Overall (w/o Ties)": round(without_tie.get("overall", 0), 2),
40
  "VQ (w/o Ties)": round(without_tie.get("vq", 0), 2),
41
  "MQ (w/o Ties)": round(without_tie.get("mq", 0), 2),