Spaces:
Running
Running
refine
Browse files
app.py
CHANGED
|
@@ -1266,13 +1266,6 @@ def load_review_metadata():
|
|
| 1266 |
|
| 1267 |
print(f"β Loaded {len(all_metadata)} total reviews from last {LEADERBOARD_TIME_FRAME_DAYS} days")
|
| 1268 |
|
| 1269 |
-
# DEBUG: Show unique agent identifiers found in review folders
|
| 1270 |
-
if agent_identifiers_found:
|
| 1271 |
-
print(f"π Agent identifiers found in review metadata folders:")
|
| 1272 |
-
for identifier in sorted(agent_identifiers_found):
|
| 1273 |
-
count = sum(1 for r in all_metadata if r.get('agent_identifier') == identifier)
|
| 1274 |
-
print(f" - '{identifier}': {count} reviews")
|
| 1275 |
-
|
| 1276 |
return all_metadata
|
| 1277 |
|
| 1278 |
except Exception as e:
|
|
@@ -1591,9 +1584,6 @@ def load_agents_from_hf():
|
|
| 1591 |
# Add or override github_identifier to match filename
|
| 1592 |
agent_data['github_identifier'] = filename_identifier
|
| 1593 |
|
| 1594 |
-
# DEBUG: Log the identifier being used
|
| 1595 |
-
print(f" β Loaded agent: '{filename_identifier}' -> {agent_data.get('name', 'Unknown')}")
|
| 1596 |
-
|
| 1597 |
agents.append(agent_data)
|
| 1598 |
|
| 1599 |
except Exception as e:
|
|
@@ -1763,13 +1753,6 @@ def construct_leaderboard_from_metadata():
|
|
| 1763 |
all_metadata = load_review_metadata()
|
| 1764 |
print(f"β Loaded {len(all_metadata)} review metadata entries")
|
| 1765 |
|
| 1766 |
-
# Debug: Check what agent_identifiers exist in review metadata
|
| 1767 |
-
if all_metadata:
|
| 1768 |
-
review_identifiers = set(r.get('agent_identifier') for r in all_metadata if r.get('agent_identifier'))
|
| 1769 |
-
print(f" Unique agent_identifiers in reviews: {review_identifiers}")
|
| 1770 |
-
else:
|
| 1771 |
-
print("β οΈ No review metadata loaded!")
|
| 1772 |
-
|
| 1773 |
cache_dict = {}
|
| 1774 |
|
| 1775 |
for agent in agents:
|
|
@@ -1779,10 +1762,6 @@ def construct_leaderboard_from_metadata():
|
|
| 1779 |
# Filter metadata for this agent
|
| 1780 |
agent_metadata = [review for review in all_metadata if review.get("agent_identifier") == identifier]
|
| 1781 |
|
| 1782 |
-
# Debug output
|
| 1783 |
-
if len(agent_metadata) > 0:
|
| 1784 |
-
print(f" β Agent '{identifier}' matched {len(agent_metadata)} reviews")
|
| 1785 |
-
|
| 1786 |
# Calculate stats
|
| 1787 |
stats = calculate_review_stats_from_metadata(agent_metadata)
|
| 1788 |
|
|
@@ -1938,10 +1917,6 @@ def get_leaderboard_dataframe():
|
|
| 1938 |
Construct leaderboard from review metadata and convert to pandas DataFrame for display.
|
| 1939 |
Returns formatted DataFrame sorted by retention rate.
|
| 1940 |
"""
|
| 1941 |
-
print("\n" + "="*60)
|
| 1942 |
-
print("π DEBUG: get_leaderboard_dataframe() called")
|
| 1943 |
-
print("="*60)
|
| 1944 |
-
|
| 1945 |
# Construct leaderboard from metadata
|
| 1946 |
cache_dict = construct_leaderboard_from_metadata()
|
| 1947 |
|
|
|
|
| 1266 |
|
| 1267 |
print(f"β Loaded {len(all_metadata)} total reviews from last {LEADERBOARD_TIME_FRAME_DAYS} days")
|
| 1268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1269 |
return all_metadata
|
| 1270 |
|
| 1271 |
except Exception as e:
|
|
|
|
| 1584 |
# Add or override github_identifier to match filename
|
| 1585 |
agent_data['github_identifier'] = filename_identifier
|
| 1586 |
|
|
|
|
|
|
|
|
|
|
| 1587 |
agents.append(agent_data)
|
| 1588 |
|
| 1589 |
except Exception as e:
|
|
|
|
| 1753 |
all_metadata = load_review_metadata()
|
| 1754 |
print(f"β Loaded {len(all_metadata)} review metadata entries")
|
| 1755 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1756 |
cache_dict = {}
|
| 1757 |
|
| 1758 |
for agent in agents:
|
|
|
|
| 1762 |
# Filter metadata for this agent
|
| 1763 |
agent_metadata = [review for review in all_metadata if review.get("agent_identifier") == identifier]
|
| 1764 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1765 |
# Calculate stats
|
| 1766 |
stats = calculate_review_stats_from_metadata(agent_metadata)
|
| 1767 |
|
|
|
|
| 1917 |
Construct leaderboard from review metadata and convert to pandas DataFrame for display.
|
| 1918 |
Returns formatted DataFrame sorted by retention rate.
|
| 1919 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1920 |
# Construct leaderboard from metadata
|
| 1921 |
cache_dict = construct_leaderboard_from_metadata()
|
| 1922 |
|