eduagarcia commited on
Commit
0c95be4
1 Parent(s): 9fe0afe

Fix num_parameters in some models

Browse files
Files changed (1) hide show
  1. src/leaderboard/read_evals.py +4 -2
src/leaderboard/read_evals.py CHANGED
@@ -56,6 +56,7 @@ class EvalResult:
56
 
57
  # Precision
58
  precision = Precision.from_str(config.get("model_dtype"))
 
59
 
60
  # Get model and org
61
  org_and_model = config.get("model_name")
@@ -122,7 +123,8 @@ class EvalResult:
122
  precision=precision,
123
  revision= config.get("model_sha", ""),
124
  json_filename=json_filename,
125
- eval_time=config.get("total_evaluation_time_seconds", 0.0)
 
126
  )
127
 
128
  def update_with_request_file(self, requests_path):
@@ -134,7 +136,7 @@ class EvalResult:
134
  request = json.load(f)
135
  self.model_type = ModelType.from_str(request.get("model_type", "Unknown"))
136
  self.weight_type = WeightType[request.get("weight_type", "Original")]
137
- self.num_params = request.get("params", 0)
138
  self.date = request.get("submitted_time", "")
139
  self.architecture = request.get("architectures", "Unknown")
140
  self.status = request.get("status", "FAILED")
 
56
 
57
  # Precision
58
  precision = Precision.from_str(config.get("model_dtype"))
59
+ num_params = round(config.get("model_num_parameters", 0) / 1_000_000_000, 2)
60
 
61
  # Get model and org
62
  org_and_model = config.get("model_name")
 
123
  precision=precision,
124
  revision= config.get("model_sha", ""),
125
  json_filename=json_filename,
126
+ eval_time=config.get("total_evaluation_time_seconds", 0.0),
127
+ num_params=num_params
128
  )
129
 
130
  def update_with_request_file(self, requests_path):
 
136
  request = json.load(f)
137
  self.model_type = ModelType.from_str(request.get("model_type", "Unknown"))
138
  self.weight_type = WeightType[request.get("weight_type", "Original")]
139
+ self.num_params = max(request.get("params", 0), self.num_params)
140
  self.date = request.get("submitted_time", "")
141
  self.architecture = request.get("architectures", "Unknown")
142
  self.status = request.get("status", "FAILED")