zhimin-z commited on
Commit
605e063
·
1 Parent(s): 4feb8ae
Files changed (1) hide show
  1. msr.py +11 -5
msr.py CHANGED
@@ -51,8 +51,8 @@ PATCH_WANTED_LABELS = [
51
  GIT_SYNC_TIMEOUT = 300 # 5 minutes timeout for git pull
52
 
53
  # OPTIMIZED DUCKDB CONFIGURATION
54
- DUCKDB_THREADS = 8
55
- DUCKDB_MEMORY_LIMIT = "64GB"
56
 
57
  # Streaming batch configuration
58
  BATCH_SIZE_DAYS = 7 # Process 1 week at a time (~168 hourly files)
@@ -68,7 +68,7 @@ UPLOAD_DELAY_SECONDS = 5
68
  UPLOAD_MAX_BACKOFF = 3600
69
 
70
  # Scheduler configuration
71
- SCHEDULE_ENABLED = True
72
  SCHEDULE_DAY_OF_WEEK = 'fri' # Friday
73
  SCHEDULE_HOUR = 0
74
  SCHEDULE_MINUTE = 0
@@ -1294,7 +1294,6 @@ def mine_all_agents():
1294
  wanted_open = results['wanted_open']
1295
  wanted_resolved = results['wanted_resolved']
1296
  agent_discussions = results['agent_discussions']
1297
-
1298
  except Exception as e:
1299
  print(f"Error during DuckDB fetch: {str(e)}")
1300
  traceback.print_exc()
@@ -1315,10 +1314,17 @@ def mine_all_agents():
1315
  save_leaderboard_data_to_hf(
1316
  leaderboard_dict, issue_monthly_metrics, wanted_open, discussion_monthly_metrics
1317
  )
1318
-
1319
  except Exception as e:
1320
  print(f"Error saving leaderboard: {str(e)}")
1321
  traceback.print_exc()
 
 
 
 
 
 
 
 
1322
 
1323
 
1324
  # =============================================================================
 
51
  GIT_SYNC_TIMEOUT = 300 # 5 minutes timeout for git pull
52
 
53
  # OPTIMIZED DUCKDB CONFIGURATION
54
+ DUCKDB_THREADS = 16
55
+ DUCKDB_MEMORY_LIMIT = "128GB"
56
 
57
  # Streaming batch configuration
58
  BATCH_SIZE_DAYS = 7 # Process 1 week at a time (~168 hourly files)
 
68
  UPLOAD_MAX_BACKOFF = 3600
69
 
70
  # Scheduler configuration
71
+ SCHEDULE_ENABLED = False
72
  SCHEDULE_DAY_OF_WEEK = 'fri' # Friday
73
  SCHEDULE_HOUR = 0
74
  SCHEDULE_MINUTE = 0
 
1294
  wanted_open = results['wanted_open']
1295
  wanted_resolved = results['wanted_resolved']
1296
  agent_discussions = results['agent_discussions']
 
1297
  except Exception as e:
1298
  print(f"Error during DuckDB fetch: {str(e)}")
1299
  traceback.print_exc()
 
1314
  save_leaderboard_data_to_hf(
1315
  leaderboard_dict, issue_monthly_metrics, wanted_open, discussion_monthly_metrics
1316
  )
 
1317
  except Exception as e:
1318
  print(f"Error saving leaderboard: {str(e)}")
1319
  traceback.print_exc()
1320
+ finally:
1321
+ # Clean up DuckDB cache file to save storage
1322
+ if os.path.exists(DUCKDB_CACHE_FILE):
1323
+ try:
1324
+ os.remove(DUCKDB_CACHE_FILE)
1325
+ print(f" ✓ Cache file removed: {DUCKDB_CACHE_FILE}")
1326
+ except Exception as e:
1327
+ print(f" ⚠ Failed to remove cache file: {str(e)}")
1328
 
1329
 
1330
  # =============================================================================