'use strict'; const $=id=>document.getElementById(id); const esc=s=>String(s??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); const source=repo=>'https://huggingface.co/datasets/'+repo.split('/').map(encodeURIComponent).join('/'); let records=[],catalogue=[],collection='benchmark',page=0;const pageSize=25; const number=n=>new Intl.NumberFormat('en').format(n); const probability=p=>p==null?'—':`${p.toFixed(3)}`; function render(){ const q=$('search').value.toLowerCase().trim(),a=$('model-a').value,b=$('model-b').value,filter=$('filter').value; let result=(collection==='benchmark'?records:catalogue).filter(r=>JSON.stringify([r.task,r.tasks,r.source,r.repo,r.group,r.robot]).toLowerCase().includes(q)); if(collection==='benchmark')result=result.filter(r=>{ if($('suite').value!=='all'&&r.suite!==$('suite').value)return false; if(filter==='unclear')return r.label==='unclear'; if(filter==='wrong'){const p=r.predictions['RoboJev-27B'];return r.scored&&p!=null&&((p>=.5)!==(r.label==='success'));} if(filter==='disagree'){const x=r.predictions[a],y=r.predictions[b];return x!=null&&y!=null&&((x>=.5)!==(y>=.5));} return true; }); const pages=Math.max(1,Math.ceil(result.length/pageSize));page=Math.min(page,pages-1); $('count').textContent=number(result.length)+(collection==='benchmark'?' matching episodes':' matching datasets'); $('page').textContent=`Page ${page+1} of ${pages}`;$('previous').disabled=page===0;$('next').disabled=page===pages-1; if(!result.length){$('table').innerHTML='
No matches. Try a different search or filter.
';return;} const head=collection==='benchmark'?`Task / sourceHuman label${esc(a)}
P(success)${esc(b)}
P(success)`:'Dataset / tasksRobotEpisodes sampledVideo hours'; const body=result.slice(page*pageSize,(page+1)*pageSize).map(r=>collection==='benchmark'?`${esc(r.task)}${esc(r.suite)} · ${esc(r.group)} · episode ${esc(r.episode)}${esc(r.source)} ↗${esc(r.label)}${probability(r.predictions[a])}${probability(r.predictions[b])}`:`${esc(r.repo)} ↗${esc(r.tasks.join(' · '))}${esc(r.robot)}${number(r.episodes)}${(r.seconds/3600).toFixed(2)}`).join(''); $('table').innerHTML=`${head}${body}
`; } function switchTo(next){collection=next;page=0;for(const name of ['benchmark','catalogue']){$(name+'-tab').setAttribute('aria-pressed',String(name===next));$(name+'-intro').hidden=name!==next;}document.querySelectorAll('.bench-only').forEach(el=>el.hidden=next!=='benchmark');render();} $('benchmark-tab').onclick=()=>switchTo('benchmark');$('catalogue-tab').onclick=()=>switchTo('catalogue'); for(const id of ['search','suite','filter','model-a','model-b'])$(id).addEventListener(id==='search'?'input':'change',()=>{page=0;render();}); $('previous').onclick=()=>{page--;render();};$('next').onclick=()=>{page++;render();}; Promise.all(['benchmark.json','catalogue.json','summary.json'].map(async url=>{const r=await fetch(url);if(!r.ok)throw new Error('HTTP '+r.status);return r.json();})).then(([r,c,s])=>{ records=r;catalogue=c; for(const id of ['model-a','model-b'])for(const [name,metric]of Object.entries(s.metrics)){const o=document.createElement('option');o.value=name;o.textContent=`${name} · ${metric.protocol}`;$(id).append(o);} $('model-a').value='RoboJev-27B';$('model-b').value='GPT-6 Astra';render(); }).catch(()=>{$('count').textContent='Unable to load the data.';$('table').innerHTML='
Please reload the page, or use the download links above.
';});