Spaces:
Running
Running
Add linked trophies for THULab benchmark datasets
Browse files
README.md
CHANGED
|
@@ -45,6 +45,7 @@ Only measurements in the authoritative current project scope are exported. Missi
|
|
| 45 |
- Compression rate versus compression/decompression cost plots
|
| 46 |
- Dataset-level method details, snapshot provenance, and metric definitions
|
| 47 |
- Searchable 169-dataset catalog grouped into six source categories, with explicit measurement availability and source links
|
|
|
|
| 48 |
- Overall composite score and average dataset Rank, with 66 valid non-negative one-decimal weight combinations, including zero weights
|
| 49 |
- Searchable Methods documentation and a 30-family operator catalog with 102 implementation-directory entries, references, I/O contracts, examples, and status
|
| 50 |
|
|
|
|
| 45 |
- Compression rate versus compression/decompression cost plots
|
| 46 |
- Dataset-level method details, snapshot provenance, and metric definitions
|
| 47 |
- Searchable 169-dataset catalog grouped into six source categories, with explicit measurement availability and source links
|
| 48 |
+
- Gold 🏆 links for the 151 datasets hosted by THULab on Hugging Face; dataset-card links open the matching selection with `?scope=169&dataset=<key>#dataset`
|
| 49 |
- Overall composite score and average dataset Rank, with 66 valid non-negative one-decimal weight combinations, including zero weights
|
| 50 |
- Searchable Methods documentation and a 30-family operator catalog with 102 implementation-directory entries, references, I/O contracts, examples, and status
|
| 51 |
|
app.js
CHANGED
|
@@ -17,6 +17,9 @@ const timingLabel=mode=>({column_mean:'Equal-column arithmetic mean',dataset_mea
|
|
| 17 |
const fmt = (v, digits=3) => number(v) === null ? 'Not reported' : Number(v).toLocaleString('en-US',{maximumFractionDigits:digits,minimumFractionDigits:digits});
|
| 18 |
const countFmt = (v) => Number(v).toLocaleString('en-US');
|
| 19 |
const runtimeName = (v) => ({cpp:'C++',java:'Java',python:'Python'}[v] || v);
|
|
|
|
|
|
|
|
|
|
| 20 |
const cols = [
|
| 21 |
{key:'average_rank',label:'Average Rank ↓',digits:2,visible:true,overallOnly:true},
|
| 22 |
{key:'rank_coverage',label:'Rank coverage',digits:0,visible:false,overallOnly:true},
|
|
@@ -101,6 +104,9 @@ function refresh() {
|
|
| 101 |
const names={overall:'available numeric measurements',integer:'integer columns',float:'floating-point columns',fixed_float:'fixed-precision float columns',nonfixed_float:'non-fixed-precision float columns'};
|
| 102 |
$('selection-summary').textContent=`${runtimeName(s.runtime)} · ${names[scope]||scope} · ${ds} · ${currentRows.length} methods`;
|
| 103 |
$('view-title').textContent=activeTab==='dataset'?`${s.dataset==='all'?'Dataset':datasetDisplayName(s.dataset)} leaderboard`:activeTab==='tradeoffs'?'Storage and execution trade-offs':'Overall leaderboard';
|
|
|
|
|
|
|
|
|
|
| 104 |
renderTable();
|
| 105 |
if(activeTab==='tradeoffs')renderChart();
|
| 106 |
if(selectedMethod)showMethod(selectedMethod,false);
|
|
@@ -115,6 +121,7 @@ function setTab(tab) {
|
|
| 115 |
if(activeTab==='dataset'&&$('dataset').value==='all'){const first=[...datasets.keys()].find(k=>records.some(r=>r.dataset===k&&r.runtime===$('runtime').value));if(first)$('dataset').value=first;}
|
| 116 |
if(activeTab==='overall')$('dataset').value='all';
|
| 117 |
if(activeTab==='dataset')renderDatasetCatalog();
|
|
|
|
| 118 |
refresh();
|
| 119 |
}
|
| 120 |
function showMethod(method,focus=false) {
|
|
@@ -152,6 +159,14 @@ function csv() {
|
|
| 152 |
function safeHttpUrl(value) {
|
| 153 |
try { const url=new URL(String(value));return ['http:','https:'].includes(url.protocol)?url.href:null; } catch { return null; }
|
| 154 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
function publicNote(value) {
|
| 156 |
const note=typeof value==='string'?value.trim():'';
|
| 157 |
return /(?:\/Users\/|[A-Za-z]:\\|file:\/\/|codex:\/\/threads\/|\.pptx\b)/i.test(note)?'':note;
|
|
@@ -243,14 +258,16 @@ function datasetEntries() {
|
|
| 243 |
const unique=new Map();for(const entry of source){const key=datasetKey(entry);if(key)unique.set(key,entry);}return [...unique.values()];
|
| 244 |
}
|
| 245 |
function datasetCategory(entry) { return String(entry.category_label??entry.category??'Other'); }
|
| 246 |
-
function datasetSearchText(entry) { return [datasetKey(entry),entry.label,entry.category,entry.category_label,entry.source].join(' ').toLowerCase(); }
|
| 247 |
function humanBytes(value) { const amount=number(value);if(amount===null)return '';const units=['B','KB','MB','GB','TB'];let scaled=amount,index=0;while(scaled>=1000&&index<units.length-1){scaled/=1000;index++;}return `${scaled.toLocaleString('en-US',{maximumFractionDigits:index?1:0})} ${units[index]}`; }
|
| 248 |
function populateDatasetControls() {
|
| 249 |
if(!snapshot)return;
|
| 250 |
const entries=datasetEntries(),selected=$('dataset').value||'all',measured=new Set(records.map(record=>record.dataset)),groups=new Map();
|
| 251 |
for(const entry of entries){const group=datasetCategory(entry);if(!groups.has(group))groups.set(group,[]);groups.get(group).push(entry);datasets.set(datasetKey(entry),entry);}
|
| 252 |
-
$('dataset').innerHTML='<option value="all">All measured datasets</option>'+[...groups].map(([group,items])=>`<optgroup label="${escape(group)}">${items.sort((a,b)=>datasetKey(a).localeCompare(datasetKey(b))).map(entry=>{const key=datasetKey(entry),label=entry.label&&entry.label!==key?`${entry.label} (${key})`:key;return `<option value="${escape(key)}">${escape(label)}${measured.has(key)?'':' · No published measurements'}</option>`;}).join('')}</optgroup>`).join('');
|
| 253 |
-
|
|
|
|
|
|
|
| 254 |
const groupSelect=$('dataset-group-filter'),previousGroup=groupSelect.value||'all',categories=[...groups.keys()];
|
| 255 |
groupSelect.innerHTML='<option value="all">All groups</option>'+categories.map(group=>`<option value="${escape(group)}">${escape(group)} (${groups.get(group).length})</option>`).join('');
|
| 256 |
groupSelect.value=categories.includes(previousGroup)?previousGroup:'all';
|
|
@@ -260,19 +277,19 @@ function renderDatasetCatalog() {
|
|
| 260 |
const all=datasetEntries(),query=$('dataset-catalog-search').value.trim().toLowerCase(),group=$('dataset-group-filter').value,measured=new Set(records.map(record=>record.dataset));
|
| 261 |
const visible=all.filter(entry=>(group==='all'||datasetCategory(entry)===group)&&(!query||datasetSearchText(entry).includes(query))),groups=new Map();
|
| 262 |
for(const entry of visible){const category=datasetCategory(entry);if(!groups.has(category))groups.set(category,[]);groups.get(category).push(entry);}
|
| 263 |
-
const measuredVisible=visible.filter(entry=>measured.has(datasetKey(entry))).length;
|
| 264 |
-
status.textContent=`${visible.length} of ${all.length} datasets shown · ${measuredVisible} shown entries have published measurements · rankings use ${measured.size} measured datasets`;
|
| 265 |
if(datasetCatalogError&&!all.length){container.innerHTML=`<p class="documentation-error">${escape(datasetCatalogError.message)}</p>`;return;}
|
| 266 |
container.innerHTML=visible.length?[...groups].map(([category,entries])=>`<section class="dataset-category"><h3>${escape(category)} <span>${entries.length}</span></h3><div class="dataset-list">${entries.sort((a,b)=>datasetKey(a).localeCompare(datasetKey(b))).map(entry=>renderDatasetEntry(entry,measured.has(datasetKey(entry)))).join('')}</div></section>`).join(''):'<p class="documentation-empty">No dataset matches this search and group filter.</p>';
|
| 267 |
-
for(const button of container.querySelectorAll('[data-dataset-key]'))button.addEventListener('click',()=>{$('dataset').value=button.dataset.datasetKey;refresh();renderDatasetCatalog();$('leaderboard-wrap').scrollIntoView({block:'nearest'});});
|
| 268 |
}
|
| 269 |
function renderDatasetEntry(entry,isMeasured) {
|
| 270 |
-
const key=datasetKey(entry),label=publicText(entry.label,key),rows=number(entry.row_count),payload=humanBytes(entry.size_bytes),metadata=[rows===0?'Empty dataset':rows!==null?`${countFmt(rows)} rows`:'',number(entry.column_count)!==null?`${countFmt(entry.column_count)} columns`:'',number(entry.numeric_column_count)!==null?`${countFmt(entry.numeric_column_count)} numeric`:'',payload?`${payload} numeric payload`:'' ].filter(Boolean),sourceUrl=safeHttpUrl(entry.source_url),datasetUrl=safeHttpUrl(entry.dataset_url),source=publicText(entry.source,'Source'),snapshotDiff=entry.published_result_row_count_matches_catalog===false;
|
| 271 |
-
return `<article class="dataset-entry ${isMeasured?'measured':'pending'} ${state().dataset===key?'selected':''}"><button type="button" data-dataset-key="${escape(key)}"><span><strong>${escape(label)}</strong>${label!==key?`<small>${escape(key)}</small>`:''}</span><span class="dataset-state">${isMeasured?'Measured':'No published measurements'}</span></button>${metadata.length?`<p>${metadata.map(escape).join(' · ')}</p>`:''}${snapshotDiff?'<p class="dataset-snapshot-note">Published measurements use an earlier prepared snapshot.</p>':''}<div class="dataset-links">${sourceUrl?`<a href="${escape(sourceUrl)}" target="_blank" rel="noopener noreferrer">${escape(source)} ↗</a>`:entry.source?`<span class="dataset-source">${escape(source)}</span>`:''}${datasetUrl&&datasetUrl!==sourceUrl?`<a href="${escape(datasetUrl)}" target="_blank" rel="noopener noreferrer">Dataset files ↗</a>`:''}</div></article>`;
|
| 272 |
}
|
| 273 |
async function loadDatasetCatalog() {
|
| 274 |
try {
|
| 275 |
-
const response=await fetch('./dataset-catalog.json?v=20261009-
|
| 276 |
const catalog=await response.json();if(!catalog||!Array.isArray(catalog.datasets)||!catalog.summary)throw new Error('Dataset catalog has an invalid schema.');datasetCatalog=catalog;
|
| 277 |
} catch(error) { datasetCatalogError=error instanceof Error?error:new Error('Dataset catalog is unavailable.'); }
|
| 278 |
if(snapshot){populateDatasetControls();renderDatasetCatalog();renderAbout();}
|
|
@@ -303,13 +320,19 @@ function init() {
|
|
| 303 |
$('weights').innerHTML=WEIGHT_TENTHS.map(w=>`<option value="${w.join(',')}" ${w.join(',')==='4,3,3'?'selected':''}>a = ${(w[0]/10).toFixed(1)} · b = ${(w[1]/10).toFixed(1)} · c = ${(w[2]/10).toFixed(1)}</option>`).join('');
|
| 304 |
$('weights').addEventListener('change',refresh);
|
| 305 |
for(const input of $('column-options').querySelectorAll('input'))input.addEventListener('change',()=>{cols.find(c=>c.key===input.dataset.column).visible=input.checked;renderTable();});
|
| 306 |
-
for(const id of ['runtime','dtype','precision','
|
| 307 |
$('reset').addEventListener('click',()=>{$('runtime').value=runtimes.includes('cpp')?'cpp':runtimes[0];$('dtype').value='overall';$('precision').value='all';$('dataset').value='all';$('row-mode').value='family';$('search').value='';$('family').value='all';$('weights').value='4,3,3';$('complete-only').checked=false;selectedMethod=null;$('method-detail').hidden=true;sort={key:'compression_rate',direction:1};setTab(activeTab);});
|
| 308 |
-
for(const tab of document.querySelectorAll('[data-tab]'))tab.addEventListener('click',()=>
|
| 309 |
$('method-doc-search').addEventListener('input',renderMethodDocumentation);$('operator-doc-search').addEventListener('input',renderOperatorDocumentation);$('dataset-catalog-search').addEventListener('input',renderDatasetCatalog);$('dataset-group-filter').addEventListener('change',renderDatasetCatalog);
|
| 310 |
-
renderAbout();renderDocumentationViews();renderDatasetCatalog();setTab(location.hash.slice(1)||'overall');
|
| 311 |
document.documentElement.dataset.ready='true';
|
| 312 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
function setupTheme() {
|
| 314 |
let stored;try{stored=localStorage.getItem('thulab-theme');}catch{}
|
| 315 |
const query=new URLSearchParams(location.search).get('__theme');
|
|
@@ -320,5 +343,5 @@ function setupTheme() {
|
|
| 320 |
setupTheme();
|
| 321 |
void loadReferenceCatalog();
|
| 322 |
void loadDatasetCatalog();
|
| 323 |
-
try { const response=await fetch('./ui-data.json?v=20261009-dataset-
|
| 324 |
catch(e){$('load-error').hidden=false;$('load-error').textContent=`The result snapshot could not be loaded. Please reload the page or download the JSON from the repository. ${e.message}`;$('snapshot').textContent='Snapshot unavailable';$('leaderboard').querySelector('tbody').innerHTML='<tr><td class="empty-cell">Results unavailable.</td></tr>';}
|
|
|
|
| 17 |
const fmt = (v, digits=3) => number(v) === null ? 'Not reported' : Number(v).toLocaleString('en-US',{maximumFractionDigits:digits,minimumFractionDigits:digits});
|
| 18 |
const countFmt = (v) => Number(v).toLocaleString('en-US');
|
| 19 |
const runtimeName = (v) => ({cpp:'C++',java:'Java',python:'Python'}[v] || v);
|
| 20 |
+
const THULAB_DATASET_PREFIX='https://huggingface.co/datasets/THULab/';
|
| 21 |
+
const requestedDataset=new URLSearchParams(location.search).get('dataset')?.trim()||'';
|
| 22 |
+
let requestedDatasetApplied=false;
|
| 23 |
const cols = [
|
| 24 |
{key:'average_rank',label:'Average Rank ↓',digits:2,visible:true,overallOnly:true},
|
| 25 |
{key:'rank_coverage',label:'Rank coverage',digits:0,visible:false,overallOnly:true},
|
|
|
|
| 104 |
const names={overall:'available numeric measurements',integer:'integer columns',float:'floating-point columns',fixed_float:'fixed-precision float columns',nonfixed_float:'non-fixed-precision float columns'};
|
| 105 |
$('selection-summary').textContent=`${runtimeName(s.runtime)} · ${names[scope]||scope} · ${ds} · ${currentRows.length} methods`;
|
| 106 |
$('view-title').textContent=activeTab==='dataset'?`${s.dataset==='all'?'Dataset':datasetDisplayName(s.dataset)} leaderboard`:activeTab==='tradeoffs'?'Storage and execution trade-offs':'Overall leaderboard';
|
| 107 |
+
const selectedEntry=s.dataset==='all'?null:datasets.get(s.dataset),selectedDatasetUrl=thulabDatasetUrl(selectedEntry),selectedBadge=$('selected-dataset-badge');
|
| 108 |
+
selectedBadge.hidden=!selectedDatasetUrl;
|
| 109 |
+
if(selectedDatasetUrl){selectedBadge.href=selectedDatasetUrl;selectedBadge.setAttribute('aria-label',`Open ${datasetDisplayName(s.dataset)} in the THULab Hugging Face organization`);selectedBadge.title='Open this dataset in the THULab Hugging Face organization.';}
|
| 110 |
renderTable();
|
| 111 |
if(activeTab==='tradeoffs')renderChart();
|
| 112 |
if(selectedMethod)showMethod(selectedMethod,false);
|
|
|
|
| 121 |
if(activeTab==='dataset'&&$('dataset').value==='all'){const first=[...datasets.keys()].find(k=>records.some(r=>r.dataset===k&&r.runtime===$('runtime').value));if(first)$('dataset').value=first;}
|
| 122 |
if(activeTab==='overall')$('dataset').value='all';
|
| 123 |
if(activeTab==='dataset')renderDatasetCatalog();
|
| 124 |
+
updateUrlState();
|
| 125 |
refresh();
|
| 126 |
}
|
| 127 |
function showMethod(method,focus=false) {
|
|
|
|
| 159 |
function safeHttpUrl(value) {
|
| 160 |
try { const url=new URL(String(value));return ['http:','https:'].includes(url.protocol)?url.href:null; } catch { return null; }
|
| 161 |
}
|
| 162 |
+
function thulabDatasetUrl(entry) {
|
| 163 |
+
const url=safeHttpUrl(entry?.dataset_url);
|
| 164 |
+
return url?.startsWith(THULAB_DATASET_PREFIX)?url:null;
|
| 165 |
+
}
|
| 166 |
+
function thulabDatasetBadge(entry,key=datasetKey(entry)) {
|
| 167 |
+
const url=thulabDatasetUrl(entry);if(!url)return '';
|
| 168 |
+
return `<a class="thulab-dataset-badge" href="${escape(url)}" target="_blank" rel="noopener noreferrer" aria-label="Open ${escape(key)} in the THULab Hugging Face organization" title="Open this dataset in the THULab Hugging Face organization."><span aria-hidden="true">🏆</span> THULab hosted ↗</a>`;
|
| 169 |
+
}
|
| 170 |
function publicNote(value) {
|
| 171 |
const note=typeof value==='string'?value.trim():'';
|
| 172 |
return /(?:\/Users\/|[A-Za-z]:\\|file:\/\/|codex:\/\/threads\/|\.pptx\b)/i.test(note)?'':note;
|
|
|
|
| 258 |
const unique=new Map();for(const entry of source){const key=datasetKey(entry);if(key)unique.set(key,entry);}return [...unique.values()];
|
| 259 |
}
|
| 260 |
function datasetCategory(entry) { return String(entry.category_label??entry.category??'Other'); }
|
| 261 |
+
function datasetSearchText(entry) { return [datasetKey(entry),entry.label,entry.category,entry.category_label,entry.source,entry.dataset_url,thulabDatasetUrl(entry)?'THULab Hugging Face hosted':''].join(' ').toLowerCase(); }
|
| 262 |
function humanBytes(value) { const amount=number(value);if(amount===null)return '';const units=['B','KB','MB','GB','TB'];let scaled=amount,index=0;while(scaled>=1000&&index<units.length-1){scaled/=1000;index++;}return `${scaled.toLocaleString('en-US',{maximumFractionDigits:index?1:0})} ${units[index]}`; }
|
| 263 |
function populateDatasetControls() {
|
| 264 |
if(!snapshot)return;
|
| 265 |
const entries=datasetEntries(),selected=$('dataset').value||'all',measured=new Set(records.map(record=>record.dataset)),groups=new Map();
|
| 266 |
for(const entry of entries){const group=datasetCategory(entry);if(!groups.has(group))groups.set(group,[]);groups.get(group).push(entry);datasets.set(datasetKey(entry),entry);}
|
| 267 |
+
$('dataset').innerHTML='<option value="all">All measured datasets</option>'+[...groups].map(([group,items])=>`<optgroup label="${escape(group)}">${items.sort((a,b)=>datasetKey(a).localeCompare(datasetKey(b))).map(entry=>{const key=datasetKey(entry),label=entry.label&&entry.label!==key?`${entry.label} (${key})`:key;return `<option value="${escape(key)}">${thulabDatasetUrl(entry)?'🏆 ':''}${escape(label)}${measured.has(key)?'':' · No published measurements'}</option>`;}).join('')}</optgroup>`).join('');
|
| 268 |
+
const requestedIsValid=!requestedDatasetApplied&&requestedDataset&&[...$('dataset').options].some(option=>option.value===requestedDataset);
|
| 269 |
+
$('dataset').value=requestedIsValid?requestedDataset:[...$('dataset').options].some(option=>option.value===selected)?selected:'all';
|
| 270 |
+
if(requestedIsValid)requestedDatasetApplied=true;
|
| 271 |
const groupSelect=$('dataset-group-filter'),previousGroup=groupSelect.value||'all',categories=[...groups.keys()];
|
| 272 |
groupSelect.innerHTML='<option value="all">All groups</option>'+categories.map(group=>`<option value="${escape(group)}">${escape(group)} (${groups.get(group).length})</option>`).join('');
|
| 273 |
groupSelect.value=categories.includes(previousGroup)?previousGroup:'all';
|
|
|
|
| 277 |
const all=datasetEntries(),query=$('dataset-catalog-search').value.trim().toLowerCase(),group=$('dataset-group-filter').value,measured=new Set(records.map(record=>record.dataset));
|
| 278 |
const visible=all.filter(entry=>(group==='all'||datasetCategory(entry)===group)&&(!query||datasetSearchText(entry).includes(query))),groups=new Map();
|
| 279 |
for(const entry of visible){const category=datasetCategory(entry);if(!groups.has(category))groups.set(category,[]);groups.get(category).push(entry);}
|
| 280 |
+
const measuredVisible=visible.filter(entry=>measured.has(datasetKey(entry))).length,thulabVisible=visible.filter(entry=>thulabDatasetUrl(entry)).length;
|
| 281 |
+
status.textContent=`${visible.length} of ${all.length} datasets shown · ${thulabVisible} THULab-hosted · ${measuredVisible} shown entries have published measurements · rankings use ${measured.size} measured datasets`;
|
| 282 |
if(datasetCatalogError&&!all.length){container.innerHTML=`<p class="documentation-error">${escape(datasetCatalogError.message)}</p>`;return;}
|
| 283 |
container.innerHTML=visible.length?[...groups].map(([category,entries])=>`<section class="dataset-category"><h3>${escape(category)} <span>${entries.length}</span></h3><div class="dataset-list">${entries.sort((a,b)=>datasetKey(a).localeCompare(datasetKey(b))).map(entry=>renderDatasetEntry(entry,measured.has(datasetKey(entry)))).join('')}</div></section>`).join(''):'<p class="documentation-empty">No dataset matches this search and group filter.</p>';
|
| 284 |
+
for(const button of container.querySelectorAll('[data-dataset-key]'))button.addEventListener('click',()=>{$('dataset').value=button.dataset.datasetKey;updateUrlState();refresh();renderDatasetCatalog();$('leaderboard-wrap').scrollIntoView({block:'nearest'});});
|
| 285 |
}
|
| 286 |
function renderDatasetEntry(entry,isMeasured) {
|
| 287 |
+
const key=datasetKey(entry),label=publicText(entry.label,key),rows=number(entry.row_count),payload=humanBytes(entry.size_bytes),metadata=[rows===0?'Empty dataset':rows!==null?`${countFmt(rows)} rows`:'',number(entry.column_count)!==null?`${countFmt(entry.column_count)} columns`:'',number(entry.numeric_column_count)!==null?`${countFmt(entry.numeric_column_count)} numeric`:'',payload?`${payload} numeric payload`:'' ].filter(Boolean),sourceUrl=safeHttpUrl(entry.source_url),datasetUrl=safeHttpUrl(entry.dataset_url),thulabUrl=thulabDatasetUrl(entry),source=publicText(entry.source,'Source'),snapshotDiff=entry.published_result_row_count_matches_catalog===false;
|
| 288 |
+
return `<article class="dataset-entry ${isMeasured?'measured':'pending'} ${state().dataset===key?'selected':''}"><button type="button" data-dataset-key="${escape(key)}"><span><strong>${escape(label)}</strong>${label!==key?`<small>${escape(key)}</small>`:''}</span><span class="dataset-state">${isMeasured?'Measured':'No published measurements'}</span></button>${thulabUrl?`<div class="dataset-affiliations">${thulabDatasetBadge(entry,key)}</div>`:''}${metadata.length?`<p>${metadata.map(escape).join(' · ')}</p>`:''}${snapshotDiff?'<p class="dataset-snapshot-note">Published measurements use an earlier prepared snapshot.</p>':''}<div class="dataset-links">${sourceUrl?`<a href="${escape(sourceUrl)}" target="_blank" rel="noopener noreferrer">${escape(source)} ↗</a>`:entry.source?`<span class="dataset-source">${escape(source)}</span>`:''}${datasetUrl&&datasetUrl!==sourceUrl&&!thulabUrl?`<a href="${escape(datasetUrl)}" target="_blank" rel="noopener noreferrer">Dataset files ↗</a>`:''}</div></article>`;
|
| 289 |
}
|
| 290 |
async function loadDatasetCatalog() {
|
| 291 |
try {
|
| 292 |
+
const response=await fetch('./dataset-catalog.json?v=20261009-thulab-dataset-badge-v1',{cache:'no-cache'});if(!response.ok)throw new Error(`Dataset catalog request returned ${response.status}.`);
|
| 293 |
const catalog=await response.json();if(!catalog||!Array.isArray(catalog.datasets)||!catalog.summary)throw new Error('Dataset catalog has an invalid schema.');datasetCatalog=catalog;
|
| 294 |
} catch(error) { datasetCatalogError=error instanceof Error?error:new Error('Dataset catalog is unavailable.'); }
|
| 295 |
if(snapshot){populateDatasetControls();renderDatasetCatalog();renderAbout();}
|
|
|
|
| 320 |
$('weights').innerHTML=WEIGHT_TENTHS.map(w=>`<option value="${w.join(',')}" ${w.join(',')==='4,3,3'?'selected':''}>a = ${(w[0]/10).toFixed(1)} · b = ${(w[1]/10).toFixed(1)} · c = ${(w[2]/10).toFixed(1)}</option>`).join('');
|
| 321 |
$('weights').addEventListener('change',refresh);
|
| 322 |
for(const input of $('column-options').querySelectorAll('input'))input.addEventListener('change',()=>{cols.find(c=>c.key===input.dataset.column).visible=input.checked;renderTable();});
|
| 323 |
+
for(const id of ['runtime','dtype','precision','family','row-mode','complete-only'])$(id).addEventListener('change',refresh);$('dataset').addEventListener('change',()=>{updateUrlState();refresh();if(activeTab==='dataset')renderDatasetCatalog();});$('search').addEventListener('input',refresh);$('chart-metric').addEventListener('change',renderChart);$('download').addEventListener('click',csv);
|
| 324 |
$('reset').addEventListener('click',()=>{$('runtime').value=runtimes.includes('cpp')?'cpp':runtimes[0];$('dtype').value='overall';$('precision').value='all';$('dataset').value='all';$('row-mode').value='family';$('search').value='';$('family').value='all';$('weights').value='4,3,3';$('complete-only').checked=false;selectedMethod=null;$('method-detail').hidden=true;sort={key:'compression_rate',direction:1};setTab(activeTab);});
|
| 325 |
+
for(const tab of document.querySelectorAll('[data-tab]'))tab.addEventListener('click',()=>setTab(tab.dataset.tab));
|
| 326 |
$('method-doc-search').addEventListener('input',renderMethodDocumentation);$('operator-doc-search').addEventListener('input',renderOperatorDocumentation);$('dataset-catalog-search').addEventListener('input',renderDatasetCatalog);$('dataset-group-filter').addEventListener('change',renderDatasetCatalog);
|
| 327 |
+
renderAbout();renderDocumentationViews();renderDatasetCatalog();setTab(location.hash.slice(1)||(requestedDataset&&$('dataset').value===requestedDataset?'dataset':'overall'));
|
| 328 |
document.documentElement.dataset.ready='true';
|
| 329 |
}
|
| 330 |
+
function updateUrlState() {
|
| 331 |
+
const url=new URL(location.href);url.hash=activeTab;
|
| 332 |
+
const selected=$('dataset')?.value;
|
| 333 |
+
if(selected&&selected!=='all')url.searchParams.set('dataset',selected);else url.searchParams.delete('dataset');
|
| 334 |
+
history.replaceState(null,'',`${url.pathname}${url.search}${url.hash}`);
|
| 335 |
+
}
|
| 336 |
function setupTheme() {
|
| 337 |
let stored;try{stored=localStorage.getItem('thulab-theme');}catch{}
|
| 338 |
const query=new URLSearchParams(location.search).get('__theme');
|
|
|
|
| 343 |
setupTheme();
|
| 344 |
void loadReferenceCatalog();
|
| 345 |
void loadDatasetCatalog();
|
| 346 |
+
try { const response=await fetch('./ui-data.json?v=20261009-thulab-dataset-badge-v1',{cache:'no-cache'});if(!response.ok)throw new Error(`Snapshot request returned ${response.status}`);snapshot=await response.json();init(); }
|
| 347 |
catch(e){$('load-error').hidden=false;$('load-error').textContent=`The result snapshot could not be loaded. Please reload the page or download the JSON from the repository. ${e.message}`;$('snapshot').textContent='Snapshot unavailable';$('leaderboard').querySelector('tbody').innerHTML='<tr><td class="empty-cell">Results unavailable.</td></tr>';}
|
index.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
| 6 |
<meta name="description" content="THULab time-series compression benchmark: measured compression rates, compression and decompression costs, and dataset coverage.">
|
| 7 |
<meta name="color-scheme" content="light dark">
|
| 8 |
<title>THULab | Time Series Compression Benchmark</title>
|
| 9 |
-
<link rel="stylesheet" href="style.css?v=20261009-
|
| 10 |
-
<script src="app.js?v=20261009-dataset-
|
| 11 |
</head>
|
| 12 |
<body>
|
| 13 |
<a class="skip-link" href="#content">Skip to results</a>
|
|
@@ -40,10 +40,10 @@
|
|
| 40 |
<section id="results-view" aria-label="Compression results">
|
| 41 |
<section id="dataset-catalog-panel" class="dataset-catalog-panel" aria-labelledby="dataset-catalog-title" hidden>
|
| 42 |
<div class="dataset-catalog-head">
|
| 43 |
-
<div><h2 id="dataset-catalog-title">Dataset catalog</h2><p class="muted">Browse all cataloged datasets. Entries without published measurements remain visible but are excluded from rankings.</p></div>
|
| 44 |
<div class="dataset-catalog-controls">
|
| 45 |
<label>Dataset group<select id="dataset-group-filter"><option value="all">All groups</option></select></label>
|
| 46 |
-
<label>Search datasets<input id="dataset-catalog-search" type="search" placeholder="Name, category, or source" autocomplete="off"></label>
|
| 47 |
</div>
|
| 48 |
</div>
|
| 49 |
<p id="dataset-catalog-status" class="documentation-status" aria-live="polite">Loading dataset catalog…</p>
|
|
@@ -59,7 +59,7 @@
|
|
| 59 |
<label class="search-field">Find a method<input id="search" type="search" placeholder="e.g. REGER, Zstd, Gorilla" autocomplete="off"></label>
|
| 60 |
</div>
|
| 61 |
<div class="toolbar">
|
| 62 |
-
<div><h2 id="view-title">Overall leaderboard</h2><p id="selection-summary" class="muted" aria-live="polite">Reading published results…</p></div>
|
| 63 |
<div class="toolbar-actions"><button id="reset" class="quiet-button">Reset filters</button><button id="download" class="primary-button" disabled>Download CSV</button></div>
|
| 64 |
</div>
|
| 65 |
<div class="results-note" id="results-note">Compression rate = compressed bytes / original bytes. Lower rates and lower ns/point are better. Compression and decompression costs use equal-column arithmetic means where column timings are available. Methods with aggregate-only timings use equal-dataset arithmetic means for the selected range.</div>
|
|
|
|
| 6 |
<meta name="description" content="THULab time-series compression benchmark: measured compression rates, compression and decompression costs, and dataset coverage.">
|
| 7 |
<meta name="color-scheme" content="light dark">
|
| 8 |
<title>THULab | Time Series Compression Benchmark</title>
|
| 9 |
+
<link rel="stylesheet" href="style.css?v=20261009-thulab-dataset-badge-v1">
|
| 10 |
+
<script src="app.js?v=20261009-thulab-dataset-badge-v1" type="module"></script>
|
| 11 |
</head>
|
| 12 |
<body>
|
| 13 |
<a class="skip-link" href="#content">Skip to results</a>
|
|
|
|
| 40 |
<section id="results-view" aria-label="Compression results">
|
| 41 |
<section id="dataset-catalog-panel" class="dataset-catalog-panel" aria-labelledby="dataset-catalog-title" hidden>
|
| 42 |
<div class="dataset-catalog-head">
|
| 43 |
+
<div><h2 id="dataset-catalog-title">Dataset catalog</h2><p class="muted">Browse all cataloged datasets. Entries without published measurements remain visible but are excluded from rankings.</p><p class="dataset-badge-legend"><span class="thulab-dataset-badge" aria-hidden="true"><span>🏆</span> THULab hosted</span> links to datasets hosted by THULab on Hugging Face.</p></div>
|
| 44 |
<div class="dataset-catalog-controls">
|
| 45 |
<label>Dataset group<select id="dataset-group-filter"><option value="all">All groups</option></select></label>
|
| 46 |
+
<label>Search datasets<input id="dataset-catalog-search" type="search" placeholder="Name, THULab, category, or source" autocomplete="off"></label>
|
| 47 |
</div>
|
| 48 |
</div>
|
| 49 |
<p id="dataset-catalog-status" class="documentation-status" aria-live="polite">Loading dataset catalog…</p>
|
|
|
|
| 59 |
<label class="search-field">Find a method<input id="search" type="search" placeholder="e.g. REGER, Zstd, Gorilla" autocomplete="off"></label>
|
| 60 |
</div>
|
| 61 |
<div class="toolbar">
|
| 62 |
+
<div><div class="toolbar-title-row"><h2 id="view-title">Overall leaderboard</h2><a id="selected-dataset-badge" class="thulab-dataset-badge" href="#" target="_blank" rel="noopener noreferrer" hidden><span aria-hidden="true">🏆</span> THULab hosted ↗</a></div><p id="selection-summary" class="muted" aria-live="polite">Reading published results…</p></div>
|
| 63 |
<div class="toolbar-actions"><button id="reset" class="quiet-button">Reset filters</button><button id="download" class="primary-button" disabled>Download CSV</button></div>
|
| 64 |
</div>
|
| 65 |
<div class="results-note" id="results-note">Compression rate = compressed bytes / original bytes. Lower rates and lower ns/point are better. Compression and decompression costs use equal-column arithmetic means where column timings are available. Methods with aggregate-only timings use equal-dataset arithmetic means for the selected range.</div>
|
style.css
CHANGED
|
@@ -14,3 +14,4 @@
|
|
| 14 |
.dataset-catalog-panel{margin:18px 0 20px;padding:18px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.dataset-catalog-head{display:flex;align-items:end;justify-content:space-between;gap:24px}.dataset-catalog-head>div:first-child{min-width:0}.dataset-catalog-controls{display:grid;grid-template-columns:180px minmax(220px,320px);gap:10px;flex:0 0 auto}.dataset-catalog{max-height:430px;overflow:auto;padding-right:5px}.dataset-category{margin-top:18px}.dataset-category:first-child{margin-top:0}.dataset-category>h3{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:8px;margin:0;padding:8px 2px;background:var(--surface);border-bottom:1px solid var(--line);font-size:14px}.dataset-category>h3 span{padding:2px 6px;border-radius:999px;background:var(--soft);color:var(--muted);font-size:9px}.dataset-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:8px}.dataset-entry{min-width:0;padding:10px;border:1px solid var(--line);border-radius:6px;background:var(--bg)}.dataset-entry.measured{border-left:3px solid var(--accent)}.dataset-entry.selected{box-shadow:inset 0 0 0 1px var(--accent);background:var(--accent-soft)}.dataset-entry button{display:flex;align-items:start;justify-content:space-between;gap:8px;width:100%;padding:0;border:0;background:transparent;color:var(--text);text-align:left}.dataset-entry button:hover strong{color:var(--accent);text-decoration:underline}.dataset-entry strong{display:block;font-size:12px;line-height:1.35;overflow-wrap:anywhere}.dataset-entry small{display:block;margin-top:2px;color:var(--muted);font:9px "SFMono-Regular",Consolas,monospace;overflow-wrap:anywhere}.dataset-state{flex:0 0 auto;max-width:92px;padding:2px 5px;border-radius:4px;background:var(--soft);color:var(--muted);font-size:8px;line-height:1.35;text-align:right}.dataset-entry.measured .dataset-state{background:var(--accent-soft);color:var(--accent)}.dataset-entry p{margin:7px 0 0;color:var(--muted);font-size:9px;line-height:1.45}.dataset-entry .dataset-snapshot-note{color:#9a5a16}.dataset-links{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:6px}.dataset-links a,.dataset-source{font-size:9px;overflow-wrap:anywhere}
|
| 15 |
@media(max-width:1000px){.operator-summary{grid-template-columns:repeat(3,1fr)}.dataset-list{grid-template-columns:repeat(2,minmax(0,1fr))}.dataset-catalog-head{align-items:stretch;flex-direction:column;gap:12px}.dataset-catalog-controls{width:100%;grid-template-columns:1fr 1.5fr}}
|
| 16 |
@media(max-width:768px){.operator-summary{grid-template-columns:repeat(2,1fr)}.implementation-entry dl>div{grid-template-columns:1fr;gap:1px}.dataset-catalog-panel{padding:14px}.dataset-catalog-controls,.dataset-list{grid-template-columns:1fr}.dataset-catalog{max-height:520px}}
|
|
|
|
|
|
| 14 |
.dataset-catalog-panel{margin:18px 0 20px;padding:18px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.dataset-catalog-head{display:flex;align-items:end;justify-content:space-between;gap:24px}.dataset-catalog-head>div:first-child{min-width:0}.dataset-catalog-controls{display:grid;grid-template-columns:180px minmax(220px,320px);gap:10px;flex:0 0 auto}.dataset-catalog{max-height:430px;overflow:auto;padding-right:5px}.dataset-category{margin-top:18px}.dataset-category:first-child{margin-top:0}.dataset-category>h3{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:8px;margin:0;padding:8px 2px;background:var(--surface);border-bottom:1px solid var(--line);font-size:14px}.dataset-category>h3 span{padding:2px 6px;border-radius:999px;background:var(--soft);color:var(--muted);font-size:9px}.dataset-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:8px}.dataset-entry{min-width:0;padding:10px;border:1px solid var(--line);border-radius:6px;background:var(--bg)}.dataset-entry.measured{border-left:3px solid var(--accent)}.dataset-entry.selected{box-shadow:inset 0 0 0 1px var(--accent);background:var(--accent-soft)}.dataset-entry button{display:flex;align-items:start;justify-content:space-between;gap:8px;width:100%;padding:0;border:0;background:transparent;color:var(--text);text-align:left}.dataset-entry button:hover strong{color:var(--accent);text-decoration:underline}.dataset-entry strong{display:block;font-size:12px;line-height:1.35;overflow-wrap:anywhere}.dataset-entry small{display:block;margin-top:2px;color:var(--muted);font:9px "SFMono-Regular",Consolas,monospace;overflow-wrap:anywhere}.dataset-state{flex:0 0 auto;max-width:92px;padding:2px 5px;border-radius:4px;background:var(--soft);color:var(--muted);font-size:8px;line-height:1.35;text-align:right}.dataset-entry.measured .dataset-state{background:var(--accent-soft);color:var(--accent)}.dataset-entry p{margin:7px 0 0;color:var(--muted);font-size:9px;line-height:1.45}.dataset-entry .dataset-snapshot-note{color:#9a5a16}.dataset-links{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:6px}.dataset-links a,.dataset-source{font-size:9px;overflow-wrap:anywhere}
|
| 15 |
@media(max-width:1000px){.operator-summary{grid-template-columns:repeat(3,1fr)}.dataset-list{grid-template-columns:repeat(2,minmax(0,1fr))}.dataset-catalog-head{align-items:stretch;flex-direction:column;gap:12px}.dataset-catalog-controls{width:100%;grid-template-columns:1fr 1.5fr}}
|
| 16 |
@media(max-width:768px){.operator-summary{grid-template-columns:repeat(2,1fr)}.implementation-entry dl>div{grid-template-columns:1fr;gap:1px}.dataset-catalog-panel{padding:14px}.dataset-catalog-controls,.dataset-list{grid-template-columns:1fr}.dataset-catalog{max-height:520px}}
|
| 17 |
+
.dataset-badge-legend{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:8px 0 0;color:var(--muted);font-size:10px;line-height:1.45}.thulab-dataset-badge{display:inline-flex;align-items:center;gap:4px;width:max-content;padding:2px 7px;border:1px solid #d7a92880;border-radius:999px;background:#f4c84b24;color:#8a6410;font-size:9px;font-weight:700;line-height:1.4;white-space:nowrap}.thulab-dataset-badge:hover{border-color:#d7a928;background:#f4c84b38;color:#6f4f08;text-decoration:none}:root[data-theme=dark] .thulab-dataset-badge{border-color:#d9b84c80;background:#d9b84c1c;color:#efd46f}:root[data-theme=dark] .thulab-dataset-badge:hover{border-color:#efd46f;background:#d9b84c30;color:#ffe89b}.dataset-affiliations{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.toolbar-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.toolbar-title-row h2{margin:0}
|