Spaces:
Running
Running
Add method and operator descriptions with presentation references
Browse files- README.md +2 -1
- app.js +72 -5
- index.html +21 -3
- reference-catalog.json +0 -0
- style.css +1 -0
README.md
CHANGED
|
@@ -24,7 +24,7 @@ python3 deploy/huggingface-compressionbenchmark/export_results.py
|
|
| 24 |
python3 deploy/huggingface-compressionbenchmark/build_ui_payload.py
|
| 25 |
```
|
| 26 |
|
| 27 |
-
Publish `README.md`, `index.html`, `style.css`, `app.js`, `ranking.js`, `data.json`, `ui-data.json`, `manifest.json`, `export_results.py`, and `build_ui_payload.py` to the static Space. The manifest records the exact source-file identities and metric boundaries. The compact browser payload retains the full snapshot's measurements and SHA-256 identity.
|
| 28 |
|
| 29 |
Only measurements in the authoritative current project scope are exported. Missing metrics and missing coverage are displayed explicitly. Existing results do not imply independently verified round trips or uniform hardware environments unless those checks are recorded in the source.
|
| 30 |
|
|
@@ -35,6 +35,7 @@ Only measurements in the authoritative current project scope are exported. Missi
|
|
| 35 |
- Compression rate versus encoding/decoding cost plots
|
| 36 |
- Dataset-level method details, snapshot provenance, and metric definitions
|
| 37 |
- Overall composite score and average dataset Rank, with 36 valid positive one-decimal weight combinations
|
|
|
|
| 38 |
|
| 39 |
The default family view selects the best measured compression-rate configuration independently for each dataset. Switch to **Exact configuration** to hold a configuration fixed. Runtime results stay separate.
|
| 40 |
|
|
|
|
| 24 |
python3 deploy/huggingface-compressionbenchmark/build_ui_payload.py
|
| 25 |
```
|
| 26 |
|
| 27 |
+
Publish `README.md`, `index.html`, `style.css`, `app.js`, `ranking.js`, `reference-catalog.json`, `data.json`, `ui-data.json`, `manifest.json`, `export_results.py`, and `build_ui_payload.py` to the static Space. The manifest records the exact source-file identities and metric boundaries. The compact browser payload retains the full snapshot's measurements and SHA-256 identity. The reference catalog is an independent documentation payload and does not affect leaderboard measurements.
|
| 28 |
|
| 29 |
Only measurements in the authoritative current project scope are exported. Missing metrics and missing coverage are displayed explicitly. Existing results do not imply independently verified round trips or uniform hardware environments unless those checks are recorded in the source.
|
| 30 |
|
|
|
|
| 35 |
- Compression rate versus encoding/decoding cost plots
|
| 36 |
- Dataset-level method details, snapshot provenance, and metric definitions
|
| 37 |
- Overall composite score and average dataset Rank, with 36 valid positive one-decimal weight combinations
|
| 38 |
+
- Searchable Methods and Operators documentation with presentation-note references and external source links
|
| 39 |
|
| 40 |
The default family view selects the best measured compression-rate configuration independently for each dataset. Switch to **Exact configuration** to hold a configuration fixed. Runtime results stay separate.
|
| 41 |
|
app.js
CHANGED
|
@@ -20,6 +20,7 @@ const cols = [
|
|
| 20 |
{key:'original_bytes',label:'Original bytes',digits:0,visible:false},
|
| 21 |
];
|
| 22 |
let snapshot, records=[], methods=new Map(), datasets=new Map(), currentRows=[], activeTab='overall';
|
|
|
|
| 23 |
let sort={key:'compression_rate',direction:1};
|
| 24 |
let selectedMethod=null;
|
| 25 |
const state = () => ({runtime:$('runtime').value,dataset:$('dataset').value,dtype:$('dtype').value,precision:$('precision').value,family:$('family').value,mode:$('row-mode').value,search:$('search').value.trim().toLowerCase(),complete:$('complete-only').checked});
|
|
@@ -91,9 +92,9 @@ function refresh() {
|
|
| 91 |
if(selectedMethod)showMethod(selectedMethod,false);
|
| 92 |
}
|
| 93 |
function setTab(tab) {
|
| 94 |
-
activeTab=['overall','dataset','tradeoffs','methods','about'].includes(tab)?tab:'overall';
|
| 95 |
for(const b of document.querySelectorAll('[data-tab]')){b.classList.toggle('active',b.dataset.tab===activeTab);if(b.dataset.tab===activeTab)b.setAttribute('aria-current','page');else b.removeAttribute('aria-current');}
|
| 96 |
-
$('results-view').hidden=['methods','about'].includes(activeTab);$('methods-view').hidden=activeTab!=='methods';$('about-view').hidden=activeTab!=='about';$('chart-view').hidden=activeTab!=='tradeoffs';
|
| 97 |
$('score-controls').hidden=activeTab!=='overall';
|
| 98 |
for(const input of $('column-options').querySelectorAll('input'))input.parentElement.hidden=Boolean(cols.find(c=>c.key===input.dataset.column)?.overallOnly&&activeTab!=='overall');
|
| 99 |
if(activeTab!=='overall'&&cols.find(c=>c.key===sort.key)?.overallOnly)sort={key:'compression_rate',direction:1};
|
|
@@ -133,6 +134,72 @@ function csv() {
|
|
| 133 |
const body=currentRows.map((r,i)=>[i+1,r.method,r.runtime,scopeKey(),state().mode,state().dataset,sort.key,sort.direction===1?'ascending':'descending',r.compression_rate,r.overall_rate,r.compression_time,r.decompression_time,...weights.map(w=>w.toFixed(1)),r.normalized_compression_time,r.normalized_decompression_time,r.composite_score,r.average_rank,r.rank_coverage,r.normalization_reference_rows,r.encode_min,r.encode_max,r.decode_min,r.decode_max,'min-max over all measured rows in selected runtime/scope/row-mode before search and visibility filters','mean per-dataset composite-score fractional rank; per-dataset min-max times',r.coverage,r.totalDatasets,JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.configuration])))].map(quote).join(','));
|
| 134 |
const url=URL.createObjectURL(new Blob(['\ufeff'+[columns.join(','),...body].join('\r\n')],{type:'text/csv;charset=utf-8'}));const a=document.createElement('a');a.href=url;a.download=`THULab-compression-${state().runtime}-${scopeKey()}-${state().dataset}.csv`;a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);
|
| 135 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
function renderAbout() {
|
| 137 |
const b=snapshot.benchmark||{},s=snapshot.source||{},c=snapshot.coverage||{};
|
| 138 |
const notes=[b.scope_note,b.aggregation_note,b.selection_note,...(b.notes||[]),...(b.measurement_boundaries||[])].filter(Boolean);
|
|
@@ -142,8 +209,6 @@ function renderAbout() {
|
|
| 142 |
const exclusions=c.exclusions||c.excluded_datasets||snapshot.exclusions||[];
|
| 143 |
const info={ 'Snapshot exported':snapshot.exported_at||s.exported_at||'Not reported','Dataset scope generated':s.generated_at||'Not reported', 'Source checkout':s.git_commit||'Not reported','Source files':`${s.source_files?.length??0} metadata inputs and ${s.result_csv_files_used?.length??0} result CSVs (hashes in manifest)`,'Result entries across scopes':`${records.length} (scope slices can reuse a measurement)`,'Worktree source state':s.worktree_dirty_inputs?.length?'Includes current local changes; input file hashes identify the published snapshot.':'See manifest for source file hashes.','Runtime environment':b.hardware||'Hardware details are not recorded in this exported result snapshot.','Lossless evidence':b.roundtrip_evidence||'Lossless-design method filter from the source project; per-run round-trip verification is not recorded here.'};
|
| 144 |
$('provenance').innerHTML=`<table class="provenance-table"><tbody>${Object.entries(info).map(([k,v])=>`<tr><th>${escape(k)}</th><td class="source-code">${escape(v)}</td></tr>`).join('')}</tbody></table>${exclusions.length?`<h3>Excluded or unavailable results</h3><p class="source-code">${escape(typeof exclusions==='string'?exclusions:JSON.stringify(exclusions))}</p>`:''}`;
|
| 145 |
-
const groups=new Map();for(const r of records){if(!groups.has(r.family))groups.set(r.family,[]);groups.get(r.family).push(r.configuration);}
|
| 146 |
-
$('method-catalog').innerHTML=`<div class="method-groups">${[...groups].sort((a,b)=>a[0].localeCompare(b[0])).map(([family,names])=>`<section class="method-group"><h3>${escape(family)}</h3><ul>${[...new Set(names)].sort().map(n=>`<li>${escape(n)}</li>`).join('')}</ul></section>`).join('')}</div>`;
|
| 147 |
}
|
| 148 |
function init() {
|
| 149 |
if(snapshot.compact_records){const t=snapshot.record_tables;snapshot.dataset_results=snapshot.compact_records.map(r=>({dataset:t.datasets[r[0]],scope:t.scopes[r[1]],runtime:t.runtimes[r[2]],family:t.families[r[3]],method:t.configurations[r[4]],algorithm_variant:t.configurations[r[4]],compression_rate:r[5],compression_time_ns_per_point:r[6],decompression_time_ns_per_point:r[7],original_size_bytes:r[8],compressed_size_bytes:r[9]}));delete snapshot.compact_records;}
|
|
@@ -164,7 +229,8 @@ function init() {
|
|
| 164 |
for(const id of ['runtime','dtype','precision','dataset','family','row-mode','complete-only'])$(id).addEventListener('change',refresh);$('search').addEventListener('input',refresh);$('chart-metric').addEventListener('change',renderChart);$('download').addEventListener('click',csv);
|
| 165 |
$('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);});
|
| 166 |
for(const tab of document.querySelectorAll('[data-tab]'))tab.addEventListener('click',()=>{history.replaceState(null,'',`#${tab.dataset.tab}`);setTab(tab.dataset.tab);});
|
| 167 |
-
|
|
|
|
| 168 |
document.documentElement.dataset.ready='true';
|
| 169 |
}
|
| 170 |
function setupTheme() {
|
|
@@ -175,5 +241,6 @@ function setupTheme() {
|
|
| 175 |
$('theme').addEventListener('click',()=>{const next=document.documentElement.dataset.theme==='dark'?'light':'dark';document.documentElement.dataset.theme=next;$('theme').textContent=next==='dark'?'Light mode':'Dark mode';try{localStorage.setItem('thulab-theme',next);}catch{}});
|
| 176 |
}
|
| 177 |
setupTheme();
|
|
|
|
| 178 |
try { const response=await fetch('./ui-data.json?v=20261008-rank-v1',{cache:'no-cache'});if(!response.ok)throw new Error(`Snapshot request returned ${response.status}`);snapshot=await response.json();init(); }
|
| 179 |
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>';}
|
|
|
|
| 20 |
{key:'original_bytes',label:'Original bytes',digits:0,visible:false},
|
| 21 |
];
|
| 22 |
let snapshot, records=[], methods=new Map(), datasets=new Map(), currentRows=[], activeTab='overall';
|
| 23 |
+
let referenceCatalog=null,referenceCatalogError=null;
|
| 24 |
let sort={key:'compression_rate',direction:1};
|
| 25 |
let selectedMethod=null;
|
| 26 |
const state = () => ({runtime:$('runtime').value,dataset:$('dataset').value,dtype:$('dtype').value,precision:$('precision').value,family:$('family').value,mode:$('row-mode').value,search:$('search').value.trim().toLowerCase(),complete:$('complete-only').checked});
|
|
|
|
| 92 |
if(selectedMethod)showMethod(selectedMethod,false);
|
| 93 |
}
|
| 94 |
function setTab(tab) {
|
| 95 |
+
activeTab=['overall','dataset','tradeoffs','methods','operators','about'].includes(tab)?tab:'overall';
|
| 96 |
for(const b of document.querySelectorAll('[data-tab]')){b.classList.toggle('active',b.dataset.tab===activeTab);if(b.dataset.tab===activeTab)b.setAttribute('aria-current','page');else b.removeAttribute('aria-current');}
|
| 97 |
+
$('results-view').hidden=['methods','operators','about'].includes(activeTab);$('methods-view').hidden=activeTab!=='methods';$('operators-view').hidden=activeTab!=='operators';$('about-view').hidden=activeTab!=='about';$('chart-view').hidden=activeTab!=='tradeoffs';
|
| 98 |
$('score-controls').hidden=activeTab!=='overall';
|
| 99 |
for(const input of $('column-options').querySelectorAll('input'))input.parentElement.hidden=Boolean(cols.find(c=>c.key===input.dataset.column)?.overallOnly&&activeTab!=='overall');
|
| 100 |
if(activeTab!=='overall'&&cols.find(c=>c.key===sort.key)?.overallOnly)sort={key:'compression_rate',direction:1};
|
|
|
|
| 134 |
const body=currentRows.map((r,i)=>[i+1,r.method,r.runtime,scopeKey(),state().mode,state().dataset,sort.key,sort.direction===1?'ascending':'descending',r.compression_rate,r.overall_rate,r.compression_time,r.decompression_time,...weights.map(w=>w.toFixed(1)),r.normalized_compression_time,r.normalized_decompression_time,r.composite_score,r.average_rank,r.rank_coverage,r.normalization_reference_rows,r.encode_min,r.encode_max,r.decode_min,r.decode_max,'min-max over all measured rows in selected runtime/scope/row-mode before search and visibility filters','mean per-dataset composite-score fractional rank; per-dataset min-max times',r.coverage,r.totalDatasets,JSON.stringify(Object.fromEntries(r.source.map(s=>[s.dataset,s.configuration])))].map(quote).join(','));
|
| 135 |
const url=URL.createObjectURL(new Blob(['\ufeff'+[columns.join(','),...body].join('\r\n')],{type:'text/csv;charset=utf-8'}));const a=document.createElement('a');a.href=url;a.download=`THULab-compression-${state().runtime}-${scopeKey()}-${state().dataset}.csv`;a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);
|
| 136 |
}
|
| 137 |
+
function safeHttpUrl(value) {
|
| 138 |
+
try { const url=new URL(String(value));return ['http:','https:'].includes(url.protocol)?url.href:null; } catch { return null; }
|
| 139 |
+
}
|
| 140 |
+
function publicNote(value) {
|
| 141 |
+
const note=typeof value==='string'?value.trim():'';
|
| 142 |
+
return /(?:\/Users\/|[A-Za-z]:\\|file:\/\/|\.pptx\b)/i.test(note)?'':note;
|
| 143 |
+
}
|
| 144 |
+
function referenceMap() {
|
| 145 |
+
return new Map((referenceCatalog?.references||[]).map(reference=>[String(reference.id),reference]));
|
| 146 |
+
}
|
| 147 |
+
function resolvedReferences(ids) {
|
| 148 |
+
const byId=referenceMap();
|
| 149 |
+
return [...new Set(Array.isArray(ids)?ids.map(String):[])].map(id=>byId.get(id)).filter(Boolean);
|
| 150 |
+
}
|
| 151 |
+
function referenceSearchText(ids) {
|
| 152 |
+
return resolvedReferences(ids).map(reference=>`${reference.id??''} ${reference.citation??''} ${reference.kind??''}`).join(' ');
|
| 153 |
+
}
|
| 154 |
+
function renderReferences(ids) {
|
| 155 |
+
const references=resolvedReferences(ids);
|
| 156 |
+
if(!references.length)return '<p class="reference-empty">No external reference is listed for this entry.</p>';
|
| 157 |
+
return `<div class="documentation-references"><strong>References</strong><ul>${references.map(reference=>{const url=safeHttpUrl(reference.url),citation=escape(reference.citation||reference.id||'Reference');const meta=[reference.id,reference.source_slide?`Presentation Notes · slide ${reference.source_slide}`:'Additional official source'].filter(Boolean).map(escape).join(' · ');return `<li>${url?`<a href="${escape(url)}" target="_blank" rel="noopener noreferrer">${citation}</a>`:`<span>${citation}</span>`}${meta?`<small>${meta}</small>`:''}</li>`;}).join('')}</ul></div>`;
|
| 158 |
+
}
|
| 159 |
+
function familyConfigurations() {
|
| 160 |
+
const grouped=new Map();
|
| 161 |
+
for(const record of records){if(!grouped.has(record.family))grouped.set(record.family,new Set());grouped.get(record.family).add(record.configuration);}
|
| 162 |
+
return new Map([...grouped].map(([family,names])=>[family,[...names].sort((a,b)=>a.localeCompare(b))]));
|
| 163 |
+
}
|
| 164 |
+
function catalogMethod(family) {
|
| 165 |
+
const entries=referenceCatalog?.methods||[];
|
| 166 |
+
return entries.find(entry=>entry.family===family)||entries.find(entry=>String(entry.family).toLowerCase()===family.toLowerCase())||null;
|
| 167 |
+
}
|
| 168 |
+
function renderMethodDocumentation() {
|
| 169 |
+
const container=$('method-catalog'),status=$('method-doc-status');
|
| 170 |
+
if(!container||!status)return;
|
| 171 |
+
if(referenceCatalogError){status.textContent='Method documentation could not be loaded.';container.innerHTML=`<p class="documentation-error">${escape(referenceCatalogError.message)}</p>`;return;}
|
| 172 |
+
if(!referenceCatalog){status.textContent='Loading method documentation…';container.innerHTML='';return;}
|
| 173 |
+
const configurations=familyConfigurations(),query=$('method-doc-search').value.trim().toLowerCase();
|
| 174 |
+
const families=[...configurations.keys()].sort((a,b)=>a.localeCompare(b));
|
| 175 |
+
const rows=families.map(family=>{const entry=catalogMethod(family)||{},names=configurations.get(family),note=publicNote(entry.notes),search=[family,entry.display_name,entry.description,note,...names,referenceSearchText(entry.reference_ids)].join(' ').toLowerCase();return {family,entry,names,note,search};}).filter(row=>!query||row.search.includes(query));
|
| 176 |
+
const described=families.filter(family=>catalogMethod(family)?.description).length;
|
| 177 |
+
status.textContent=`${rows.length} of ${families.length} measured method families shown · ${described} descriptions available`;
|
| 178 |
+
container.innerHTML=rows.length?rows.map(({family,entry,names,note})=>{const display=entry.display_name||family;return `<article class="documentation-card"><div class="documentation-card-head"><div><h3>${escape(display)}</h3>${display!==family?`<span class="documentation-code">${escape(family)}</span>`:''}</div><span class="documentation-count">${names.length} configuration${names.length===1?'':'s'}</span></div><p class="documentation-description">${escape(entry.description||'A reference description is not available for this measured family.')}</p>${note?`<p class="documentation-note">${escape(note)}</p>`:''}${renderReferences(entry.reference_ids)}<details class="configuration-details"><summary>Published configurations (${names.length})</summary><ul>${names.map(name=>`<li>${escape(name)}</li>`).join('')}</ul></details></article>`;}).join(''):'<p class="documentation-empty">No method documentation matches this search.</p>';
|
| 179 |
+
}
|
| 180 |
+
function renderOperatorDocumentation() {
|
| 181 |
+
const container=$('operator-catalog'),status=$('operator-doc-status');
|
| 182 |
+
if(!container||!status)return;
|
| 183 |
+
if(referenceCatalogError){status.textContent='Operator documentation could not be loaded.';container.innerHTML=`<p class="documentation-error">${escape(referenceCatalogError.message)}</p>`;return;}
|
| 184 |
+
if(!referenceCatalog){status.textContent='Loading operator documentation…';container.innerHTML='';return;}
|
| 185 |
+
const query=$('operator-doc-search').value.trim().toLowerCase(),all=referenceCatalog.operators||[];
|
| 186 |
+
const visible=all.filter(operator=>!query||[operator.id,operator.name,operator.group,operator.description,referenceSearchText(operator.reference_ids)].join(' ').toLowerCase().includes(query));
|
| 187 |
+
const groups=new Map();
|
| 188 |
+
for(const operator of visible){const group=operator.group||'Other';if(!groups.has(group))groups.set(group,[]);groups.get(group).push(operator);}
|
| 189 |
+
status.textContent=`${visible.length} of ${all.length} operators shown`;
|
| 190 |
+
container.innerHTML=visible.length?[...groups].sort((a,b)=>a[0].localeCompare(b[0])).map(([group,operators])=>`<section class="operator-group"><h3>${escape(group)}</h3><div class="documentation-grid">${operators.sort((a,b)=>String(a.name).localeCompare(String(b.name))).map(operator=>`<article class="documentation-card operator-card"><div class="documentation-card-head"><div><h4>${escape(operator.name||operator.id)}</h4>${operator.id&&operator.id!==operator.name?`<span class="documentation-code">${escape(operator.id)}</span>`:''}</div></div><p class="documentation-description">${escape(operator.description||'Description not available.')}</p>${renderReferences(operator.reference_ids)}</article>`).join('')}</div></section>`).join(''):'<p class="documentation-empty">No operator documentation matches this search.</p>';
|
| 191 |
+
}
|
| 192 |
+
function renderDocumentationViews() { renderMethodDocumentation();renderOperatorDocumentation(); }
|
| 193 |
+
async function loadReferenceCatalog() {
|
| 194 |
+
try {
|
| 195 |
+
const response=await fetch('./reference-catalog.json?v=20261008-docs-v1',{cache:'no-cache'});
|
| 196 |
+
if(!response.ok)throw new Error(`Reference catalog request returned ${response.status}.`);
|
| 197 |
+
const catalog=await response.json();
|
| 198 |
+
if(!catalog||!Array.isArray(catalog.methods)||!Array.isArray(catalog.operators)||!Array.isArray(catalog.references))throw new Error('Reference catalog has an invalid schema.');
|
| 199 |
+
referenceCatalog=catalog;
|
| 200 |
+
} catch(error) { referenceCatalogError=error instanceof Error?error:new Error('Reference catalog is unavailable.'); }
|
| 201 |
+
if(snapshot)renderDocumentationViews();
|
| 202 |
+
}
|
| 203 |
function renderAbout() {
|
| 204 |
const b=snapshot.benchmark||{},s=snapshot.source||{},c=snapshot.coverage||{};
|
| 205 |
const notes=[b.scope_note,b.aggregation_note,b.selection_note,...(b.notes||[]),...(b.measurement_boundaries||[])].filter(Boolean);
|
|
|
|
| 209 |
const exclusions=c.exclusions||c.excluded_datasets||snapshot.exclusions||[];
|
| 210 |
const info={ 'Snapshot exported':snapshot.exported_at||s.exported_at||'Not reported','Dataset scope generated':s.generated_at||'Not reported', 'Source checkout':s.git_commit||'Not reported','Source files':`${s.source_files?.length??0} metadata inputs and ${s.result_csv_files_used?.length??0} result CSVs (hashes in manifest)`,'Result entries across scopes':`${records.length} (scope slices can reuse a measurement)`,'Worktree source state':s.worktree_dirty_inputs?.length?'Includes current local changes; input file hashes identify the published snapshot.':'See manifest for source file hashes.','Runtime environment':b.hardware||'Hardware details are not recorded in this exported result snapshot.','Lossless evidence':b.roundtrip_evidence||'Lossless-design method filter from the source project; per-run round-trip verification is not recorded here.'};
|
| 211 |
$('provenance').innerHTML=`<table class="provenance-table"><tbody>${Object.entries(info).map(([k,v])=>`<tr><th>${escape(k)}</th><td class="source-code">${escape(v)}</td></tr>`).join('')}</tbody></table>${exclusions.length?`<h3>Excluded or unavailable results</h3><p class="source-code">${escape(typeof exclusions==='string'?exclusions:JSON.stringify(exclusions))}</p>`:''}`;
|
|
|
|
|
|
|
| 212 |
}
|
| 213 |
function init() {
|
| 214 |
if(snapshot.compact_records){const t=snapshot.record_tables;snapshot.dataset_results=snapshot.compact_records.map(r=>({dataset:t.datasets[r[0]],scope:t.scopes[r[1]],runtime:t.runtimes[r[2]],family:t.families[r[3]],method:t.configurations[r[4]],algorithm_variant:t.configurations[r[4]],compression_rate:r[5],compression_time_ns_per_point:r[6],decompression_time_ns_per_point:r[7],original_size_bytes:r[8],compressed_size_bytes:r[9]}));delete snapshot.compact_records;}
|
|
|
|
| 229 |
for(const id of ['runtime','dtype','precision','dataset','family','row-mode','complete-only'])$(id).addEventListener('change',refresh);$('search').addEventListener('input',refresh);$('chart-metric').addEventListener('change',renderChart);$('download').addEventListener('click',csv);
|
| 230 |
$('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);});
|
| 231 |
for(const tab of document.querySelectorAll('[data-tab]'))tab.addEventListener('click',()=>{history.replaceState(null,'',`#${tab.dataset.tab}`);setTab(tab.dataset.tab);});
|
| 232 |
+
$('method-doc-search').addEventListener('input',renderMethodDocumentation);$('operator-doc-search').addEventListener('input',renderOperatorDocumentation);
|
| 233 |
+
renderAbout();renderDocumentationViews();setTab(location.hash.slice(1)||'overall');
|
| 234 |
document.documentElement.dataset.ready='true';
|
| 235 |
}
|
| 236 |
function setupTheme() {
|
|
|
|
| 241 |
$('theme').addEventListener('click',()=>{const next=document.documentElement.dataset.theme==='dark'?'light':'dark';document.documentElement.dataset.theme=next;$('theme').textContent=next==='dark'?'Light mode':'Dark mode';try{localStorage.setItem('thulab-theme',next);}catch{}});
|
| 242 |
}
|
| 243 |
setupTheme();
|
| 244 |
+
void loadReferenceCatalog();
|
| 245 |
try { const response=await fetch('./ui-data.json?v=20261008-rank-v1',{cache:'no-cache'});if(!response.ok)throw new Error(`Snapshot request returned ${response.status}`);snapshot=await response.json();init(); }
|
| 246 |
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, encoding and decoding 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=20261008-
|
| 10 |
-
<script src="app.js?v=20261008-
|
| 11 |
</head>
|
| 12 |
<body>
|
| 13 |
<a class="skip-link" href="#content">Skip to results</a>
|
|
@@ -33,6 +33,7 @@
|
|
| 33 |
<button id="tab-dataset" class="tab" data-tab="dataset">By dataset</button>
|
| 34 |
<button id="tab-tradeoffs" class="tab" data-tab="tradeoffs">Trade-offs</button>
|
| 35 |
<button id="tab-methods" class="tab" data-tab="methods">Methods</button>
|
|
|
|
| 36 |
<button id="tab-about" class="tab" data-tab="about">About</button>
|
| 37 |
</nav>
|
| 38 |
<div id="load-error" class="error-message" role="alert" hidden></div>
|
|
@@ -70,7 +71,24 @@
|
|
| 70 |
<div class="table-footer"><span id="row-count" aria-live="polite"></span><span>Select a method to inspect dataset-level results.</span></div>
|
| 71 |
<section id="method-detail" class="method-detail" hidden tabindex="-1" aria-labelledby="detail-title"></section>
|
| 72 |
</section>
|
| 73 |
-
<section id="methods-view" class="text-view" hidden>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
<section id="about-view" class="text-view" hidden>
|
| 75 |
<h2>About this benchmark</h2>
|
| 76 |
<p>This Space publishes a snapshot of the existing <a href="https://github.com/xjz17/web_compression" target="_blank" rel="noopener">web_compression</a> project results. The layout follows the grouped leaderboard approach of <a href="https://huggingface.co/spaces/Salesforce/GIFT-Eval" target="_blank" rel="noopener">GIFT-Eval</a>.</p>
|
|
|
|
| 6 |
<meta name="description" content="THULab time-series compression benchmark: measured compression rates, encoding and decoding 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=20261008-docs-v1">
|
| 10 |
+
<script src="app.js?v=20261008-docs-v1" type="module"></script>
|
| 11 |
</head>
|
| 12 |
<body>
|
| 13 |
<a class="skip-link" href="#content">Skip to results</a>
|
|
|
|
| 33 |
<button id="tab-dataset" class="tab" data-tab="dataset">By dataset</button>
|
| 34 |
<button id="tab-tradeoffs" class="tab" data-tab="tradeoffs">Trade-offs</button>
|
| 35 |
<button id="tab-methods" class="tab" data-tab="methods">Methods</button>
|
| 36 |
+
<button id="tab-operators" class="tab" data-tab="operators">Operators</button>
|
| 37 |
<button id="tab-about" class="tab" data-tab="about">About</button>
|
| 38 |
</nav>
|
| 39 |
<div id="load-error" class="error-message" role="alert" hidden></div>
|
|
|
|
| 71 |
<div class="table-footer"><span id="row-count" aria-live="polite"></span><span>Select a method to inspect dataset-level results.</span></div>
|
| 72 |
<section id="method-detail" class="method-detail" hidden tabindex="-1" aria-labelledby="detail-title"></section>
|
| 73 |
</section>
|
| 74 |
+
<section id="methods-view" class="text-view documentation-view" hidden>
|
| 75 |
+
<div class="documentation-head">
|
| 76 |
+
<div><h2>Methods</h2><p class="muted">Descriptions and references for the method families measured in this benchmark. Expand a family to inspect its published configurations.</p></div>
|
| 77 |
+
<label class="documentation-search">Search methods<input id="method-doc-search" type="search" placeholder="Family, description, configuration, or reference" autocomplete="off"></label>
|
| 78 |
+
</div>
|
| 79 |
+
<p class="reference-source">References follow the presentation Notes (slides 2–3), with official sources for additional variants. External links open in a new tab.</p>
|
| 80 |
+
<p id="method-doc-status" class="documentation-status" aria-live="polite">Loading method documentation…</p>
|
| 81 |
+
<div id="method-catalog" class="documentation-grid"></div>
|
| 82 |
+
</section>
|
| 83 |
+
<section id="operators-view" class="text-view documentation-view" hidden>
|
| 84 |
+
<div class="documentation-head">
|
| 85 |
+
<div><h2>Operators</h2><p class="muted">Reusable transforms and coding primitives that appear across time-series compression methods.</p></div>
|
| 86 |
+
<label class="documentation-search">Search operators<input id="operator-doc-search" type="search" placeholder="Name, group, description, or reference" autocomplete="off"></label>
|
| 87 |
+
</div>
|
| 88 |
+
<p class="reference-source">References from the presentation Notes (slides 2–3). External links open in a new tab.</p>
|
| 89 |
+
<p id="operator-doc-status" class="documentation-status" aria-live="polite">Loading operator documentation…</p>
|
| 90 |
+
<div id="operator-catalog" class="operator-groups"></div>
|
| 91 |
+
</section>
|
| 92 |
<section id="about-view" class="text-view" hidden>
|
| 93 |
<h2>About this benchmark</h2>
|
| 94 |
<p>This Space publishes a snapshot of the existing <a href="https://github.com/xjz17/web_compression" target="_blank" rel="noopener">web_compression</a> project results. The layout follows the grouped leaderboard approach of <a href="https://huggingface.co/spaces/Salesforce/GIFT-Eval" target="_blank" rel="noopener">GIFT-Eval</a>.</p>
|
reference-catalog.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
style.css
CHANGED
|
@@ -9,3 +9,4 @@
|
|
| 9 |
.intro{padding:16px 0 10px}.eyebrow{display:none}h1{font-size:clamp(24px,2.8vw,30px);margin-bottom:8px}.intro-text{font-size:13px}.snapshot{font-size:11px;margin-top:6px}.summary-strip{padding:10px 0}.summary-strip strong{font-size:20px}.filters{padding:12px;gap:8px}.toolbar{margin-top:12px;margin-bottom:4px}
|
| 10 |
.score-controls{display:flex;align-items:start;gap:20px;padding:12px 14px;margin:6px 0 12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--soft)}.score-controls label{min-width:320px}.score-controls p{font-size:11px;line-height:1.7;margin:0;max-width:90ch}.score-controls select{height:35px}@media(max-width:768px){.score-controls{flex-direction:column;gap:10px}.score-controls label{min-width:0;width:100%}}
|
| 11 |
.audit-badge{display:block;color:var(--muted);font-size:10px;margin-top:4px}.audit-notice{font-size:12px;padding:10px 14px;margin:8px 0;border-left:3px solid var(--accent);background:var(--accent-soft);color:var(--text)}
|
|
|
|
|
|
| 9 |
.intro{padding:16px 0 10px}.eyebrow{display:none}h1{font-size:clamp(24px,2.8vw,30px);margin-bottom:8px}.intro-text{font-size:13px}.snapshot{font-size:11px;margin-top:6px}.summary-strip{padding:10px 0}.summary-strip strong{font-size:20px}.filters{padding:12px;gap:8px}.toolbar{margin-top:12px;margin-bottom:4px}
|
| 10 |
.score-controls{display:flex;align-items:start;gap:20px;padding:12px 14px;margin:6px 0 12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--soft)}.score-controls label{min-width:320px}.score-controls p{font-size:11px;line-height:1.7;margin:0;max-width:90ch}.score-controls select{height:35px}@media(max-width:768px){.score-controls{flex-direction:column;gap:10px}.score-controls label{min-width:0;width:100%}}
|
| 11 |
.audit-badge{display:block;color:var(--muted);font-size:10px;margin-top:4px}.audit-notice{font-size:12px;padding:10px 14px;margin:8px 0;border-left:3px solid var(--accent);background:var(--accent-soft);color:var(--text)}
|
| 12 |
+
.documentation-view{max-width:1180px}.documentation-head{display:flex;justify-content:space-between;align-items:end;gap:28px;margin-bottom:10px}.documentation-head>div{min-width:0}.documentation-search{width:min(390px,42%);flex:0 0 auto}.reference-source{margin:8px 0 4px;color:var(--muted);font-size:12px}.documentation-status{margin:14px 0;color:var(--muted);font-size:12px}.documentation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.documentation-card{min-width:0;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}.documentation-card h3,.documentation-card h4{margin:0;color:var(--text);line-height:1.35}.documentation-card h4{font-size:16px}.documentation-card-head{display:flex;justify-content:space-between;align-items:start;gap:16px}.documentation-code{display:block;margin-top:3px;color:var(--muted);font:11px "SFMono-Regular",Consolas,monospace;overflow-wrap:anywhere}.documentation-count{flex:0 0 auto;padding:3px 7px;border-radius:4px;background:var(--soft);color:var(--muted);font-size:10px}.documentation-description{margin:12px 0;color:var(--text);font-size:13px;line-height:1.65}.documentation-note{margin:10px 0;padding:9px 11px;border-left:2px solid var(--line);color:var(--muted);font-size:12px}.documentation-references{margin-top:12px;font-size:12px}.documentation-references>strong{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}.documentation-references ul{list-style:none;padding:0;margin:6px 0 0}.documentation-references li{padding:5px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}.documentation-references small{display:block;margin-top:1px;color:var(--muted);font-size:10px}.reference-empty{margin:12px 0 0;color:var(--muted);font-size:11px}.configuration-details{margin-top:13px;border-top:1px solid var(--line);padding-top:10px}.configuration-details summary{cursor:pointer;color:var(--accent);font-size:12px;font-weight:600}.configuration-details ul{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:10px 0 0;margin:0}.configuration-details li{max-width:100%;padding:4px 7px;border-radius:4px;background:var(--soft);font:10px "SFMono-Regular",Consolas,monospace;overflow-wrap:anywhere}.operator-group{margin-top:24px}.operator-group>h3{margin:0 0 10px;padding-bottom:8px;border-bottom:1px solid var(--line)}.operator-card{padding:16px}.documentation-error,.documentation-empty{grid-column:1/-1;margin:0;padding:22px;border:1px solid var(--line);border-radius:var(--radius);color:var(--muted);background:var(--surface)}.documentation-error{border-left:3px solid #b34938;color:var(--text)}@media(max-width:768px){.documentation-head{align-items:stretch;flex-direction:column;gap:14px}.documentation-search{width:100%}.documentation-grid{grid-template-columns:1fr}.documentation-card{padding:15px}.documentation-card-head{gap:10px}}
|