XufengDuan commited on
Commit
7cbe773
1 Parent(s): 7fadd3a

update scripts

Browse files
Files changed (1) hide show
  1. src/leaderboard/read_evals.py +8 -9
src/leaderboard/read_evals.py CHANGED
@@ -132,9 +132,8 @@ class EvalResult:
132
  all_files_before = os.listdir(requests_path)
133
  print("test the variable:", all_files_before)
134
  print(self.full_model)
135
- print(self.precision.value.name)
136
- request_file = get_request_file_for_model(requests_path, self.full_model,
137
- self.precision.value.name)
138
  print("test the variable:",request_file)
139
  all_files = os.listdir(request_file)
140
  print("Files in the folder:", all_files)
@@ -181,7 +180,7 @@ class EvalResult:
181
  return data_dict
182
 
183
 
184
- def get_request_file_for_model(requests_path, model_name, precision):
185
  """Selects the correct request file for a given model. Only keeps runs tagged as FINISHED"""
186
  request_files = os.path.join(
187
  requests_path,
@@ -195,11 +194,11 @@ def get_request_file_for_model(requests_path, model_name, precision):
195
  for tmp_request_file in request_files:
196
  with open(tmp_request_file, "r") as f:
197
  req_content = json.load(f)
198
- if (
199
- req_content["status"] in ["FINISHED"]
200
- and req_content["precision"] == precision.split(".")[-1]
201
- ):
202
- request_file = tmp_request_file
203
  return request_file
204
 
205
 
 
132
  all_files_before = os.listdir(requests_path)
133
  print("test the variable:", all_files_before)
134
  print(self.full_model)
135
+ #print(self.precision.value.name)
136
+ request_file = get_request_file_for_model(requests_path, self.full_model)
 
137
  print("test the variable:",request_file)
138
  all_files = os.listdir(request_file)
139
  print("Files in the folder:", all_files)
 
180
  return data_dict
181
 
182
 
183
+ def get_request_file_for_model(requests_path, model_name):
184
  """Selects the correct request file for a given model. Only keeps runs tagged as FINISHED"""
185
  request_files = os.path.join(
186
  requests_path,
 
194
  for tmp_request_file in request_files:
195
  with open(tmp_request_file, "r") as f:
196
  req_content = json.load(f)
197
+ # if (
198
+ # req_content["status"] in ["FINISHED"]
199
+ # and req_content["precision"] == precision.split(".")[-1]
200
+ # ):
201
+ # request_file = tmp_request_file
202
  return request_file
203
 
204