Jacqueline Garrahan
commited on
Commit
•
0a77cc1
1
Parent(s):
57dbb7f
Check in files
Browse files- app.py +2 -0
- src/about.py +1 -3
- src/submission/check_validity.py +1 -1
- src/submission/submit.py +1 -1
app.py
CHANGED
@@ -61,6 +61,8 @@ LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS,
|
|
61 |
def init_leaderboard(dataframe):
|
62 |
if dataframe is None or dataframe.empty:
|
63 |
raise ValueError("Leaderboard DataFrame is empty or None.")
|
|
|
|
|
64 |
return Leaderboard(
|
65 |
value=dataframe,
|
66 |
datatype=[c.type for c in fields(AutoEvalColumn)],
|
|
|
61 |
def init_leaderboard(dataframe):
|
62 |
if dataframe is None or dataframe.empty:
|
63 |
raise ValueError("Leaderboard DataFrame is empty or None.")
|
64 |
+
|
65 |
+
|
66 |
return Leaderboard(
|
67 |
value=dataframe,
|
68 |
datatype=[c.type for c in fields(AutoEvalColumn)],
|
src/about.py
CHANGED
@@ -14,12 +14,10 @@ class Task:
|
|
14 |
class Tasks(Enum):
|
15 |
# task_key in the json file, metric_key in the json file, name to display in the leaderboard
|
16 |
task0 = Task("aiera_transcript_sentiment", "accuracy,none","Sentiment", reference_url="https://huggingface.co/datasets/Aiera/aiera-transcript-sentiment")
|
17 |
-
task1 = Task("aiera_ect_sum", "
|
18 |
task2 = Task("finqa", "exact_match_manual,none","Q&A", reference_url="https://huggingface.co/datasets/Aiera/finqa-verified")
|
19 |
task3 = Task("aiera_speaker_assign", "accuracy,none", "Speaker ID", reference_url="https://huggingface.co/datasets/Aiera/aiera-speaker-assign")
|
20 |
|
21 |
-
#task7 = Task("flare_ner", "accuracy,none","flare-ner", reference_url="test")
|
22 |
-
|
23 |
|
24 |
NUM_FEWSHOT = 0 # Change with your few shot
|
25 |
# ---------------------------------------------------
|
|
|
14 |
class Tasks(Enum):
|
15 |
# task_key in the json file, metric_key in the json file, name to display in the leaderboard
|
16 |
task0 = Task("aiera_transcript_sentiment", "accuracy,none","Sentiment", reference_url="https://huggingface.co/datasets/Aiera/aiera-transcript-sentiment")
|
17 |
+
task1 = Task("aiera_ect_sum", "bert_f1,none","Summary", reference_url="https://huggingface.co/datasets/Aiera/aiera-ect-sum")
|
18 |
task2 = Task("finqa", "exact_match_manual,none","Q&A", reference_url="https://huggingface.co/datasets/Aiera/finqa-verified")
|
19 |
task3 = Task("aiera_speaker_assign", "accuracy,none", "Speaker ID", reference_url="https://huggingface.co/datasets/Aiera/aiera-speaker-assign")
|
20 |
|
|
|
|
|
21 |
|
22 |
NUM_FEWSHOT = 0 # Change with your few shot
|
23 |
# ---------------------------------------------------
|
src/submission/check_validity.py
CHANGED
@@ -88,7 +88,7 @@ def already_submitted_models(requested_models_dir: str) -> set[str]:
|
|
88 |
continue
|
89 |
with open(os.path.join(root, file), "r") as f:
|
90 |
info = json.load(f)
|
91 |
-
file_names.append(f"{info['model']}_{info['revision']}
|
92 |
|
93 |
# Select organisation
|
94 |
if info["model"].count("/") == 0 or "submitted_time" not in info:
|
|
|
88 |
continue
|
89 |
with open(os.path.join(root, file), "r") as f:
|
90 |
info = json.load(f)
|
91 |
+
file_names.append(f"{info['model']}_{info['revision']}")
|
92 |
|
93 |
# Select organisation
|
94 |
if info["model"].count("/") == 0 or "submitted_time" not in info:
|
src/submission/submit.py
CHANGED
@@ -97,7 +97,7 @@ def add_new_eval(
|
|
97 |
print("Creating eval file")
|
98 |
OUT_DIR = f"{EVAL_REQUESTS_PATH}/{user_name}"
|
99 |
os.makedirs(OUT_DIR, exist_ok=True)
|
100 |
-
out_path = f"{OUT_DIR}/{model_path}
|
101 |
|
102 |
with open(out_path, "w") as f:
|
103 |
f.write(json.dumps(eval_entry))
|
|
|
97 |
print("Creating eval file")
|
98 |
OUT_DIR = f"{EVAL_REQUESTS_PATH}/{user_name}"
|
99 |
os.makedirs(OUT_DIR, exist_ok=True)
|
100 |
+
out_path = f"{OUT_DIR}/{model_path}_{revision}.json"
|
101 |
|
102 |
with open(out_path, "w") as f:
|
103 |
f.write(json.dumps(eval_entry))
|