@@ -100,14 +100,15 @@ def main() -> None:
100100
101101 # Get strategy from first Runs
102102 strategy = runs_list [0 ].strategy
103+ strategy_key = strategy .key
103104
104105 # Write leaderboard
105106 leaderboard = analyzer .create_models_leaderboard (strategy , runs_list )
106- models_writer .write_models_leaderboard (leaderboard , version , strategy_name )
107+ models_writer .write_models_leaderboard (leaderboard , version , strategy_key )
107108
108109 # Write model runs and request files
109110 for runs in runs_list :
110- models_writer .write_runs (runs , version , strategy_name )
111+ models_writer .write_runs (runs , version , strategy_key )
111112
112113 # Write per-request files for each run
113114 for run in runs .runs :
@@ -122,7 +123,7 @@ def main() -> None:
122123 output_base = (
123124 models_output_dir
124125 / version
125- / strategy_name
126+ / strategy_key
126127 / runs .model .vendor
127128 / runs .model .name
128129 )
@@ -150,10 +151,20 @@ def main() -> None:
150151 leaderboard , version , model_key
151152 )
152153
153- # Write strategy runs
154+ # Write strategy runs and request files
154155 for runs in runs_list :
155156 strategies_writer .write_strategy_runs (runs , version , vendor , model_name )
156157
158+ # Write per-request files for each run
159+ strategy_key = runs .strategy .key
160+ for run in runs .runs :
161+ # Find run directory in input
162+ run_dir = input_dir / strategy_key / vendor / model_name / run .id
163+ if run_dir .exists ():
164+ strategies_writer .write_strategy_request_files (
165+ run_dir , version , vendor , model_name , strategy_key , run .id
166+ )
167+
157168 # Convert PNGs to WebP if enabled
158169 if args .webp :
159170 print ("\n Converting PNG screenshots to WebP format..." )
0 commit comments