Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
maintainers-highlight-submission (#877)
Browse files- Set no limits for curated authors at submit (5ac54dcdb5c0716cd809c46a38b1f975cf379412)
- src/display/utils.py +6 -1
- src/envs.py +1 -0
- src/submission/check_validity.py +5 -1
src/display/utils.py
CHANGED
@@ -1,14 +1,19 @@
|
|
1 |
from dataclasses import dataclass, make_dataclass
|
|
|
2 |
from enum import Enum
|
3 |
import json
|
4 |
import logging
|
5 |
from datetime import datetime
|
6 |
import pandas as pd
|
7 |
|
|
|
|
|
8 |
# Configure logging
|
9 |
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
|
10 |
|
11 |
-
|
|
|
|
|
12 |
# Convert ISO 8601 dates to datetime objects for comparison
|
13 |
def parse_iso8601_datetime(date_str):
|
14 |
if date_str.endswith('Z'):
|
|
|
1 |
from dataclasses import dataclass, make_dataclass
|
2 |
+
from datasets import load_dataset
|
3 |
from enum import Enum
|
4 |
import json
|
5 |
import logging
|
6 |
from datetime import datetime
|
7 |
import pandas as pd
|
8 |
|
9 |
+
from src.envs import MAINTAINERS_HIGHLIGHT_REPO
|
10 |
+
|
11 |
# Configure logging
|
12 |
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
|
13 |
|
14 |
+
dataset = load_dataset(MAINTAINERS_HIGHLIGHT_REPO)
|
15 |
+
curated_authors = dataset["train"][0]["CURATED_SET"]
|
16 |
+
|
17 |
# Convert ISO 8601 dates to datetime objects for comparison
|
18 |
def parse_iso8601_datetime(date_str):
|
19 |
if date_str.endswith('Z'):
|
src/envs.py
CHANGED
@@ -8,6 +8,7 @@ REPO_ID = "open-llm-leaderboard/open_llm_leaderboard"
|
|
8 |
QUEUE_REPO = "open-llm-leaderboard/requests"
|
9 |
AGGREGATED_REPO = "open-llm-leaderboard/contents"
|
10 |
VOTES_REPO = "open-llm-leaderboard/votes"
|
|
|
11 |
|
12 |
HF_HOME = os.getenv("HF_HOME", ".")
|
13 |
|
|
|
8 |
QUEUE_REPO = "open-llm-leaderboard/requests"
|
9 |
AGGREGATED_REPO = "open-llm-leaderboard/contents"
|
10 |
VOTES_REPO = "open-llm-leaderboard/votes"
|
11 |
+
MAINTAINERS_HIGHLIGHT_REPO = "open-llm-leaderboard/maintainers-highlight"
|
12 |
|
13 |
HF_HOME = os.getenv("HF_HOME", ".")
|
14 |
|
src/submission/check_validity.py
CHANGED
@@ -9,7 +9,7 @@ from huggingface_hub import ModelCard
|
|
9 |
from huggingface_hub.hf_api import ModelInfo, get_safetensors_metadata
|
10 |
from transformers import AutoConfig, AutoTokenizer
|
11 |
|
12 |
-
from src.display.utils import parse_iso8601_datetime
|
13 |
from src.envs import HAS_HIGHER_RATE_LIMIT
|
14 |
|
15 |
|
@@ -103,6 +103,10 @@ def get_model_arch(model_info: ModelInfo):
|
|
103 |
|
104 |
|
105 |
def user_submission_permission(org_or_user, users_to_submission_dates, rate_limit_period, rate_limit_quota):
|
|
|
|
|
|
|
|
|
106 |
# Increase quota first if user has higher limits
|
107 |
if org_or_user in HAS_HIGHER_RATE_LIMIT:
|
108 |
rate_limit_quota *= 2
|
|
|
9 |
from huggingface_hub.hf_api import ModelInfo, get_safetensors_metadata
|
10 |
from transformers import AutoConfig, AutoTokenizer
|
11 |
|
12 |
+
from src.display.utils import parse_iso8601_datetime, curated_authors
|
13 |
from src.envs import HAS_HIGHER_RATE_LIMIT
|
14 |
|
15 |
|
|
|
103 |
|
104 |
|
105 |
def user_submission_permission(org_or_user, users_to_submission_dates, rate_limit_period, rate_limit_quota):
|
106 |
+
# No limit for curated authors
|
107 |
+
if org_or_user in curated_authors:
|
108 |
+
return True, ""
|
109 |
+
|
110 |
# Increase quota first if user has higher limits
|
111 |
if org_or_user in HAS_HIGHER_RATE_LIMIT:
|
112 |
rate_limit_quota *= 2
|