refine
Browse files
app.py
CHANGED
|
@@ -465,7 +465,7 @@ def extract_issue_metadata(issue):
|
|
| 465 |
}
|
| 466 |
|
| 467 |
|
| 468 |
-
def fetch_all_issues_metadata(identifier, agent_name, token=None, start_from_date=None,
|
| 469 |
"""
|
| 470 |
Fetch issues associated with a GitHub user or bot for the past 6 months.
|
| 471 |
Returns lightweight metadata instead of full issue objects.
|
|
@@ -480,7 +480,6 @@ def fetch_all_issues_metadata(identifier, agent_name, token=None, start_from_dat
|
|
| 480 |
agent_name: Human-readable name of the agent for metadata purposes
|
| 481 |
token: GitHub API token for authentication
|
| 482 |
start_from_date: Only fetch issues created after this date (for incremental updates)
|
| 483 |
-
year: Year parameter (deprecated, retained for compatibility but not utilized)
|
| 484 |
exclude_dates: Set of date objects to exclude from mining (dates that have already been processed)
|
| 485 |
|
| 486 |
Returns:
|
|
@@ -625,7 +624,7 @@ def calculate_issue_stats_from_metadata(metadata_list):
|
|
| 625 |
def calculate_monthly_metrics_by_agent():
|
| 626 |
"""
|
| 627 |
Calculate monthly metrics for all agents for visualization.
|
| 628 |
-
Loads data directly from SWE-Arena/issue_metadata dataset
|
| 629 |
|
| 630 |
Returns:
|
| 631 |
dict: {
|
|
@@ -1485,10 +1484,10 @@ def update_all_agents_incremental():
|
|
| 1485 |
|
| 1486 |
# Load ALL metadata to calculate stats (aggregates entire last 6 months)
|
| 1487 |
print(f"📊 Calculating statistics from ALL stored metadata (last 6 months)...")
|
| 1488 |
-
|
| 1489 |
|
| 1490 |
# Filter for this specific agent
|
| 1491 |
-
agent_metadata = [issue for issue in
|
| 1492 |
|
| 1493 |
# Calculate stats from metadata
|
| 1494 |
stats = calculate_issue_stats_from_metadata(agent_metadata)
|
|
@@ -1526,7 +1525,7 @@ def construct_leaderboard_from_metadata():
|
|
| 1526 |
print("No agents found")
|
| 1527 |
return {}
|
| 1528 |
|
| 1529 |
-
# Load all issue metadata
|
| 1530 |
all_metadata = load_issue_metadata()
|
| 1531 |
|
| 1532 |
cache_dict = {}
|
|
|
|
| 465 |
}
|
| 466 |
|
| 467 |
|
| 468 |
+
def fetch_all_issues_metadata(identifier, agent_name, token=None, start_from_date=None, exclude_dates=None):
|
| 469 |
"""
|
| 470 |
Fetch issues associated with a GitHub user or bot for the past 6 months.
|
| 471 |
Returns lightweight metadata instead of full issue objects.
|
|
|
|
| 480 |
agent_name: Human-readable name of the agent for metadata purposes
|
| 481 |
token: GitHub API token for authentication
|
| 482 |
start_from_date: Only fetch issues created after this date (for incremental updates)
|
|
|
|
| 483 |
exclude_dates: Set of date objects to exclude from mining (dates that have already been processed)
|
| 484 |
|
| 485 |
Returns:
|
|
|
|
| 624 |
def calculate_monthly_metrics_by_agent():
|
| 625 |
"""
|
| 626 |
Calculate monthly metrics for all agents for visualization.
|
| 627 |
+
Loads data directly from SWE-Arena/issue_metadata dataset.
|
| 628 |
|
| 629 |
Returns:
|
| 630 |
dict: {
|
|
|
|
| 1484 |
|
| 1485 |
# Load ALL metadata to calculate stats (aggregates entire last 6 months)
|
| 1486 |
print(f"📊 Calculating statistics from ALL stored metadata (last 6 months)...")
|
| 1487 |
+
all_metadata = load_issue_metadata()
|
| 1488 |
|
| 1489 |
# Filter for this specific agent
|
| 1490 |
+
agent_metadata = [issue for issue in all_metadata if issue.get('agent_identifier') == identifier]
|
| 1491 |
|
| 1492 |
# Calculate stats from metadata
|
| 1493 |
stats = calculate_issue_stats_from_metadata(agent_metadata)
|
|
|
|
| 1525 |
print("No agents found")
|
| 1526 |
return {}
|
| 1527 |
|
| 1528 |
+
# Load all issue metadata
|
| 1529 |
all_metadata = load_issue_metadata()
|
| 1530 |
|
| 1531 |
cache_dict = {}
|