Chunhua Liao commited on
Commit
384e19d
Β·
1 Parent(s): d7f13cc

Fix frontend: render all ranking* steps (Ranking1, Ranking2, etc.) with hypotheses and Elo scores

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -177,14 +177,8 @@ def format_cycle_results(cycle_details: Dict, log_file: str = None) -> str:
177
 
178
  # Process steps in order
179
  steps = cycle_details.get('steps', {})
180
- step_order = ['generation', 'reflection', 'ranking', 'evolution', 'reflection_evolved', 'ranking_final', 'proximity', 'meta_review']
181
-
182
- # Step details with expandable sections
183
- for step_name in step_order:
184
- if step_name not in steps:
185
- continue
186
-
187
- step_data = steps[step_name]
188
  step_title = {
189
  'generation': '🎯 Generation',
190
  'reflection': 'πŸ” Reflection',
@@ -229,7 +223,7 @@ def format_cycle_results(cycle_details: Dict, log_file: str = None) -> str:
229
  </div>
230
  """
231
 
232
- elif step_name in ['ranking', 'ranking_final']:
233
  hypotheses = step_data.get('hypotheses', [])
234
  if hypotheses:
235
  # Sort by Elo score
 
177
 
178
  # Process steps in order
179
  steps = cycle_details.get('steps', {})
180
+ # Display steps in the order they appear in the steps dict (preserves backend execution order)
181
+ for step_name, step_data in steps.items():
 
 
 
 
 
 
182
  step_title = {
183
  'generation': '🎯 Generation',
184
  'reflection': 'πŸ” Reflection',
 
223
  </div>
224
  """
225
 
226
+ elif step_name.startswith('ranking'):
227
  hypotheses = step_data.get('hypotheses', [])
228
  if hypotheses:
229
  # Sort by Elo score