Spaces:
Paused
Paused
Updated owner organization
Browse files- src/custom_tasks/heq_task.py +2 -1
- src/custom_tasks/sentiment_task.py +2 -1
- src/custom_tasks/translation_task.py +2 -1
- src/custom_tasks/winograd_task.py +2 -1
- src/envs.py +1 -1
- src/logging.py +1 -1
src/custom_tasks/heq_task.py
CHANGED
@@ -9,6 +9,7 @@ from lighteval.tasks.requests import Doc
|
|
9 |
from Levenshtein import distance
|
10 |
import collections
|
11 |
from lighteval.utils import as_list
|
|
|
12 |
|
13 |
def get_tokens(s):
|
14 |
if not s:
|
@@ -105,7 +106,7 @@ heq_task = LightevalTaskConfig(
|
|
105 |
name="heq-qa-tlnls",
|
106 |
prompt_function="heq_prompt_fn", # must be defined in the file or imported from src/lighteval/tasks/tasks_prompt_formatting.py
|
107 |
suite=["custom"],
|
108 |
-
hf_repo="
|
109 |
hf_subset="default",
|
110 |
hf_avail_splits=["heq"],
|
111 |
evaluation_splits=["heq"],
|
|
|
9 |
from Levenshtein import distance
|
10 |
import collections
|
11 |
from lighteval.utils import as_list
|
12 |
+
from envs import OWNER
|
13 |
|
14 |
def get_tokens(s):
|
15 |
if not s:
|
|
|
106 |
name="heq-qa-tlnls",
|
107 |
prompt_function="heq_prompt_fn", # must be defined in the file or imported from src/lighteval/tasks/tasks_prompt_formatting.py
|
108 |
suite=["custom"],
|
109 |
+
hf_repo=f"{OWNER}/tests",
|
110 |
hf_subset="default",
|
111 |
hf_avail_splits=["heq"],
|
112 |
evaluation_splits=["heq"],
|
src/custom_tasks/sentiment_task.py
CHANGED
@@ -9,6 +9,7 @@ from lighteval.tasks.requests import Doc
|
|
9 |
from Levenshtein import distance
|
10 |
import collections
|
11 |
from lighteval.utils import as_list
|
|
|
12 |
|
13 |
def sentiment_eval_fn(golds: list[str], predictions: list[str], formatted_doc: Doc = None):
|
14 |
if len(predictions) > 1:
|
@@ -49,7 +50,7 @@ sentiment_task = LightevalTaskConfig(
|
|
49 |
name="sentiment-acc",
|
50 |
prompt_function="sentiment_prompt_fn", # must be defined in the file or imported from src/lighteval/tasks/tasks_prompt_formatting.py
|
51 |
suite=["custom"],
|
52 |
-
hf_repo="
|
53 |
hf_subset="default",
|
54 |
hf_avail_splits=["sentiment"],
|
55 |
evaluation_splits=["sentiment"],
|
|
|
9 |
from Levenshtein import distance
|
10 |
import collections
|
11 |
from lighteval.utils import as_list
|
12 |
+
from envs import OWNER
|
13 |
|
14 |
def sentiment_eval_fn(golds: list[str], predictions: list[str], formatted_doc: Doc = None):
|
15 |
if len(predictions) > 1:
|
|
|
50 |
name="sentiment-acc",
|
51 |
prompt_function="sentiment_prompt_fn", # must be defined in the file or imported from src/lighteval/tasks/tasks_prompt_formatting.py
|
52 |
suite=["custom"],
|
53 |
+
hf_repo=f"{OWNER}/tests",
|
54 |
hf_subset="default",
|
55 |
hf_avail_splits=["sentiment"],
|
56 |
evaluation_splits=["sentiment"],
|
src/custom_tasks/translation_task.py
CHANGED
@@ -10,6 +10,7 @@ from Levenshtein import distance
|
|
10 |
import collections
|
11 |
from lighteval.utils import as_list
|
12 |
import sacrebleu
|
|
|
13 |
|
14 |
def trans_prompt_fn(line, task_name: str = None):
|
15 |
"""Defines how to go from a dataset line to a doc object.
|
@@ -45,7 +46,7 @@ translation_task = LightevalTaskConfig(
|
|
45 |
name="he-en-trans-bleu",
|
46 |
prompt_function="trans_prompt_fn", # must be defined in the file or imported from src/lighteval/tasks/tasks_prompt_formatting.py
|
47 |
suite=["custom"],
|
48 |
-
hf_repo="
|
49 |
hf_subset="default",
|
50 |
hf_avail_splits=["en2he", "he2en"],
|
51 |
evaluation_splits=["en2he", "he2en"],
|
|
|
10 |
import collections
|
11 |
from lighteval.utils import as_list
|
12 |
import sacrebleu
|
13 |
+
from envs import OWNER
|
14 |
|
15 |
def trans_prompt_fn(line, task_name: str = None):
|
16 |
"""Defines how to go from a dataset line to a doc object.
|
|
|
46 |
name="he-en-trans-bleu",
|
47 |
prompt_function="trans_prompt_fn", # must be defined in the file or imported from src/lighteval/tasks/tasks_prompt_formatting.py
|
48 |
suite=["custom"],
|
49 |
+
hf_repo=f"{OWNER}/tests",
|
50 |
hf_subset="default",
|
51 |
hf_avail_splits=["en2he", "he2en"],
|
52 |
evaluation_splits=["en2he", "he2en"],
|
src/custom_tasks/winograd_task.py
CHANGED
@@ -9,6 +9,7 @@ from lighteval.tasks.requests import Doc
|
|
9 |
from Levenshtein import distance
|
10 |
import collections
|
11 |
from lighteval.utils import as_list
|
|
|
12 |
|
13 |
def winograd_eval_fn(golds: list[str], predictions: list[str], formatted_doc: Doc = None):
|
14 |
if len(predictions) > 1:
|
@@ -46,7 +47,7 @@ winograd_task = LightevalTaskConfig(
|
|
46 |
name="winograd-acc",
|
47 |
prompt_function="winograd_prompt_fn", # must be defined in the file or imported from src/lighteval/tasks/tasks_prompt_formatting.py
|
48 |
suite=["custom"],
|
49 |
-
hf_repo="
|
50 |
hf_subset="default",
|
51 |
hf_avail_splits=["winograd"],
|
52 |
evaluation_splits=["winograd"],
|
|
|
9 |
from Levenshtein import distance
|
10 |
import collections
|
11 |
from lighteval.utils import as_list
|
12 |
+
from envs import OWNER
|
13 |
|
14 |
def winograd_eval_fn(golds: list[str], predictions: list[str], formatted_doc: Doc = None):
|
15 |
if len(predictions) > 1:
|
|
|
47 |
name="winograd-acc",
|
48 |
prompt_function="winograd_prompt_fn", # must be defined in the file or imported from src/lighteval/tasks/tasks_prompt_formatting.py
|
49 |
suite=["custom"],
|
50 |
+
hf_repo=f"{OWNER}/tests",
|
51 |
hf_subset="default",
|
52 |
hf_avail_splits=["winograd"],
|
53 |
evaluation_splits=["winograd"],
|
src/envs.py
CHANGED
@@ -6,7 +6,7 @@ from huggingface_hub import HfApi
|
|
6 |
# ----------------------------------
|
7 |
TOKEN = os.environ.get("HF_TOKEN") # A read/write token for your org
|
8 |
|
9 |
-
OWNER = "
|
10 |
|
11 |
# For harness evaluations
|
12 |
DEVICE = "cpu" # "cuda:0" if you add compute, for harness evaluations
|
|
|
6 |
# ----------------------------------
|
7 |
TOKEN = os.environ.get("HF_TOKEN") # A read/write token for your org
|
8 |
|
9 |
+
OWNER = "hebrew-llm-leaderboard" # Change to your org - don't forget to create a results and request file
|
10 |
|
11 |
# For harness evaluations
|
12 |
DEVICE = "cpu" # "cuda:0" if you add compute, for harness evaluations
|
src/logging.py
CHANGED
@@ -22,7 +22,7 @@ def read_logs():
|
|
22 |
# API.upload_file(
|
23 |
# path_or_fileobj="output.log",
|
24 |
# path_in_repo="backend.log",
|
25 |
-
# repo_id="
|
26 |
# repo_type="dataset",
|
27 |
# )
|
28 |
|
|
|
22 |
# API.upload_file(
|
23 |
# path_or_fileobj="output.log",
|
24 |
# path_in_repo="backend.log",
|
25 |
+
# repo_id="hebrew-llm-leaderboard/logs",
|
26 |
# repo_type="dataset",
|
27 |
# )
|
28 |
|