lcipolina commited on
Commit
6268f97
·
verified ·
1 Parent(s): 8975c07

Fixed long names on Leaderboard

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -71,6 +71,9 @@ from game_reasoning_arena.backends import (
71
  initialize_llm_registry, LLM_REGISTRY,
72
  )
73
 
 
 
 
74
  # =============================================================================
75
  # GLOBAL CONFIGURATION
76
  # =============================================================================
@@ -273,15 +276,16 @@ def extract_illegal_moves_summary() -> pd.DataFrame:
273
  count = 0
274
  finally:
275
  conn.close()
276
- summary.append({"agent_name": model_name, "illegal_moves": count})
 
277
  return pd.DataFrame(summary)
278
 
279
 
280
-
281
  # =============================================================================
282
  # PLAYER CONFIGURATION & TYPE DEFINITIONS
283
  # =============================================================================
284
 
 
285
  class PlayerConfigData(TypedDict, total=False):
286
  """Type definition for player configuration data."""
287
  player_types: List[str]
@@ -587,7 +591,7 @@ def extract_leaderboard_stats(game_name: str) -> pd.DataFrame:
587
 
588
  # Build a single-row DataFrame for this agent
589
  row = {
590
- "agent_name": model_name,
591
  "agent_type": agent_type,
592
  "# game instances": games_played,
593
  "total rewards": total_rewards,
 
71
  initialize_llm_registry, LLM_REGISTRY,
72
  )
73
 
74
+ # UI utilities
75
+ from ui.utils import clean_model_name
76
+
77
  # =============================================================================
78
  # GLOBAL CONFIGURATION
79
  # =============================================================================
 
276
  count = 0
277
  finally:
278
  conn.close()
279
+ clean_name = clean_model_name(model_name)
280
+ summary.append({"agent_name": clean_name, "illegal_moves": count})
281
  return pd.DataFrame(summary)
282
 
283
 
 
284
  # =============================================================================
285
  # PLAYER CONFIGURATION & TYPE DEFINITIONS
286
  # =============================================================================
287
 
288
+
289
  class PlayerConfigData(TypedDict, total=False):
290
  """Type definition for player configuration data."""
291
  player_types: List[str]
 
591
 
592
  # Build a single-row DataFrame for this agent
593
  row = {
594
+ "agent_name": clean_model_name(model_name),
595
  "agent_type": agent_type,
596
  "# game instances": games_played,
597
  "total rewards": total_rewards,