Spaces:
AIR-Bench
/
Running on CPU Upgrade

hanhainebula commited on
Commit
158e42c
1 Parent(s): 982af90

Modify the save path in search_results hf repo

Browse files
Files changed (1) hide show
  1. src/utils.py +6 -2
src/utils.py CHANGED
@@ -225,9 +225,13 @@ def submit_results(filepath: str, model: str, model_url: str, reranker: str, rer
225
  timestamp_config, timestamp_fn = get_iso_format_timestamp()
226
  output_fn = f"{timestamp_fn}-{input_fp.name}"
227
  input_folder_path = input_fp.parent
 
 
 
 
228
  API.upload_file(
229
  path_or_fileobj=filepath,
230
- path_in_repo=f"{version}/{model}/{output_fn}",
231
  repo_id=SEARCH_RESULTS_REPO,
232
  repo_type="dataset",
233
  commit_message=f"feat: submit {model} to evaluate")
@@ -247,7 +251,7 @@ def submit_results(filepath: str, model: str, model_url: str, reranker: str, rer
247
  json.dump(output_config, f, ensure_ascii=False)
248
  API.upload_file(
249
  path_or_fileobj=input_folder_path / output_config_fn,
250
- path_in_repo=f"{version}/{model}/{output_config_fn}",
251
  repo_id=SEARCH_RESULTS_REPO,
252
  repo_type="dataset",
253
  commit_message=f"feat: submit {model} config")
 
225
  timestamp_config, timestamp_fn = get_iso_format_timestamp()
226
  output_fn = f"{timestamp_fn}-{input_fp.name}"
227
  input_folder_path = input_fp.parent
228
+
229
+ if not reranker:
230
+ reranker = 'NoReranker'
231
+
232
  API.upload_file(
233
  path_or_fileobj=filepath,
234
+ path_in_repo=f"{version}/{model}/{reranker}/{output_fn}",
235
  repo_id=SEARCH_RESULTS_REPO,
236
  repo_type="dataset",
237
  commit_message=f"feat: submit {model} to evaluate")
 
251
  json.dump(output_config, f, ensure_ascii=False)
252
  API.upload_file(
253
  path_or_fileobj=input_folder_path / output_config_fn,
254
+ path_in_repo=f"{version}/{model}/{reranker}/{output_config_fn}",
255
  repo_id=SEARCH_RESULTS_REPO,
256
  repo_type="dataset",
257
  commit_message=f"feat: submit {model} config")