zhiminy commited on
Commit
f9c98f7
·
1 Parent(s): 31d0178
Files changed (2) hide show
  1. app.py +6 -6
  2. msr.py +1 -2
app.py CHANGED
@@ -950,7 +950,7 @@ def get_hf_token():
950
 
951
  def load_cached_leaderboard_and_metrics():
952
  """
953
- Load cached leaderboard and monthly metrics data from SWE-Arena/swe_leaderboards dataset.
954
  This is much faster than constructing from scratch on every app launch.
955
 
956
  Returns:
@@ -968,7 +968,7 @@ def load_cached_leaderboard_and_metrics():
968
 
969
  # Download cached file
970
  cached_path = hf_hub_download(
971
- repo_id="SWE-Arena/swe_leaderboards",
972
  filename="swe-issue.json",
973
  repo_type="dataset",
974
  token=token
@@ -1079,7 +1079,7 @@ def save_agent_to_hf(data):
1079
 
1080
  def save_leaderboard_and_metrics_to_hf():
1081
  """
1082
- Save leaderboard data and monthly metrics to SWE-Arena/swe_leaderboards dataset.
1083
  Creates a comprehensive JSON file with both leaderboard stats and monthly metrics.
1084
  If the file exists, it will be overwritten.
1085
 
@@ -1127,11 +1127,11 @@ def save_leaderboard_and_metrics_to_hf():
1127
  file_like_object = io.BytesIO(json_content.encode('utf-8'))
1128
 
1129
  # Upload to HuggingFace (will overwrite if exists)
1130
- print(f"\n🤗 Uploading to SWE-Arena/swe_leaderboards...")
1131
  api.upload_file(
1132
  path_or_fileobj=file_like_object,
1133
  path_in_repo="swe-issue.json",
1134
- repo_id="SWE-Arena/swe_leaderboards",
1135
  repo_type="dataset",
1136
  token=token,
1137
  commit_message=f"Update leaderboard data - {datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M:%S')} UTC"
@@ -1249,7 +1249,7 @@ def mine_all_agents():
1249
  # After mining is complete, save leaderboard and metrics to HuggingFace
1250
  print(f"📤 Uploading leaderboard and metrics data...")
1251
  if save_leaderboard_and_metrics_to_hf():
1252
- print(f"✓ Leaderboard and metrics successfully uploaded to SWE-Arena/swe_leaderboards")
1253
  else:
1254
  print(f"⚠️ Failed to upload leaderboard and metrics data")
1255
 
 
950
 
951
  def load_cached_leaderboard_and_metrics():
952
  """
953
+ Load cached leaderboard and monthly metrics data from SWE-Arena/leaderboard_metadata dataset.
954
  This is much faster than constructing from scratch on every app launch.
955
 
956
  Returns:
 
968
 
969
  # Download cached file
970
  cached_path = hf_hub_download(
971
+ repo_id="SWE-Arena/leaderboard_metadata",
972
  filename="swe-issue.json",
973
  repo_type="dataset",
974
  token=token
 
1079
 
1080
  def save_leaderboard_and_metrics_to_hf():
1081
  """
1082
+ Save leaderboard data and monthly metrics to SWE-Arena/leaderboard_metadata dataset.
1083
  Creates a comprehensive JSON file with both leaderboard stats and monthly metrics.
1084
  If the file exists, it will be overwritten.
1085
 
 
1127
  file_like_object = io.BytesIO(json_content.encode('utf-8'))
1128
 
1129
  # Upload to HuggingFace (will overwrite if exists)
1130
+ print(f"\n🤗 Uploading to SWE-Arena/leaderboard_metadata...")
1131
  api.upload_file(
1132
  path_or_fileobj=file_like_object,
1133
  path_in_repo="swe-issue.json",
1134
+ repo_id="SWE-Arena/leaderboard_metadata",
1135
  repo_type="dataset",
1136
  token=token,
1137
  commit_message=f"Update leaderboard data - {datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M:%S')} UTC"
 
1249
  # After mining is complete, save leaderboard and metrics to HuggingFace
1250
  print(f"📤 Uploading leaderboard and metrics data...")
1251
  if save_leaderboard_and_metrics_to_hf():
1252
+ print(f"✓ Leaderboard and metrics successfully uploaded to SWE-Arena/leaderboard_metadata")
1253
  else:
1254
  print(f"⚠️ Failed to upload leaderboard and metrics data")
1255
 
msr.py CHANGED
@@ -21,7 +21,7 @@ load_dotenv()
21
 
22
  AGENTS_REPO = "SWE-Arena/swe_agents"
23
  ISSUE_METADATA_REPO = "SWE-Arena/issue_metadata"
24
- LEADERBOARD_REPO = "SWE-Arena/swe_leaderboards"
25
  LEADERBOARD_TIME_FRAME_DAYS = 180 # Time frame for leaderboard
26
 
27
  # =============================================================================
@@ -601,7 +601,6 @@ def calculate_monthly_metrics(all_metadata, agents):
601
 
602
  def save_leaderboard_and_metrics_to_hf(all_metadata, agents):
603
  """
604
- Save leaderboard data and monthly metrics to SWE-Arena/swe_leaderboards dataset.
605
  Creates a comprehensive JSON file with both leaderboard stats and monthly metrics.
606
  If the file exists, it will be overwritten.
607
 
 
21
 
22
  AGENTS_REPO = "SWE-Arena/swe_agents"
23
  ISSUE_METADATA_REPO = "SWE-Arena/issue_metadata"
24
+ LEADERBOARD_REPO = "SWE-Arena/leaderboard_metadata"
25
  LEADERBOARD_TIME_FRAME_DAYS = 180 # Time frame for leaderboard
26
 
27
  # =============================================================================
 
601
 
602
  def save_leaderboard_and_metrics_to_hf(all_metadata, agents):
603
  """
 
604
  Creates a comprehensive JSON file with both leaderboard stats and monthly metrics.
605
  If the file exists, it will be overwritten.
606