“WadoodAbdul” commited on
Commit
2867e41
1 Parent(s): 9f897d4

updated repoId & results keys

Browse files
src/display/utils.py CHANGED
@@ -113,11 +113,11 @@ class ModelArch(Enum):
113
 
114
  @staticmethod
115
  def from_str(type):
116
- if "encoder" in type:
117
  return ModelArch.Encoder
118
- if "decoder" in type:
119
  return ModelArch.Decoder
120
- if "GLiNEREncoder" in type:
121
  return ModelArch.GLiNEREncoder
122
  # if "unknown" in type:
123
  # return ModelArch.Unknown
 
113
 
114
  @staticmethod
115
  def from_str(type):
116
+ if "Encoder" == type:
117
  return ModelArch.Encoder
118
+ if "Decoder" == type:
119
  return ModelArch.Decoder
120
+ if "GLiNEREncoder" == type:
121
  return ModelArch.GLiNEREncoder
122
  # if "unknown" in type:
123
  # return ModelArch.Unknown
src/envs.py CHANGED
@@ -9,7 +9,7 @@ TOKEN = os.environ.get("TOKEN") # A read/write token for your org
9
  OWNER = "m42-health" # Change to your org - don't forget to create a results and request dataset, with the correct format!
10
  # ----------------------------------
11
 
12
- REPO_ID = f"{OWNER}/leaderboard"
13
  QUEUE_REPO = f"{OWNER}/ner_leaderboard_requests"
14
  RESULTS_REPO = f"{OWNER}/ner_leaderboard_results"
15
 
 
9
  OWNER = "m42-health" # Change to your org - don't forget to create a results and request dataset, with the correct format!
10
  # ----------------------------------
11
 
12
+ REPO_ID = f"{OWNER}/clinical_ner_leaderboard"
13
  QUEUE_REPO = f"{OWNER}/ner_leaderboard_requests"
14
  RESULTS_REPO = f"{OWNER}/ner_leaderboard_results"
15
 
src/leaderboard/read_evals.py CHANGED
@@ -44,7 +44,7 @@ class EvalResult:
44
 
45
  # Precision
46
  precision = Precision.from_str(config.get("model_dtype"))
47
- model_architecture = ModelArch.from_str(config.get("architecture"))
48
  model_type = ModelType.from_str(config.get("model_type", ""))
49
  # print(model_architecture, model_type)
50
  license = config.get("license", "?")
@@ -65,7 +65,7 @@ class EvalResult:
65
  full_model = "/".join(org_and_model)
66
 
67
  still_on_hub, _, model_config = is_model_on_hub(
68
- full_model, config.get("model_sha", "main"), trust_remote_code=True, test_tokenizer=False
69
  )
70
  backbone = "?"
71
  if model_config is not None:
@@ -106,7 +106,7 @@ class EvalResult:
106
  dataset_results=dataset_results,
107
  clinical_type_results=types_results,
108
  precision=precision,
109
- revision=config.get("model_sha", ""),
110
  still_on_hub=still_on_hub,
111
  architecture=model_architecture,
112
  backbone=backbone,
 
44
 
45
  # Precision
46
  precision = Precision.from_str(config.get("model_dtype"))
47
+ model_architecture = ModelArch.from_str(config.get("model_architecture"))
48
  model_type = ModelType.from_str(config.get("model_type", ""))
49
  # print(model_architecture, model_type)
50
  license = config.get("license", "?")
 
65
  full_model = "/".join(org_and_model)
66
 
67
  still_on_hub, _, model_config = is_model_on_hub(
68
+ full_model, config.get("revision", "main"), trust_remote_code=True, test_tokenizer=False
69
  )
70
  backbone = "?"
71
  if model_config is not None:
 
106
  dataset_results=dataset_results,
107
  clinical_type_results=types_results,
108
  precision=precision,
109
+ revision=config.get("revision", ""),
110
  still_on_hub=still_on_hub,
111
  architecture=model_architecture,
112
  backbone=backbone,