Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Git LFS from repo #10

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
works when running app
  • Loading branch information
orionw committed Jul 7, 2024
commit 268b248d04272d39cb566a80f13f4eb3f7621cb7
16 changes: 7 additions & 9 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from models import ModelManager
from ui import build_side_by_side_ui_anon, build_side_by_side_ui_anon_sts, build_side_by_side_ui_anon_clustering, build_side_by_side_ui_named, build_side_by_side_ui_named_sts, build_side_by_side_ui_named_clustering, build_single_model_ui, build_single_model_ui_sts, build_single_model_ui_clustering

from arena_elo.elo_analysis import load_results


# download the videos
from huggingface_hub import hf_hub_url
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At runtime we download the videos from Huggingface. No need to keep them in this repo as I assume they are static and people won't be iterating on them.

Expand Down Expand Up @@ -52,14 +50,14 @@ def load_elo_results(elo_results_dir):
elo_results_file = {}
leaderboard_table_file = {}
for folder in elo_results_dir.glob('elo_results_*'):
if 'clustering' in file.name:
elo_results_file['clustering'] = load_results(folder)
elif 'retrieval' in file.name:
elo_results_file['retrieval'] = load_results(folder)
elif 'sts' in file.name:
elo_results_file['sts'] = load_results(folder)
if 'clustering' in folder.name:
elo_results_file['clustering'] = folder
elif 'retrieval' in folder.name:
elo_results_file['retrieval'] = folder
elif 'sts' in folder.name:
elo_results_file['sts'] = folder
else:
raise ValueError(f"Unknown file name: {file.name}")
raise ValueError(f"Unknown folder name: {folder.name}")
for file in elo_results_dir.glob('*_leaderboard.csv'):
if 'clustering' in file.name:
leaderboard_table_file['clustering'] = file
Expand Down
5 changes: 2 additions & 3 deletions leaderboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
import pandas as pd

from arena_elo.elo_analysis import load_results

leader_component_values = [None] * 5

Expand Down Expand Up @@ -77,9 +78,7 @@ def build_leaderboard_tab(elo_results_file, leaderboard_table_file, show_plot=Fa
md = "Loading ..."
p1 = p2 = p3 = p4 = None
else:
with open(elo_results_file, "rb") as fin:
elo_results = pickle.load(fin)

elo_results = load_results(elo_results_file)
anony_elo_results = elo_results["anony"]
anony_arena_df = anony_elo_results["leaderboard_table_df"]
p1 = anony_elo_results["win_fraction_heatmap"]
Expand Down