zhimin-z commited on
Commit
10bb5e0
·
1 Parent(s): 71c9dd8
Files changed (1) hide show
  1. msr.py +11 -5
msr.py CHANGED
@@ -37,8 +37,8 @@ LEADERBOARD_TIME_FRAME_DAYS = 180
37
  GIT_SYNC_TIMEOUT = 300 # 5 minutes timeout for git pull
38
 
39
  # OPTIMIZED DUCKDB CONFIGURATION
40
- DUCKDB_THREADS = 8
41
- DUCKDB_MEMORY_LIMIT = "64GB"
42
 
43
  # Streaming batch configuration
44
  BATCH_SIZE_DAYS = 7 # Process 1 week at a time (~168 hourly files)
@@ -54,7 +54,7 @@ UPLOAD_DELAY_SECONDS = 5
54
  UPLOAD_MAX_BACKOFF = 3600
55
 
56
  # Scheduler configuration
57
- SCHEDULE_ENABLED = True
58
  SCHEDULE_DAY_OF_WEEK = 'mon' # Monday
59
  SCHEDULE_HOUR = 0
60
  SCHEDULE_MINUTE = 0
@@ -956,7 +956,6 @@ def mine_all_agents():
956
  # Separate commits and PRs
957
  commit_metadata = results['commits']
958
  pr_metadata = results['prs']
959
-
960
  except Exception as e:
961
  print(f"Error during DuckDB fetch: {str(e)}")
962
  traceback.print_exc()
@@ -984,10 +983,17 @@ def mine_all_agents():
984
  save_leaderboard_data_to_hf(
985
  leaderboard_dict, commit_monthly_metrics, pr_monthly_metrics
986
  )
987
-
988
  except Exception as e:
989
  print(f"Error saving leaderboard: {str(e)}")
990
  traceback.print_exc()
 
 
 
 
 
 
 
 
991
 
992
 
993
  # =============================================================================
 
37
  GIT_SYNC_TIMEOUT = 300 # 5 minutes timeout for git pull
38
 
39
  # OPTIMIZED DUCKDB CONFIGURATION
40
+ DUCKDB_THREADS = 16
41
+ DUCKDB_MEMORY_LIMIT = "128GB"
42
 
43
  # Streaming batch configuration
44
  BATCH_SIZE_DAYS = 7 # Process 1 week at a time (~168 hourly files)
 
54
  UPLOAD_MAX_BACKOFF = 3600
55
 
56
  # Scheduler configuration
57
+ SCHEDULE_ENABLED = False
58
  SCHEDULE_DAY_OF_WEEK = 'mon' # Monday
59
  SCHEDULE_HOUR = 0
60
  SCHEDULE_MINUTE = 0
 
956
  # Separate commits and PRs
957
  commit_metadata = results['commits']
958
  pr_metadata = results['prs']
 
959
  except Exception as e:
960
  print(f"Error during DuckDB fetch: {str(e)}")
961
  traceback.print_exc()
 
983
  save_leaderboard_data_to_hf(
984
  leaderboard_dict, commit_monthly_metrics, pr_monthly_metrics
985
  )
 
986
  except Exception as e:
987
  print(f"Error saving leaderboard: {str(e)}")
988
  traceback.print_exc()
989
+ finally:
990
+ # Clean up DuckDB cache file to save storage
991
+ if os.path.exists(DUCKDB_CACHE_FILE):
992
+ try:
993
+ os.remove(DUCKDB_CACHE_FILE)
994
+ print(f" ✓ Cache file removed: {DUCKDB_CACHE_FILE}")
995
+ except Exception as e:
996
+ print(f" ⚠ Failed to remove cache file: {str(e)}")
997
 
998
 
999
  # =============================================================================