sunitha98 commited on
Commit
7947bf7
1 Parent(s): a8df4ec

allow gated models

Browse files
src/leaderboard/read_evals.py CHANGED
@@ -7,6 +7,7 @@ from dataclasses import dataclass
7
  import dateutil
8
  import numpy as np
9
 
 
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
@@ -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:
 
7
  import dateutil
8
  import numpy as np
9
 
10
+ from src.envs import TOKEN
11
  from src.display.formatting import make_clickable_model
12
  from src.display.utils import AutoEvalColumn, ModelType, Tasks, Precision, WeightType
13
  from src.submission.check_validity import is_model_on_hub
 
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, 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