@@ -70,7 +70,7 @@ <h1>Benchmark Results</h1>
7070let state = { dataset : null , category : "all" , metric : "mean_localization_error" , sort : "median" } ;
7171
7272// const file = new URLSearchParams(location.search).get("file") || "results/benchmark_results_muse-claude.json";
73- const file = new URLSearchParams ( location . search ) . get ( "file" ) || "results/benchmark_results-lowsnr .json" ;
73+ const file = new URLSearchParams ( location . search ) . get ( "file" ) || "results/benchmark_results.json" ;
7474// const file = new URLSearchParams(location.search).get("file") || "results/benchmark_results_music.json";
7575fetch ( file ) . then ( r => r . text ( ) ) . then ( t => JSON . parse ( t . replace ( / \b N a N \b / g, "null" ) ) ) . then ( init ) . catch ( e => {
7676 document . getElementById ( "summary" ) . textContent = "Error loading data: " + e . message ;
@@ -106,9 +106,20 @@ <h1>Benchmark Results</h1>
106106 } ) ;
107107
108108 // populate controls
109- const datasets = [ ...new Set ( DATA . results . map ( r => r . dataset_name ) ) ] . sort ( ) ;
109+ // Handle both new format (datasets as dict) and old format (extract from results)
110+ let datasets ;
111+ if ( DATA . datasets && typeof DATA . datasets === 'object' && ! Array . isArray ( DATA . datasets ) ) {
112+ datasets = Object . keys ( DATA . datasets ) . sort ( ) ;
113+ } else {
114+ datasets = [ ...new Set ( DATA . results . map ( r => r . dataset_name ) ) ] . sort ( ) ;
115+ }
110116 const dsSel = document . getElementById ( "dataset" ) ;
111- datasets . forEach ( ds => { const o = document . createElement ( "option" ) ; o . value = ds ; o . textContent = ds ; dsSel . appendChild ( o ) ; } ) ;
117+ datasets . forEach ( ds => {
118+ const o = document . createElement ( "option" ) ;
119+ o . value = ds ;
120+ o . textContent = DATA . datasets ?. [ ds ] ?. name || ds ;
121+ dsSel . appendChild ( o ) ;
122+ } ) ;
112123 state . dataset = datasets [ 0 ] ;
113124
114125 const catSel = document . getElementById ( "category" ) ;
@@ -146,7 +157,7 @@ <h1>Benchmark Results</h1>
146157 const isRankMetric = m === "dataset_rank" || m === "global_rank" ;
147158
148159 const perDatasetRanks = DATA . ranks || { } ;
149- const globalRanks = DATA . global_ranks || DATA . average_ranks || { } ;
160+ const globalRanks = DATA . global_ranks || { } ;
150161
151162 // Helper to get rank value for current dataset or global
152163 const getRankValue = ( r ) => {
0 commit comments