Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Gregor Betz
commited on
Commit
•
6a801ae
1
Parent(s):
a1d6dff
use token when checking hub availability
Browse files
src/leaderboard/read_evals.py
CHANGED
@@ -10,6 +10,7 @@ import numpy as np
|
|
10 |
from src.display.formatting import make_clickable_model
|
11 |
from src.display.utils import AutoEvalColumn, ModelType, Tasks, Precision, WeightType
|
12 |
from src.submission.check_validity import is_model_on_hub
|
|
|
13 |
|
14 |
|
15 |
@dataclass
|
@@ -56,7 +57,7 @@ class EvalResult:
|
|
56 |
full_model = "/".join(org_and_model)
|
57 |
|
58 |
still_on_hub, _, model_config = is_model_on_hub(
|
59 |
-
full_model, config.get("model_sha", "main"), trust_remote_code=True, test_tokenizer=False
|
60 |
)
|
61 |
architecture = "?"
|
62 |
if model_config is not None:
|
|
|
10 |
from src.display.formatting import make_clickable_model
|
11 |
from src.display.utils import AutoEvalColumn, ModelType, Tasks, Precision, WeightType
|
12 |
from src.submission.check_validity import is_model_on_hub
|
13 |
+
from src.envs import TOKEN
|
14 |
|
15 |
|
16 |
@dataclass
|
|
|
57 |
full_model = "/".join(org_and_model)
|
58 |
|
59 |
still_on_hub, _, model_config = is_model_on_hub(
|
60 |
+
full_model, config.get("model_sha", "main"), token=TOKEN, trust_remote_code=True, test_tokenizer=False
|
61 |
)
|
62 |
architecture = "?"
|
63 |
if model_config is not None:
|
src/submission/submit.py
CHANGED
@@ -50,7 +50,7 @@ def add_new_eval(
|
|
50 |
return styled_error(f'Base model "{base_model}" {error}')
|
51 |
|
52 |
if not weight_type == "Adapter":
|
53 |
-
model_on_hub, error, _ = is_model_on_hub(model_name=model, revision=revision, test_tokenizer=True)
|
54 |
if not model_on_hub:
|
55 |
return styled_error(f'Model "{model}" {error}')
|
56 |
|
|
|
50 |
return styled_error(f'Base model "{base_model}" {error}')
|
51 |
|
52 |
if not weight_type == "Adapter":
|
53 |
+
model_on_hub, error, _ = is_model_on_hub(model_name=model, revision=revision, token=TOKEN, test_tokenizer=True)
|
54 |
if not model_on_hub:
|
55 |
return styled_error(f'Model "{model}" {error}')
|
56 |
|