Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
fix data paths
Browse files- app/src/content/embeds/d3-po-loss-ablations.html +27 -8
- app/src/content/embeds/d3-sft-baby-baseline.html +10 -10
- app/src/content/embeds/d3-sft-base-vs-mid.html +10 -10
- app/src/content/embeds/d3-sft-lr-scan.html +27 -7
- app/src/content/embeds/d3-sft-mask-turns.html +120 -29
- app/src/content/embeds/d3-sft-mid-train.html +10 -10
- app/src/content/embeds/d3-sft-packing-runtime.html +28 -13
- app/src/content/embeds/d3-sft-packing-tokens.html +28 -13
- app/src/content/embeds/d3-sft-packing-vs-bs.html +35 -15
- app/src/content/embeds/d3-sft-packing-vs-no-packing.html +10 -10
- app/src/content/embeds/d3-sft-think-follow-0.html +10 -10
- app/src/content/embeds/d3-sft-think-follow-1.html +10 -10
app/src/content/embeds/d3-po-loss-ablations.html
CHANGED
|
@@ -5,24 +5,30 @@
|
|
| 5 |
position: relative;
|
| 6 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
| 7 |
}
|
|
|
|
| 8 |
.d3-dpo-ablations svg {
|
| 9 |
display: block;
|
| 10 |
width: 100%;
|
| 11 |
}
|
|
|
|
| 12 |
.d3-dpo-ablations .bar {
|
| 13 |
stroke: none;
|
| 14 |
}
|
|
|
|
| 15 |
.d3-dpo-ablations .axes path,
|
| 16 |
.d3-dpo-ablations .axes line {
|
| 17 |
stroke: var(--axis-color, var(--text-color));
|
| 18 |
}
|
|
|
|
| 19 |
.d3-dpo-ablations .axes text {
|
| 20 |
fill: var(--tick-color, var(--muted-color));
|
| 21 |
font-size: 11px;
|
| 22 |
}
|
|
|
|
| 23 |
.d3-dpo-ablations .grid line {
|
| 24 |
-
stroke: var(--grid-color, rgba(0,0,0,.08));
|
| 25 |
}
|
|
|
|
| 26 |
.d3-dpo-ablations .d3-tooltip {
|
| 27 |
position: absolute;
|
| 28 |
top: 0;
|
|
@@ -36,13 +42,15 @@
|
|
| 36 |
border: 1px solid var(--border-color);
|
| 37 |
background: var(--surface-bg);
|
| 38 |
color: var(--text-color);
|
| 39 |
-
box-shadow: 0 4px 24px rgba(0,0,0,.18);
|
| 40 |
opacity: 0;
|
| 41 |
transition: opacity .12s ease;
|
| 42 |
}
|
|
|
|
| 43 |
.d3-dpo-ablations .d3-tooltip__inner {
|
| 44 |
text-align: left;
|
| 45 |
}
|
|
|
|
| 46 |
.d3-dpo-ablations .legend {
|
| 47 |
display: flex;
|
| 48 |
flex-direction: column;
|
|
@@ -50,16 +58,19 @@
|
|
| 50 |
gap: 6px;
|
| 51 |
margin-top: 16px;
|
| 52 |
}
|
|
|
|
| 53 |
.d3-dpo-ablations .legend-title {
|
| 54 |
font-size: 12px;
|
| 55 |
font-weight: 700;
|
| 56 |
color: var(--text-color);
|
| 57 |
}
|
|
|
|
| 58 |
.d3-dpo-ablations .legend .items {
|
| 59 |
display: flex;
|
| 60 |
flex-wrap: wrap;
|
| 61 |
gap: 8px 14px;
|
| 62 |
}
|
|
|
|
| 63 |
.d3-dpo-ablations .legend .item {
|
| 64 |
display: inline-flex;
|
| 65 |
align-items: center;
|
|
@@ -68,12 +79,14 @@
|
|
| 68 |
font-size: 12px;
|
| 69 |
color: var(--text-color);
|
| 70 |
}
|
|
|
|
| 71 |
.d3-dpo-ablations .legend .swatch {
|
| 72 |
width: 14px;
|
| 73 |
height: 14px;
|
| 74 |
border-radius: 3px;
|
| 75 |
border: 1px solid var(--border-color);
|
| 76 |
}
|
|
|
|
| 77 |
.d3-dpo-ablations .controls {
|
| 78 |
display: flex;
|
| 79 |
gap: 16px;
|
|
@@ -82,17 +95,20 @@
|
|
| 82 |
flex-wrap: wrap;
|
| 83 |
margin-top: 8px;
|
| 84 |
}
|
|
|
|
| 85 |
.d3-dpo-ablations .control-group {
|
| 86 |
display: flex;
|
| 87 |
flex-direction: column;
|
| 88 |
align-items: flex-start;
|
| 89 |
gap: 6px;
|
| 90 |
}
|
|
|
|
| 91 |
.d3-dpo-ablations .controls label {
|
| 92 |
font-size: 12px;
|
| 93 |
font-weight: 700;
|
| 94 |
color: var(--text-color);
|
| 95 |
}
|
|
|
|
| 96 |
.d3-dpo-ablations .controls select {
|
| 97 |
font-size: 12px;
|
| 98 |
padding: 8px 28px 8px 10px;
|
|
@@ -102,16 +118,19 @@
|
|
| 102 |
color: var(--text-color);
|
| 103 |
cursor: pointer;
|
| 104 |
}
|
|
|
|
| 105 |
.d3-dpo-ablations .checkbox-group {
|
| 106 |
display: flex;
|
| 107 |
align-items: center;
|
| 108 |
gap: 6px;
|
| 109 |
}
|
|
|
|
| 110 |
.d3-dpo-ablations .checkbox-group input[type="checkbox"] {
|
| 111 |
width: 16px;
|
| 112 |
height: 16px;
|
| 113 |
cursor: pointer;
|
| 114 |
}
|
|
|
|
| 115 |
.d3-dpo-ablations .checkbox-group label {
|
| 116 |
font-size: 12px;
|
| 117 |
color: var(--text-color);
|
|
@@ -189,10 +208,10 @@
|
|
| 189 |
|
| 190 |
// Data loading
|
| 191 |
const CSV_PATHS = [
|
| 192 |
-
'/data/
|
| 193 |
-
'./assets/data/
|
| 194 |
-
'../assets/data/
|
| 195 |
-
'../../assets/data/
|
| 196 |
];
|
| 197 |
|
| 198 |
const fetchFirstAvailable = async (paths) => {
|
|
@@ -200,7 +219,7 @@
|
|
| 200 |
try {
|
| 201 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 202 |
if (r.ok) return await r.text();
|
| 203 |
-
} catch (e) {}
|
| 204 |
}
|
| 205 |
throw new Error('CSV not found');
|
| 206 |
};
|
|
@@ -524,4 +543,4 @@
|
|
| 524 |
ensureD3(bootstrap);
|
| 525 |
}
|
| 526 |
})();
|
| 527 |
-
</script>
|
|
|
|
| 5 |
position: relative;
|
| 6 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
| 7 |
}
|
| 8 |
+
|
| 9 |
.d3-dpo-ablations svg {
|
| 10 |
display: block;
|
| 11 |
width: 100%;
|
| 12 |
}
|
| 13 |
+
|
| 14 |
.d3-dpo-ablations .bar {
|
| 15 |
stroke: none;
|
| 16 |
}
|
| 17 |
+
|
| 18 |
.d3-dpo-ablations .axes path,
|
| 19 |
.d3-dpo-ablations .axes line {
|
| 20 |
stroke: var(--axis-color, var(--text-color));
|
| 21 |
}
|
| 22 |
+
|
| 23 |
.d3-dpo-ablations .axes text {
|
| 24 |
fill: var(--tick-color, var(--muted-color));
|
| 25 |
font-size: 11px;
|
| 26 |
}
|
| 27 |
+
|
| 28 |
.d3-dpo-ablations .grid line {
|
| 29 |
+
stroke: var(--grid-color, rgba(0, 0, 0, .08));
|
| 30 |
}
|
| 31 |
+
|
| 32 |
.d3-dpo-ablations .d3-tooltip {
|
| 33 |
position: absolute;
|
| 34 |
top: 0;
|
|
|
|
| 42 |
border: 1px solid var(--border-color);
|
| 43 |
background: var(--surface-bg);
|
| 44 |
color: var(--text-color);
|
| 45 |
+
box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
|
| 46 |
opacity: 0;
|
| 47 |
transition: opacity .12s ease;
|
| 48 |
}
|
| 49 |
+
|
| 50 |
.d3-dpo-ablations .d3-tooltip__inner {
|
| 51 |
text-align: left;
|
| 52 |
}
|
| 53 |
+
|
| 54 |
.d3-dpo-ablations .legend {
|
| 55 |
display: flex;
|
| 56 |
flex-direction: column;
|
|
|
|
| 58 |
gap: 6px;
|
| 59 |
margin-top: 16px;
|
| 60 |
}
|
| 61 |
+
|
| 62 |
.d3-dpo-ablations .legend-title {
|
| 63 |
font-size: 12px;
|
| 64 |
font-weight: 700;
|
| 65 |
color: var(--text-color);
|
| 66 |
}
|
| 67 |
+
|
| 68 |
.d3-dpo-ablations .legend .items {
|
| 69 |
display: flex;
|
| 70 |
flex-wrap: wrap;
|
| 71 |
gap: 8px 14px;
|
| 72 |
}
|
| 73 |
+
|
| 74 |
.d3-dpo-ablations .legend .item {
|
| 75 |
display: inline-flex;
|
| 76 |
align-items: center;
|
|
|
|
| 79 |
font-size: 12px;
|
| 80 |
color: var(--text-color);
|
| 81 |
}
|
| 82 |
+
|
| 83 |
.d3-dpo-ablations .legend .swatch {
|
| 84 |
width: 14px;
|
| 85 |
height: 14px;
|
| 86 |
border-radius: 3px;
|
| 87 |
border: 1px solid var(--border-color);
|
| 88 |
}
|
| 89 |
+
|
| 90 |
.d3-dpo-ablations .controls {
|
| 91 |
display: flex;
|
| 92 |
gap: 16px;
|
|
|
|
| 95 |
flex-wrap: wrap;
|
| 96 |
margin-top: 8px;
|
| 97 |
}
|
| 98 |
+
|
| 99 |
.d3-dpo-ablations .control-group {
|
| 100 |
display: flex;
|
| 101 |
flex-direction: column;
|
| 102 |
align-items: flex-start;
|
| 103 |
gap: 6px;
|
| 104 |
}
|
| 105 |
+
|
| 106 |
.d3-dpo-ablations .controls label {
|
| 107 |
font-size: 12px;
|
| 108 |
font-weight: 700;
|
| 109 |
color: var(--text-color);
|
| 110 |
}
|
| 111 |
+
|
| 112 |
.d3-dpo-ablations .controls select {
|
| 113 |
font-size: 12px;
|
| 114 |
padding: 8px 28px 8px 10px;
|
|
|
|
| 118 |
color: var(--text-color);
|
| 119 |
cursor: pointer;
|
| 120 |
}
|
| 121 |
+
|
| 122 |
.d3-dpo-ablations .checkbox-group {
|
| 123 |
display: flex;
|
| 124 |
align-items: center;
|
| 125 |
gap: 6px;
|
| 126 |
}
|
| 127 |
+
|
| 128 |
.d3-dpo-ablations .checkbox-group input[type="checkbox"] {
|
| 129 |
width: 16px;
|
| 130 |
height: 16px;
|
| 131 |
cursor: pointer;
|
| 132 |
}
|
| 133 |
+
|
| 134 |
.d3-dpo-ablations .checkbox-group label {
|
| 135 |
font-size: 12px;
|
| 136 |
color: var(--text-color);
|
|
|
|
| 208 |
|
| 209 |
// Data loading
|
| 210 |
const CSV_PATHS = [
|
| 211 |
+
'/data/smollm3_dpo_ablations.csv',
|
| 212 |
+
'./assets/data/smollm3_dpo_ablations.csv',
|
| 213 |
+
'../assets/data/smollm3_dpo_ablations.csv',
|
| 214 |
+
'../../assets/data/smollm3_dpo_ablations.csv'
|
| 215 |
];
|
| 216 |
|
| 217 |
const fetchFirstAvailable = async (paths) => {
|
|
|
|
| 219 |
try {
|
| 220 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 221 |
if (r.ok) return await r.text();
|
| 222 |
+
} catch (e) { }
|
| 223 |
}
|
| 224 |
throw new Error('CSV not found');
|
| 225 |
};
|
|
|
|
| 543 |
ensureD3(bootstrap);
|
| 544 |
}
|
| 545 |
})();
|
| 546 |
+
</script>
|
app/src/content/embeds/d3-sft-baby-baseline.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
|
| 24 |
.d3-sft-baby-baseline .grid line {
|
| 25 |
stroke: var(--grid-color);
|
| 26 |
-
stroke-dasharray: 2,2;
|
| 27 |
}
|
| 28 |
|
| 29 |
.d3-sft-baby-baseline .bar {
|
|
@@ -194,10 +194,10 @@
|
|
| 194 |
|
| 195 |
// Data loading helpers
|
| 196 |
const CSV_PATHS = [
|
| 197 |
-
'/data/
|
| 198 |
-
'./assets/data/
|
| 199 |
-
'../assets/data/
|
| 200 |
-
'../../assets/data/
|
| 201 |
];
|
| 202 |
|
| 203 |
const fetchFirstAvailable = async (paths) => {
|
|
@@ -205,7 +205,7 @@
|
|
| 205 |
try {
|
| 206 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 207 |
if (r.ok) return await r.text();
|
| 208 |
-
} catch (_) {}
|
| 209 |
}
|
| 210 |
throw new Error('CSV not found at any of the specified paths');
|
| 211 |
};
|
|
@@ -435,18 +435,18 @@
|
|
| 435 |
|
| 436 |
// Hover interactions
|
| 437 |
groupsMerge.selectAll('rect.bar')
|
| 438 |
-
.on('mouseenter', function(event, d) {
|
| 439 |
const benchmark = d3.select(this.parentNode).datum().benchmark;
|
| 440 |
tipInner.innerHTML = `<strong>${d.subset}</strong><br/>${benchmark}: <strong>${d.value.toFixed(2)}</strong>`;
|
| 441 |
tip.classList.add('visible');
|
| 442 |
})
|
| 443 |
-
.on('mousemove', function(event) {
|
| 444 |
const [mx, my] = d3.pointer(event, container);
|
| 445 |
const offsetX = 10;
|
| 446 |
const offsetY = -10;
|
| 447 |
tip.style.transform = `translate(${mx + offsetX}px, ${my + offsetY}px)`;
|
| 448 |
})
|
| 449 |
-
.on('mouseleave', function() {
|
| 450 |
tip.classList.remove('visible');
|
| 451 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 452 |
});
|
|
@@ -514,4 +514,4 @@
|
|
| 514 |
ensureD3(bootstrap);
|
| 515 |
}
|
| 516 |
})();
|
| 517 |
-
</script>
|
|
|
|
| 23 |
|
| 24 |
.d3-sft-baby-baseline .grid line {
|
| 25 |
stroke: var(--grid-color);
|
| 26 |
+
stroke-dasharray: 2, 2;
|
| 27 |
}
|
| 28 |
|
| 29 |
.d3-sft-baby-baseline .bar {
|
|
|
|
| 194 |
|
| 195 |
// Data loading helpers
|
| 196 |
const CSV_PATHS = [
|
| 197 |
+
'/data/sft_baby-baseline.csv',
|
| 198 |
+
'./assets/data/sft_baby-baseline.csv',
|
| 199 |
+
'../assets/data/sft_baby-baseline.csv',
|
| 200 |
+
'../../assets/data/sft_baby-baseline.csv'
|
| 201 |
];
|
| 202 |
|
| 203 |
const fetchFirstAvailable = async (paths) => {
|
|
|
|
| 205 |
try {
|
| 206 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 207 |
if (r.ok) return await r.text();
|
| 208 |
+
} catch (_) { }
|
| 209 |
}
|
| 210 |
throw new Error('CSV not found at any of the specified paths');
|
| 211 |
};
|
|
|
|
| 435 |
|
| 436 |
// Hover interactions
|
| 437 |
groupsMerge.selectAll('rect.bar')
|
| 438 |
+
.on('mouseenter', function (event, d) {
|
| 439 |
const benchmark = d3.select(this.parentNode).datum().benchmark;
|
| 440 |
tipInner.innerHTML = `<strong>${d.subset}</strong><br/>${benchmark}: <strong>${d.value.toFixed(2)}</strong>`;
|
| 441 |
tip.classList.add('visible');
|
| 442 |
})
|
| 443 |
+
.on('mousemove', function (event) {
|
| 444 |
const [mx, my] = d3.pointer(event, container);
|
| 445 |
const offsetX = 10;
|
| 446 |
const offsetY = -10;
|
| 447 |
tip.style.transform = `translate(${mx + offsetX}px, ${my + offsetY}px)`;
|
| 448 |
})
|
| 449 |
+
.on('mouseleave', function () {
|
| 450 |
tip.classList.remove('visible');
|
| 451 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 452 |
});
|
|
|
|
| 514 |
ensureD3(bootstrap);
|
| 515 |
}
|
| 516 |
})();
|
| 517 |
+
</script>
|
app/src/content/embeds/d3-sft-base-vs-mid.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
|
| 24 |
.d3-sft-base-vs-mid .grid line {
|
| 25 |
stroke: var(--grid-color);
|
| 26 |
-
stroke-dasharray: 2,2;
|
| 27 |
}
|
| 28 |
|
| 29 |
.d3-sft-base-vs-mid .bar {
|
|
@@ -194,10 +194,10 @@
|
|
| 194 |
|
| 195 |
// Data loading helpers
|
| 196 |
const CSV_PATHS = [
|
| 197 |
-
'/data/
|
| 198 |
-
'./assets/data/
|
| 199 |
-
'../assets/data/
|
| 200 |
-
'../../assets/data/
|
| 201 |
];
|
| 202 |
|
| 203 |
const fetchFirstAvailable = async (paths) => {
|
|
@@ -205,7 +205,7 @@
|
|
| 205 |
try {
|
| 206 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 207 |
if (r.ok) return await r.text();
|
| 208 |
-
} catch (_) {}
|
| 209 |
}
|
| 210 |
throw new Error('CSV not found at any of the specified paths');
|
| 211 |
};
|
|
@@ -435,18 +435,18 @@
|
|
| 435 |
|
| 436 |
// Hover interactions
|
| 437 |
groupsMerge.selectAll('rect.bar')
|
| 438 |
-
.on('mouseenter', function(event, d) {
|
| 439 |
const benchmark = d3.select(this.parentNode).datum().benchmark;
|
| 440 |
tipInner.innerHTML = `<strong>${d.baseModel}</strong><br/>${benchmark}: <strong>${d.value.toFixed(2)}</strong>`;
|
| 441 |
tip.classList.add('visible');
|
| 442 |
})
|
| 443 |
-
.on('mousemove', function(event) {
|
| 444 |
const [mx, my] = d3.pointer(event, container);
|
| 445 |
const offsetX = 10;
|
| 446 |
const offsetY = -10;
|
| 447 |
tip.style.transform = `translate(${mx + offsetX}px, ${my + offsetY}px)`;
|
| 448 |
})
|
| 449 |
-
.on('mouseleave', function() {
|
| 450 |
tip.classList.remove('visible');
|
| 451 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 452 |
});
|
|
@@ -514,4 +514,4 @@
|
|
| 514 |
ensureD3(bootstrap);
|
| 515 |
}
|
| 516 |
})();
|
| 517 |
-
</script>
|
|
|
|
| 23 |
|
| 24 |
.d3-sft-base-vs-mid .grid line {
|
| 25 |
stroke: var(--grid-color);
|
| 26 |
+
stroke-dasharray: 2, 2;
|
| 27 |
}
|
| 28 |
|
| 29 |
.d3-sft-base-vs-mid .bar {
|
|
|
|
| 194 |
|
| 195 |
// Data loading helpers
|
| 196 |
const CSV_PATHS = [
|
| 197 |
+
'/data/sft-base-vs-mid.csv',
|
| 198 |
+
'./assets/data/sft-base-vs-mid.csv',
|
| 199 |
+
'../assets/data/sft-base-vs-mid.csv',
|
| 200 |
+
'../../assets/data/sft-base-vs-mid.csv'
|
| 201 |
];
|
| 202 |
|
| 203 |
const fetchFirstAvailable = async (paths) => {
|
|
|
|
| 205 |
try {
|
| 206 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 207 |
if (r.ok) return await r.text();
|
| 208 |
+
} catch (_) { }
|
| 209 |
}
|
| 210 |
throw new Error('CSV not found at any of the specified paths');
|
| 211 |
};
|
|
|
|
| 435 |
|
| 436 |
// Hover interactions
|
| 437 |
groupsMerge.selectAll('rect.bar')
|
| 438 |
+
.on('mouseenter', function (event, d) {
|
| 439 |
const benchmark = d3.select(this.parentNode).datum().benchmark;
|
| 440 |
tipInner.innerHTML = `<strong>${d.baseModel}</strong><br/>${benchmark}: <strong>${d.value.toFixed(2)}</strong>`;
|
| 441 |
tip.classList.add('visible');
|
| 442 |
})
|
| 443 |
+
.on('mousemove', function (event) {
|
| 444 |
const [mx, my] = d3.pointer(event, container);
|
| 445 |
const offsetX = 10;
|
| 446 |
const offsetY = -10;
|
| 447 |
tip.style.transform = `translate(${mx + offsetX}px, ${my + offsetY}px)`;
|
| 448 |
})
|
| 449 |
+
.on('mouseleave', function () {
|
| 450 |
tip.classList.remove('visible');
|
| 451 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 452 |
});
|
|
|
|
| 514 |
ensureD3(bootstrap);
|
| 515 |
}
|
| 516 |
})();
|
| 517 |
+
</script>
|
app/src/content/embeds/d3-sft-lr-scan.html
CHANGED
|
@@ -5,45 +5,54 @@
|
|
| 5 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 6 |
position: relative;
|
| 7 |
}
|
|
|
|
| 8 |
.d3-sft-lr-scan svg {
|
| 9 |
display: block;
|
| 10 |
overflow: visible;
|
| 11 |
}
|
|
|
|
| 12 |
.d3-sft-lr-scan .axes path,
|
| 13 |
.d3-sft-lr-scan .axes line {
|
| 14 |
stroke: var(--axis-color);
|
| 15 |
shape-rendering: crispEdges;
|
| 16 |
}
|
|
|
|
| 17 |
.d3-sft-lr-scan .axes text {
|
| 18 |
fill: var(--tick-color);
|
| 19 |
font-size: 11px;
|
| 20 |
}
|
|
|
|
| 21 |
.d3-sft-lr-scan .grid line {
|
| 22 |
stroke: var(--grid-color);
|
| 23 |
-
stroke-dasharray: 2,2;
|
| 24 |
shape-rendering: crispEdges;
|
| 25 |
}
|
|
|
|
| 26 |
.d3-sft-lr-scan .axis-label {
|
| 27 |
fill: var(--text-color);
|
| 28 |
font-size: 12px;
|
| 29 |
font-weight: 600;
|
| 30 |
}
|
|
|
|
| 31 |
.d3-sft-lr-scan .line-think {
|
| 32 |
fill: none;
|
| 33 |
stroke-width: 2.5;
|
| 34 |
stroke-linecap: round;
|
| 35 |
stroke-linejoin: round;
|
| 36 |
}
|
|
|
|
| 37 |
.d3-sft-lr-scan .line-no-think {
|
| 38 |
fill: none;
|
| 39 |
stroke-width: 2.5;
|
| 40 |
stroke-linecap: round;
|
| 41 |
stroke-linejoin: round;
|
| 42 |
}
|
|
|
|
| 43 |
.d3-sft-lr-scan .dot {
|
| 44 |
stroke: var(--surface-bg);
|
| 45 |
stroke-width: 2;
|
| 46 |
}
|
|
|
|
| 47 |
.d3-sft-lr-scan .header {
|
| 48 |
display: flex;
|
| 49 |
align-items: flex-start;
|
|
@@ -52,22 +61,26 @@
|
|
| 52 |
margin-top: 16px;
|
| 53 |
flex-wrap: wrap;
|
| 54 |
}
|
|
|
|
| 55 |
.d3-sft-lr-scan .legend {
|
| 56 |
display: flex;
|
| 57 |
flex-direction: column;
|
| 58 |
align-items: flex-start;
|
| 59 |
gap: 6px;
|
| 60 |
}
|
|
|
|
| 61 |
.d3-sft-lr-scan .legend-title {
|
| 62 |
font-size: 12px;
|
| 63 |
font-weight: 700;
|
| 64 |
color: var(--text-color);
|
| 65 |
}
|
|
|
|
| 66 |
.d3-sft-lr-scan .legend .items {
|
| 67 |
display: flex;
|
| 68 |
flex-wrap: wrap;
|
| 69 |
gap: 8px 14px;
|
| 70 |
}
|
|
|
|
| 71 |
.d3-sft-lr-scan .legend .item {
|
| 72 |
display: inline-flex;
|
| 73 |
align-items: center;
|
|
@@ -76,17 +89,20 @@
|
|
| 76 |
font-size: 12px;
|
| 77 |
color: var(--text-color);
|
| 78 |
}
|
|
|
|
| 79 |
.d3-sft-lr-scan .legend .swatch {
|
| 80 |
width: 14px;
|
| 81 |
height: 14px;
|
| 82 |
border-radius: 3px;
|
| 83 |
border: 1px solid var(--border-color);
|
| 84 |
}
|
|
|
|
| 85 |
.d3-sft-lr-scan .legend .swatch-line {
|
| 86 |
width: 20px;
|
| 87 |
height: 2px;
|
| 88 |
border: none;
|
| 89 |
}
|
|
|
|
| 90 |
.d3-sft-lr-scan .controls {
|
| 91 |
display: flex;
|
| 92 |
gap: 16px;
|
|
@@ -94,17 +110,20 @@
|
|
| 94 |
justify-content: flex-end;
|
| 95 |
flex-wrap: wrap;
|
| 96 |
}
|
|
|
|
| 97 |
.d3-sft-lr-scan .control-group {
|
| 98 |
display: flex;
|
| 99 |
flex-direction: column;
|
| 100 |
align-items: flex-start;
|
| 101 |
gap: 6px;
|
| 102 |
}
|
|
|
|
| 103 |
.d3-sft-lr-scan .controls label {
|
| 104 |
font-size: 12px;
|
| 105 |
font-weight: 700;
|
| 106 |
color: var(--text-color);
|
| 107 |
}
|
|
|
|
| 108 |
.d3-sft-lr-scan .controls select {
|
| 109 |
font-size: 12px;
|
| 110 |
padding: 8px 28px 8px 10px;
|
|
@@ -118,6 +137,7 @@
|
|
| 118 |
background-repeat: no-repeat;
|
| 119 |
background-position: right 8px center;
|
| 120 |
}
|
|
|
|
| 121 |
.d3-sft-lr-scan .controls select:focus {
|
| 122 |
outline: 2px solid var(--primary-color);
|
| 123 |
outline-offset: 2px;
|
|
@@ -156,10 +176,10 @@
|
|
| 156 |
}
|
| 157 |
|
| 158 |
const CSV_PATHS = [
|
| 159 |
-
'/data/
|
| 160 |
-
'./assets/data/
|
| 161 |
-
'../assets/data/
|
| 162 |
-
'../../assets/data/
|
| 163 |
];
|
| 164 |
|
| 165 |
const fetchFirstAvailable = async (paths) => {
|
|
@@ -167,7 +187,7 @@
|
|
| 167 |
try {
|
| 168 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 169 |
if (r.ok) return await r.text();
|
| 170 |
-
} catch(_){}
|
| 171 |
}
|
| 172 |
throw new Error('CSV not found in any of the expected locations');
|
| 173 |
};
|
|
@@ -559,4 +579,4 @@
|
|
| 559 |
ensureD3(bootstrap);
|
| 560 |
}
|
| 561 |
})();
|
| 562 |
-
</script>
|
|
|
|
| 5 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 6 |
position: relative;
|
| 7 |
}
|
| 8 |
+
|
| 9 |
.d3-sft-lr-scan svg {
|
| 10 |
display: block;
|
| 11 |
overflow: visible;
|
| 12 |
}
|
| 13 |
+
|
| 14 |
.d3-sft-lr-scan .axes path,
|
| 15 |
.d3-sft-lr-scan .axes line {
|
| 16 |
stroke: var(--axis-color);
|
| 17 |
shape-rendering: crispEdges;
|
| 18 |
}
|
| 19 |
+
|
| 20 |
.d3-sft-lr-scan .axes text {
|
| 21 |
fill: var(--tick-color);
|
| 22 |
font-size: 11px;
|
| 23 |
}
|
| 24 |
+
|
| 25 |
.d3-sft-lr-scan .grid line {
|
| 26 |
stroke: var(--grid-color);
|
| 27 |
+
stroke-dasharray: 2, 2;
|
| 28 |
shape-rendering: crispEdges;
|
| 29 |
}
|
| 30 |
+
|
| 31 |
.d3-sft-lr-scan .axis-label {
|
| 32 |
fill: var(--text-color);
|
| 33 |
font-size: 12px;
|
| 34 |
font-weight: 600;
|
| 35 |
}
|
| 36 |
+
|
| 37 |
.d3-sft-lr-scan .line-think {
|
| 38 |
fill: none;
|
| 39 |
stroke-width: 2.5;
|
| 40 |
stroke-linecap: round;
|
| 41 |
stroke-linejoin: round;
|
| 42 |
}
|
| 43 |
+
|
| 44 |
.d3-sft-lr-scan .line-no-think {
|
| 45 |
fill: none;
|
| 46 |
stroke-width: 2.5;
|
| 47 |
stroke-linecap: round;
|
| 48 |
stroke-linejoin: round;
|
| 49 |
}
|
| 50 |
+
|
| 51 |
.d3-sft-lr-scan .dot {
|
| 52 |
stroke: var(--surface-bg);
|
| 53 |
stroke-width: 2;
|
| 54 |
}
|
| 55 |
+
|
| 56 |
.d3-sft-lr-scan .header {
|
| 57 |
display: flex;
|
| 58 |
align-items: flex-start;
|
|
|
|
| 61 |
margin-top: 16px;
|
| 62 |
flex-wrap: wrap;
|
| 63 |
}
|
| 64 |
+
|
| 65 |
.d3-sft-lr-scan .legend {
|
| 66 |
display: flex;
|
| 67 |
flex-direction: column;
|
| 68 |
align-items: flex-start;
|
| 69 |
gap: 6px;
|
| 70 |
}
|
| 71 |
+
|
| 72 |
.d3-sft-lr-scan .legend-title {
|
| 73 |
font-size: 12px;
|
| 74 |
font-weight: 700;
|
| 75 |
color: var(--text-color);
|
| 76 |
}
|
| 77 |
+
|
| 78 |
.d3-sft-lr-scan .legend .items {
|
| 79 |
display: flex;
|
| 80 |
flex-wrap: wrap;
|
| 81 |
gap: 8px 14px;
|
| 82 |
}
|
| 83 |
+
|
| 84 |
.d3-sft-lr-scan .legend .item {
|
| 85 |
display: inline-flex;
|
| 86 |
align-items: center;
|
|
|
|
| 89 |
font-size: 12px;
|
| 90 |
color: var(--text-color);
|
| 91 |
}
|
| 92 |
+
|
| 93 |
.d3-sft-lr-scan .legend .swatch {
|
| 94 |
width: 14px;
|
| 95 |
height: 14px;
|
| 96 |
border-radius: 3px;
|
| 97 |
border: 1px solid var(--border-color);
|
| 98 |
}
|
| 99 |
+
|
| 100 |
.d3-sft-lr-scan .legend .swatch-line {
|
| 101 |
width: 20px;
|
| 102 |
height: 2px;
|
| 103 |
border: none;
|
| 104 |
}
|
| 105 |
+
|
| 106 |
.d3-sft-lr-scan .controls {
|
| 107 |
display: flex;
|
| 108 |
gap: 16px;
|
|
|
|
| 110 |
justify-content: flex-end;
|
| 111 |
flex-wrap: wrap;
|
| 112 |
}
|
| 113 |
+
|
| 114 |
.d3-sft-lr-scan .control-group {
|
| 115 |
display: flex;
|
| 116 |
flex-direction: column;
|
| 117 |
align-items: flex-start;
|
| 118 |
gap: 6px;
|
| 119 |
}
|
| 120 |
+
|
| 121 |
.d3-sft-lr-scan .controls label {
|
| 122 |
font-size: 12px;
|
| 123 |
font-weight: 700;
|
| 124 |
color: var(--text-color);
|
| 125 |
}
|
| 126 |
+
|
| 127 |
.d3-sft-lr-scan .controls select {
|
| 128 |
font-size: 12px;
|
| 129 |
padding: 8px 28px 8px 10px;
|
|
|
|
| 137 |
background-repeat: no-repeat;
|
| 138 |
background-position: right 8px center;
|
| 139 |
}
|
| 140 |
+
|
| 141 |
.d3-sft-lr-scan .controls select:focus {
|
| 142 |
outline: 2px solid var(--primary-color);
|
| 143 |
outline-offset: 2px;
|
|
|
|
| 176 |
}
|
| 177 |
|
| 178 |
const CSV_PATHS = [
|
| 179 |
+
'/data/sft-lr-scan.csv',
|
| 180 |
+
'./assets/data/sft-lr-scan.csv',
|
| 181 |
+
'../assets/data/sft-lr-scan.csv',
|
| 182 |
+
'../../assets/data/sft-lr-scan.csv'
|
| 183 |
];
|
| 184 |
|
| 185 |
const fetchFirstAvailable = async (paths) => {
|
|
|
|
| 187 |
try {
|
| 188 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 189 |
if (r.ok) return await r.text();
|
| 190 |
+
} catch (_) { }
|
| 191 |
}
|
| 192 |
throw new Error('CSV not found in any of the expected locations');
|
| 193 |
};
|
|
|
|
| 579 |
ensureD3(bootstrap);
|
| 580 |
}
|
| 581 |
})();
|
| 582 |
+
</script>
|
app/src/content/embeds/d3-sft-mask-turns.html
CHANGED
|
@@ -5,24 +5,105 @@
|
|
| 5 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
| 6 |
position: relative;
|
| 7 |
}
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
.d3-sft-mask-turns .axes path,
|
| 10 |
-
.d3-sft-mask-turns .axes line {
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
.d3-sft-mask-turns .
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
.d3-sft-mask-turns .
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
.d3-sft-mask-turns .controls select {
|
| 27 |
font-size: 12px;
|
| 28 |
padding: 8px 28px 8px 10px;
|
|
@@ -37,8 +118,15 @@
|
|
| 37 |
background-position: right 8px center;
|
| 38 |
transition: border-color 0.15s ease;
|
| 39 |
}
|
| 40 |
-
|
| 41 |
-
.d3-sft-mask-turns .controls select:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
.d3-sft-mask-turns .d3-tooltip {
|
| 44 |
position: absolute;
|
|
@@ -53,11 +141,14 @@
|
|
| 53 |
border: 1px solid var(--border-color);
|
| 54 |
background: var(--surface-bg);
|
| 55 |
color: var(--text-color);
|
| 56 |
-
box-shadow: 0 4px 24px rgba(0,0,0,.18);
|
| 57 |
opacity: 0;
|
| 58 |
transition: opacity .12s ease;
|
| 59 |
}
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
| 61 |
</style>
|
| 62 |
<script>
|
| 63 |
(() => {
|
|
@@ -105,12 +196,12 @@
|
|
| 105 |
}
|
| 106 |
|
| 107 |
// Data loading
|
| 108 |
-
const DEFAULT_CSV = '/data/
|
| 109 |
const CSV_PATHS = [
|
| 110 |
DEFAULT_CSV,
|
| 111 |
-
'./assets/data/
|
| 112 |
-
'../assets/data/
|
| 113 |
-
'../../assets/data/
|
| 114 |
];
|
| 115 |
|
| 116 |
const fetchFirstAvailable = async (paths) => {
|
|
@@ -118,7 +209,7 @@
|
|
| 118 |
try {
|
| 119 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 120 |
if (r.ok) return await r.text();
|
| 121 |
-
} catch(_) {}
|
| 122 |
}
|
| 123 |
throw new Error('CSV not found at any path');
|
| 124 |
};
|
|
@@ -255,7 +346,7 @@
|
|
| 255 |
.attr('fill', d => colorScale(d.mask))
|
| 256 |
.attr('opacity', d => hiddenSeries.has(d.mask) ? 0.1 : 1)
|
| 257 |
.style('cursor', 'pointer')
|
| 258 |
-
.on('mouseenter', function(event, d) {
|
| 259 |
if (hiddenSeries.has(d.mask)) return;
|
| 260 |
d3.select(this).attr('opacity', 0.8);
|
| 261 |
tipInner.innerHTML = `<strong>${d.benchmark}</strong><br/>${maskLabels[d.mask]}<br/>Score: ${d.value.toFixed(2)}%`;
|
|
@@ -263,7 +354,7 @@
|
|
| 263 |
const [mx, my] = d3.pointer(event, container);
|
| 264 |
tip.style.transform = `translate(${mx + 12}px, ${my - 12}px)`;
|
| 265 |
})
|
| 266 |
-
.on('mouseleave', function(event, d) {
|
| 267 |
d3.select(this).attr('opacity', hiddenSeries.has(d.mask) ? 0.1 : 1);
|
| 268 |
tip.style.opacity = '0';
|
| 269 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
|
@@ -430,4 +521,4 @@
|
|
| 430 |
ensureD3(bootstrap);
|
| 431 |
}
|
| 432 |
})();
|
| 433 |
-
</script>
|
|
|
|
| 5 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
| 6 |
position: relative;
|
| 7 |
}
|
| 8 |
+
|
| 9 |
+
.d3-sft-mask-turns svg {
|
| 10 |
+
display: block;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
.d3-sft-mask-turns .axes path,
|
| 14 |
+
.d3-sft-mask-turns .axes line {
|
| 15 |
+
stroke: var(--axis-color);
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.d3-sft-mask-turns .axes text {
|
| 19 |
+
fill: var(--tick-color);
|
| 20 |
+
font-size: 11px;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.d3-sft-mask-turns .grid line {
|
| 24 |
+
stroke: var(--grid-color);
|
| 25 |
+
stroke-dasharray: 2, 2;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.d3-sft-mask-turns .axis-label {
|
| 29 |
+
fill: var(--text-color);
|
| 30 |
+
font-size: 12px;
|
| 31 |
+
font-weight: 600;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.d3-sft-mask-turns .header {
|
| 35 |
+
display: flex;
|
| 36 |
+
align-items: center;
|
| 37 |
+
justify-content: space-between;
|
| 38 |
+
margin-top: 12px;
|
| 39 |
+
gap: 16px;
|
| 40 |
+
flex-wrap: wrap;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.d3-sft-mask-turns .legend {
|
| 44 |
+
display: flex;
|
| 45 |
+
flex-direction: column;
|
| 46 |
+
align-items: flex-start;
|
| 47 |
+
gap: 6px;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.d3-sft-mask-turns .legend-title {
|
| 51 |
+
font-size: 12px;
|
| 52 |
+
font-weight: 700;
|
| 53 |
+
color: var(--text-color);
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
.d3-sft-mask-turns .legend .items {
|
| 57 |
+
display: flex;
|
| 58 |
+
flex-wrap: wrap;
|
| 59 |
+
gap: 8px 14px;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.d3-sft-mask-turns .legend .item {
|
| 63 |
+
display: inline-flex;
|
| 64 |
+
align-items: center;
|
| 65 |
+
gap: 6px;
|
| 66 |
+
white-space: nowrap;
|
| 67 |
+
font-size: 12px;
|
| 68 |
+
color: var(--text-color);
|
| 69 |
+
cursor: pointer;
|
| 70 |
+
user-select: none;
|
| 71 |
+
opacity: 1;
|
| 72 |
+
transition: opacity 0.15s ease;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.d3-sft-mask-turns .legend .item.dimmed {
|
| 76 |
+
opacity: 0.3;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.d3-sft-mask-turns .legend .swatch {
|
| 80 |
+
width: 14px;
|
| 81 |
+
height: 14px;
|
| 82 |
+
border-radius: 3px;
|
| 83 |
+
border: 1px solid var(--border-color);
|
| 84 |
+
flex-shrink: 0;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.d3-sft-mask-turns .controls {
|
| 88 |
+
display: flex;
|
| 89 |
+
gap: 16px;
|
| 90 |
+
align-items: center;
|
| 91 |
+
flex-wrap: wrap;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.d3-sft-mask-turns .controls .control-group {
|
| 95 |
+
display: flex;
|
| 96 |
+
flex-direction: column;
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
gap: 6px;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
.d3-sft-mask-turns .controls label {
|
| 102 |
+
font-size: 12px;
|
| 103 |
+
font-weight: 700;
|
| 104 |
+
color: var(--text-color);
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
.d3-sft-mask-turns .controls select {
|
| 108 |
font-size: 12px;
|
| 109 |
padding: 8px 28px 8px 10px;
|
|
|
|
| 118 |
background-position: right 8px center;
|
| 119 |
transition: border-color 0.15s ease;
|
| 120 |
}
|
| 121 |
+
|
| 122 |
+
.d3-sft-mask-turns .controls select:hover {
|
| 123 |
+
border-color: var(--primary-color);
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
.d3-sft-mask-turns .controls select:focus {
|
| 127 |
+
outline: 2px solid var(--primary-color);
|
| 128 |
+
outline-offset: 2px;
|
| 129 |
+
}
|
| 130 |
|
| 131 |
.d3-sft-mask-turns .d3-tooltip {
|
| 132 |
position: absolute;
|
|
|
|
| 141 |
border: 1px solid var(--border-color);
|
| 142 |
background: var(--surface-bg);
|
| 143 |
color: var(--text-color);
|
| 144 |
+
box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
|
| 145 |
opacity: 0;
|
| 146 |
transition: opacity .12s ease;
|
| 147 |
}
|
| 148 |
+
|
| 149 |
+
.d3-sft-mask-turns .d3-tooltip__inner {
|
| 150 |
+
text-align: left;
|
| 151 |
+
}
|
| 152 |
</style>
|
| 153 |
<script>
|
| 154 |
(() => {
|
|
|
|
| 196 |
}
|
| 197 |
|
| 198 |
// Data loading
|
| 199 |
+
const DEFAULT_CSV = '/data/sft_mask-turns.csv';
|
| 200 |
const CSV_PATHS = [
|
| 201 |
DEFAULT_CSV,
|
| 202 |
+
'./assets/data/sft_mask-turns.csv',
|
| 203 |
+
'../assets/data/sft_mask-turns.csv',
|
| 204 |
+
'../../assets/data/sft_mask-turns.csv'
|
| 205 |
];
|
| 206 |
|
| 207 |
const fetchFirstAvailable = async (paths) => {
|
|
|
|
| 209 |
try {
|
| 210 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 211 |
if (r.ok) return await r.text();
|
| 212 |
+
} catch (_) { }
|
| 213 |
}
|
| 214 |
throw new Error('CSV not found at any path');
|
| 215 |
};
|
|
|
|
| 346 |
.attr('fill', d => colorScale(d.mask))
|
| 347 |
.attr('opacity', d => hiddenSeries.has(d.mask) ? 0.1 : 1)
|
| 348 |
.style('cursor', 'pointer')
|
| 349 |
+
.on('mouseenter', function (event, d) {
|
| 350 |
if (hiddenSeries.has(d.mask)) return;
|
| 351 |
d3.select(this).attr('opacity', 0.8);
|
| 352 |
tipInner.innerHTML = `<strong>${d.benchmark}</strong><br/>${maskLabels[d.mask]}<br/>Score: ${d.value.toFixed(2)}%`;
|
|
|
|
| 354 |
const [mx, my] = d3.pointer(event, container);
|
| 355 |
tip.style.transform = `translate(${mx + 12}px, ${my - 12}px)`;
|
| 356 |
})
|
| 357 |
+
.on('mouseleave', function (event, d) {
|
| 358 |
d3.select(this).attr('opacity', hiddenSeries.has(d.mask) ? 0.1 : 1);
|
| 359 |
tip.style.opacity = '0';
|
| 360 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
|
|
|
| 521 |
ensureD3(bootstrap);
|
| 522 |
}
|
| 523 |
})();
|
| 524 |
+
</script>
|
app/src/content/embeds/d3-sft-mid-train.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
|
| 24 |
.d3-sft-mid-train .grid line {
|
| 25 |
stroke: var(--grid-color);
|
| 26 |
-
stroke-dasharray: 2,2;
|
| 27 |
}
|
| 28 |
|
| 29 |
.d3-sft-mid-train .bar {
|
|
@@ -153,10 +153,10 @@
|
|
| 153 |
|
| 154 |
// Data loading helpers
|
| 155 |
const CSV_PATHS = [
|
| 156 |
-
'/data/
|
| 157 |
-
'./assets/data/
|
| 158 |
-
'../assets/data/
|
| 159 |
-
'../../assets/data/
|
| 160 |
];
|
| 161 |
|
| 162 |
const fetchFirstAvailable = async (paths) => {
|
|
@@ -164,7 +164,7 @@
|
|
| 164 |
try {
|
| 165 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 166 |
if (r.ok) return await r.text();
|
| 167 |
-
} catch (_) {}
|
| 168 |
}
|
| 169 |
throw new Error('CSV not found at any of the specified paths');
|
| 170 |
};
|
|
@@ -352,18 +352,18 @@
|
|
| 352 |
|
| 353 |
// Hover interactions
|
| 354 |
groupsMerge.selectAll('rect.bar')
|
| 355 |
-
.on('mouseenter', function(event, d) {
|
| 356 |
const benchmark = d3.select(this.parentNode).datum().benchmark;
|
| 357 |
tipInner.innerHTML = `<strong>${d.subset}</strong><br/>${benchmark}: <strong>${d.value.toFixed(1)}</strong>`;
|
| 358 |
tip.classList.add('visible');
|
| 359 |
})
|
| 360 |
-
.on('mousemove', function(event) {
|
| 361 |
const [mx, my] = d3.pointer(event, container);
|
| 362 |
const offsetX = 10;
|
| 363 |
const offsetY = -10;
|
| 364 |
tip.style.transform = `translate(${mx + offsetX}px, ${my + offsetY}px)`;
|
| 365 |
})
|
| 366 |
-
.on('mouseleave', function() {
|
| 367 |
tip.classList.remove('visible');
|
| 368 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 369 |
});
|
|
@@ -431,4 +431,4 @@
|
|
| 431 |
ensureD3(bootstrap);
|
| 432 |
}
|
| 433 |
})();
|
| 434 |
-
</script>
|
|
|
|
| 23 |
|
| 24 |
.d3-sft-mid-train .grid line {
|
| 25 |
stroke: var(--grid-color);
|
| 26 |
+
stroke-dasharray: 2, 2;
|
| 27 |
}
|
| 28 |
|
| 29 |
.d3-sft-mid-train .bar {
|
|
|
|
| 153 |
|
| 154 |
// Data loading helpers
|
| 155 |
const CSV_PATHS = [
|
| 156 |
+
'/data/sft-midtrain.csv',
|
| 157 |
+
'./assets/data/sft-midtrain.csv',
|
| 158 |
+
'../assets/data/sft-midtrain.csv',
|
| 159 |
+
'../../assets/data/sft-midtrain.csv'
|
| 160 |
];
|
| 161 |
|
| 162 |
const fetchFirstAvailable = async (paths) => {
|
|
|
|
| 164 |
try {
|
| 165 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 166 |
if (r.ok) return await r.text();
|
| 167 |
+
} catch (_) { }
|
| 168 |
}
|
| 169 |
throw new Error('CSV not found at any of the specified paths');
|
| 170 |
};
|
|
|
|
| 352 |
|
| 353 |
// Hover interactions
|
| 354 |
groupsMerge.selectAll('rect.bar')
|
| 355 |
+
.on('mouseenter', function (event, d) {
|
| 356 |
const benchmark = d3.select(this.parentNode).datum().benchmark;
|
| 357 |
tipInner.innerHTML = `<strong>${d.subset}</strong><br/>${benchmark}: <strong>${d.value.toFixed(1)}</strong>`;
|
| 358 |
tip.classList.add('visible');
|
| 359 |
})
|
| 360 |
+
.on('mousemove', function (event) {
|
| 361 |
const [mx, my] = d3.pointer(event, container);
|
| 362 |
const offsetX = 10;
|
| 363 |
const offsetY = -10;
|
| 364 |
tip.style.transform = `translate(${mx + offsetX}px, ${my + offsetY}px)`;
|
| 365 |
})
|
| 366 |
+
.on('mouseleave', function () {
|
| 367 |
tip.classList.remove('visible');
|
| 368 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 369 |
});
|
|
|
|
| 431 |
ensureD3(bootstrap);
|
| 432 |
}
|
| 433 |
})();
|
| 434 |
+
</script>
|
app/src/content/embeds/d3-sft-packing-runtime.html
CHANGED
|
@@ -6,29 +6,36 @@
|
|
| 6 |
min-height: 320px;
|
| 7 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 8 |
}
|
|
|
|
| 9 |
.d3-sft-packing-runtime svg {
|
| 10 |
display: block;
|
| 11 |
width: 100%;
|
| 12 |
}
|
|
|
|
| 13 |
.d3-sft-packing-runtime .axes path,
|
| 14 |
.d3-sft-packing-runtime .axes line {
|
| 15 |
stroke: var(--axis-color);
|
| 16 |
}
|
|
|
|
| 17 |
.d3-sft-packing-runtime .axes text {
|
| 18 |
fill: var(--tick-color);
|
| 19 |
font-size: 11px;
|
| 20 |
}
|
|
|
|
| 21 |
.d3-sft-packing-runtime .grid line {
|
| 22 |
stroke: var(--grid-color);
|
| 23 |
-
stroke-dasharray: 2,2;
|
| 24 |
}
|
|
|
|
| 25 |
.d3-sft-packing-runtime .bar {
|
| 26 |
cursor: pointer;
|
| 27 |
transition: opacity 0.15s ease;
|
| 28 |
}
|
|
|
|
| 29 |
.d3-sft-packing-runtime .bar:hover {
|
| 30 |
opacity: 0.85;
|
| 31 |
}
|
|
|
|
| 32 |
.d3-sft-packing-runtime .axis-label {
|
| 33 |
fill: var(--text-color);
|
| 34 |
font-size: 12px;
|
|
@@ -42,16 +49,19 @@
|
|
| 42 |
gap: 6px;
|
| 43 |
margin-top: 12px;
|
| 44 |
}
|
|
|
|
| 45 |
.d3-sft-packing-runtime .legend-title {
|
| 46 |
font-size: 12px;
|
| 47 |
font-weight: 700;
|
| 48 |
color: var(--text-color);
|
| 49 |
}
|
|
|
|
| 50 |
.d3-sft-packing-runtime .legend .items {
|
| 51 |
display: flex;
|
| 52 |
flex-wrap: wrap;
|
| 53 |
gap: 8px 14px;
|
| 54 |
}
|
|
|
|
| 55 |
.d3-sft-packing-runtime .legend .item {
|
| 56 |
display: inline-flex;
|
| 57 |
align-items: center;
|
|
@@ -62,9 +72,11 @@
|
|
| 62 |
cursor: pointer;
|
| 63 |
transition: opacity 0.15s ease;
|
| 64 |
}
|
|
|
|
| 65 |
.d3-sft-packing-runtime .legend .item:hover {
|
| 66 |
opacity: 0.7;
|
| 67 |
}
|
|
|
|
| 68 |
.d3-sft-packing-runtime .legend .swatch {
|
| 69 |
width: 14px;
|
| 70 |
height: 14px;
|
|
@@ -85,17 +97,20 @@
|
|
| 85 |
border: 1px solid var(--border-color);
|
| 86 |
background: var(--surface-bg);
|
| 87 |
color: var(--text-color);
|
| 88 |
-
box-shadow: 0 4px 24px rgba(0,0,0,.18);
|
| 89 |
opacity: 0;
|
| 90 |
transition: opacity .12s ease;
|
| 91 |
}
|
|
|
|
| 92 |
.d3-sft-packing-runtime .d3-tooltip__inner {
|
| 93 |
text-align: left;
|
| 94 |
}
|
|
|
|
| 95 |
.d3-sft-packing-runtime .d3-tooltip .label {
|
| 96 |
font-weight: 700;
|
| 97 |
margin-bottom: 2px;
|
| 98 |
}
|
|
|
|
| 99 |
.d3-sft-packing-runtime .d3-tooltip .value {
|
| 100 |
color: var(--muted-color);
|
| 101 |
}
|
|
@@ -165,9 +180,9 @@
|
|
| 165 |
if (attr && attr.trim()) {
|
| 166 |
providedData = attr.trim().startsWith('[') ? JSON.parse(attr) : attr.trim();
|
| 167 |
}
|
| 168 |
-
} catch(_) {}
|
| 169 |
|
| 170 |
-
const DEFAULT_CSV = '/data/
|
| 171 |
const ensureDataPrefix = (p) => {
|
| 172 |
if (typeof p !== 'string' || !p) return p;
|
| 173 |
// If path doesn't start with / or ./, add /data/ prefix
|
|
@@ -183,18 +198,18 @@
|
|
| 183 |
const CSV_PATHS = Array.isArray(providedData)
|
| 184 |
? normalizeInput(providedData)
|
| 185 |
: (typeof providedData === 'string' ? normalizeInput(providedData) || [DEFAULT_CSV] : [
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
|
| 192 |
const fetchFirstAvailable = async (paths) => {
|
| 193 |
for (const p of paths) {
|
| 194 |
try {
|
| 195 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 196 |
if (r.ok) return await r.text();
|
| 197 |
-
} catch(_) {}
|
| 198 |
}
|
| 199 |
throw new Error('CSV not found at any of: ' + paths.join(', '));
|
| 200 |
};
|
|
@@ -304,7 +319,7 @@
|
|
| 304 |
const barsEnter = bars.enter()
|
| 305 |
.append('rect')
|
| 306 |
.attr('class', 'bar')
|
| 307 |
-
.on('mouseenter', function(event, d) {
|
| 308 |
const [mx, my] = d3.pointer(event, container);
|
| 309 |
tipInner.innerHTML = `
|
| 310 |
<div class="label">${d.packing} - Batch Size ${d.batchSize}</div>
|
|
@@ -313,7 +328,7 @@
|
|
| 313 |
tip.style.opacity = '1';
|
| 314 |
tip.style.transform = `translate(${mx + 12}px, ${my - 12}px)`;
|
| 315 |
})
|
| 316 |
-
.on('mouseleave', function() {
|
| 317 |
tip.style.opacity = '0';
|
| 318 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 319 |
});
|
|
@@ -422,4 +437,4 @@
|
|
| 422 |
ensureD3(bootstrap);
|
| 423 |
}
|
| 424 |
})();
|
| 425 |
-
</script>
|
|
|
|
| 6 |
min-height: 320px;
|
| 7 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 8 |
}
|
| 9 |
+
|
| 10 |
.d3-sft-packing-runtime svg {
|
| 11 |
display: block;
|
| 12 |
width: 100%;
|
| 13 |
}
|
| 14 |
+
|
| 15 |
.d3-sft-packing-runtime .axes path,
|
| 16 |
.d3-sft-packing-runtime .axes line {
|
| 17 |
stroke: var(--axis-color);
|
| 18 |
}
|
| 19 |
+
|
| 20 |
.d3-sft-packing-runtime .axes text {
|
| 21 |
fill: var(--tick-color);
|
| 22 |
font-size: 11px;
|
| 23 |
}
|
| 24 |
+
|
| 25 |
.d3-sft-packing-runtime .grid line {
|
| 26 |
stroke: var(--grid-color);
|
| 27 |
+
stroke-dasharray: 2, 2;
|
| 28 |
}
|
| 29 |
+
|
| 30 |
.d3-sft-packing-runtime .bar {
|
| 31 |
cursor: pointer;
|
| 32 |
transition: opacity 0.15s ease;
|
| 33 |
}
|
| 34 |
+
|
| 35 |
.d3-sft-packing-runtime .bar:hover {
|
| 36 |
opacity: 0.85;
|
| 37 |
}
|
| 38 |
+
|
| 39 |
.d3-sft-packing-runtime .axis-label {
|
| 40 |
fill: var(--text-color);
|
| 41 |
font-size: 12px;
|
|
|
|
| 49 |
gap: 6px;
|
| 50 |
margin-top: 12px;
|
| 51 |
}
|
| 52 |
+
|
| 53 |
.d3-sft-packing-runtime .legend-title {
|
| 54 |
font-size: 12px;
|
| 55 |
font-weight: 700;
|
| 56 |
color: var(--text-color);
|
| 57 |
}
|
| 58 |
+
|
| 59 |
.d3-sft-packing-runtime .legend .items {
|
| 60 |
display: flex;
|
| 61 |
flex-wrap: wrap;
|
| 62 |
gap: 8px 14px;
|
| 63 |
}
|
| 64 |
+
|
| 65 |
.d3-sft-packing-runtime .legend .item {
|
| 66 |
display: inline-flex;
|
| 67 |
align-items: center;
|
|
|
|
| 72 |
cursor: pointer;
|
| 73 |
transition: opacity 0.15s ease;
|
| 74 |
}
|
| 75 |
+
|
| 76 |
.d3-sft-packing-runtime .legend .item:hover {
|
| 77 |
opacity: 0.7;
|
| 78 |
}
|
| 79 |
+
|
| 80 |
.d3-sft-packing-runtime .legend .swatch {
|
| 81 |
width: 14px;
|
| 82 |
height: 14px;
|
|
|
|
| 97 |
border: 1px solid var(--border-color);
|
| 98 |
background: var(--surface-bg);
|
| 99 |
color: var(--text-color);
|
| 100 |
+
box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
|
| 101 |
opacity: 0;
|
| 102 |
transition: opacity .12s ease;
|
| 103 |
}
|
| 104 |
+
|
| 105 |
.d3-sft-packing-runtime .d3-tooltip__inner {
|
| 106 |
text-align: left;
|
| 107 |
}
|
| 108 |
+
|
| 109 |
.d3-sft-packing-runtime .d3-tooltip .label {
|
| 110 |
font-weight: 700;
|
| 111 |
margin-bottom: 2px;
|
| 112 |
}
|
| 113 |
+
|
| 114 |
.d3-sft-packing-runtime .d3-tooltip .value {
|
| 115 |
color: var(--muted-color);
|
| 116 |
}
|
|
|
|
| 180 |
if (attr && attr.trim()) {
|
| 181 |
providedData = attr.trim().startsWith('[') ? JSON.parse(attr) : attr.trim();
|
| 182 |
}
|
| 183 |
+
} catch (_) { }
|
| 184 |
|
| 185 |
+
const DEFAULT_CSV = '/data/sft-packing-vs-no-packing-runtime.csv';
|
| 186 |
const ensureDataPrefix = (p) => {
|
| 187 |
if (typeof p !== 'string' || !p) return p;
|
| 188 |
// If path doesn't start with / or ./, add /data/ prefix
|
|
|
|
| 198 |
const CSV_PATHS = Array.isArray(providedData)
|
| 199 |
? normalizeInput(providedData)
|
| 200 |
: (typeof providedData === 'string' ? normalizeInput(providedData) || [DEFAULT_CSV] : [
|
| 201 |
+
DEFAULT_CSV,
|
| 202 |
+
'./assets/data/tech_report/sft-packing-vs-no-packing-runtime.csv',
|
| 203 |
+
'../assets/data/tech_report/sft-packing-vs-no-packing-runtime.csv',
|
| 204 |
+
'../../assets/data/tech_report/sft-packing-vs-no-packing-runtime.csv'
|
| 205 |
+
]);
|
| 206 |
|
| 207 |
const fetchFirstAvailable = async (paths) => {
|
| 208 |
for (const p of paths) {
|
| 209 |
try {
|
| 210 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 211 |
if (r.ok) return await r.text();
|
| 212 |
+
} catch (_) { }
|
| 213 |
}
|
| 214 |
throw new Error('CSV not found at any of: ' + paths.join(', '));
|
| 215 |
};
|
|
|
|
| 319 |
const barsEnter = bars.enter()
|
| 320 |
.append('rect')
|
| 321 |
.attr('class', 'bar')
|
| 322 |
+
.on('mouseenter', function (event, d) {
|
| 323 |
const [mx, my] = d3.pointer(event, container);
|
| 324 |
tipInner.innerHTML = `
|
| 325 |
<div class="label">${d.packing} - Batch Size ${d.batchSize}</div>
|
|
|
|
| 328 |
tip.style.opacity = '1';
|
| 329 |
tip.style.transform = `translate(${mx + 12}px, ${my - 12}px)`;
|
| 330 |
})
|
| 331 |
+
.on('mouseleave', function () {
|
| 332 |
tip.style.opacity = '0';
|
| 333 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 334 |
});
|
|
|
|
| 437 |
ensureD3(bootstrap);
|
| 438 |
}
|
| 439 |
})();
|
| 440 |
+
</script>
|
app/src/content/embeds/d3-sft-packing-tokens.html
CHANGED
|
@@ -6,29 +6,36 @@
|
|
| 6 |
min-height: 320px;
|
| 7 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 8 |
}
|
|
|
|
| 9 |
.d3-sft-packing-tokens svg {
|
| 10 |
display: block;
|
| 11 |
width: 100%;
|
| 12 |
}
|
|
|
|
| 13 |
.d3-sft-packing-tokens .axes path,
|
| 14 |
.d3-sft-packing-tokens .axes line {
|
| 15 |
stroke: var(--axis-color);
|
| 16 |
}
|
|
|
|
| 17 |
.d3-sft-packing-tokens .axes text {
|
| 18 |
fill: var(--tick-color);
|
| 19 |
font-size: 11px;
|
| 20 |
}
|
|
|
|
| 21 |
.d3-sft-packing-tokens .grid line {
|
| 22 |
stroke: var(--grid-color);
|
| 23 |
-
stroke-dasharray: 2,2;
|
| 24 |
}
|
|
|
|
| 25 |
.d3-sft-packing-tokens .bar {
|
| 26 |
cursor: pointer;
|
| 27 |
transition: opacity 0.15s ease;
|
| 28 |
}
|
|
|
|
| 29 |
.d3-sft-packing-tokens .bar:hover {
|
| 30 |
opacity: 0.85;
|
| 31 |
}
|
|
|
|
| 32 |
.d3-sft-packing-tokens .axis-label {
|
| 33 |
fill: var(--text-color);
|
| 34 |
font-size: 12px;
|
|
@@ -42,16 +49,19 @@
|
|
| 42 |
gap: 6px;
|
| 43 |
margin-top: 12px;
|
| 44 |
}
|
|
|
|
| 45 |
.d3-sft-packing-tokens .legend-title {
|
| 46 |
font-size: 12px;
|
| 47 |
font-weight: 700;
|
| 48 |
color: var(--text-color);
|
| 49 |
}
|
|
|
|
| 50 |
.d3-sft-packing-tokens .legend .items {
|
| 51 |
display: flex;
|
| 52 |
flex-wrap: wrap;
|
| 53 |
gap: 8px 14px;
|
| 54 |
}
|
|
|
|
| 55 |
.d3-sft-packing-tokens .legend .item {
|
| 56 |
display: inline-flex;
|
| 57 |
align-items: center;
|
|
@@ -62,9 +72,11 @@
|
|
| 62 |
cursor: pointer;
|
| 63 |
transition: opacity 0.15s ease;
|
| 64 |
}
|
|
|
|
| 65 |
.d3-sft-packing-tokens .legend .item:hover {
|
| 66 |
opacity: 0.7;
|
| 67 |
}
|
|
|
|
| 68 |
.d3-sft-packing-tokens .legend .swatch {
|
| 69 |
width: 14px;
|
| 70 |
height: 14px;
|
|
@@ -85,17 +97,20 @@
|
|
| 85 |
border: 1px solid var(--border-color);
|
| 86 |
background: var(--surface-bg);
|
| 87 |
color: var(--text-color);
|
| 88 |
-
box-shadow: 0 4px 24px rgba(0,0,0,.18);
|
| 89 |
opacity: 0;
|
| 90 |
transition: opacity .12s ease;
|
| 91 |
}
|
|
|
|
| 92 |
.d3-sft-packing-tokens .d3-tooltip__inner {
|
| 93 |
text-align: left;
|
| 94 |
}
|
|
|
|
| 95 |
.d3-sft-packing-tokens .d3-tooltip .label {
|
| 96 |
font-weight: 700;
|
| 97 |
margin-bottom: 2px;
|
| 98 |
}
|
|
|
|
| 99 |
.d3-sft-packing-tokens .d3-tooltip .value {
|
| 100 |
color: var(--muted-color);
|
| 101 |
}
|
|
@@ -165,9 +180,9 @@
|
|
| 165 |
if (attr && attr.trim()) {
|
| 166 |
providedData = attr.trim().startsWith('[') ? JSON.parse(attr) : attr.trim();
|
| 167 |
}
|
| 168 |
-
} catch(_) {}
|
| 169 |
|
| 170 |
-
const DEFAULT_CSV = '/data/
|
| 171 |
const ensureDataPrefix = (p) => {
|
| 172 |
if (typeof p !== 'string' || !p) return p;
|
| 173 |
// If path doesn't start with / or ./, add /data/ prefix
|
|
@@ -183,18 +198,18 @@
|
|
| 183 |
const CSV_PATHS = Array.isArray(providedData)
|
| 184 |
? normalizeInput(providedData)
|
| 185 |
: (typeof providedData === 'string' ? normalizeInput(providedData) || [DEFAULT_CSV] : [
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
|
| 192 |
const fetchFirstAvailable = async (paths) => {
|
| 193 |
for (const p of paths) {
|
| 194 |
try {
|
| 195 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 196 |
if (r.ok) return await r.text();
|
| 197 |
-
} catch(_) {}
|
| 198 |
}
|
| 199 |
throw new Error('CSV not found at any of: ' + paths.join(', '));
|
| 200 |
};
|
|
@@ -304,7 +319,7 @@
|
|
| 304 |
const barsEnter = bars.enter()
|
| 305 |
.append('rect')
|
| 306 |
.attr('class', 'bar')
|
| 307 |
-
.on('mouseenter', function(event, d) {
|
| 308 |
const [mx, my] = d3.pointer(event, container);
|
| 309 |
tipInner.innerHTML = `
|
| 310 |
<div class="label">${d.packing} - Batch Size ${d.batchSize}</div>
|
|
@@ -314,7 +329,7 @@
|
|
| 314 |
tip.style.opacity = '1';
|
| 315 |
tip.style.transform = `translate(${mx + 12}px, ${my - 12}px)`;
|
| 316 |
})
|
| 317 |
-
.on('mouseleave', function() {
|
| 318 |
tip.style.opacity = '0';
|
| 319 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 320 |
});
|
|
@@ -423,4 +438,4 @@
|
|
| 423 |
ensureD3(bootstrap);
|
| 424 |
}
|
| 425 |
})();
|
| 426 |
-
</script>
|
|
|
|
| 6 |
min-height: 320px;
|
| 7 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 8 |
}
|
| 9 |
+
|
| 10 |
.d3-sft-packing-tokens svg {
|
| 11 |
display: block;
|
| 12 |
width: 100%;
|
| 13 |
}
|
| 14 |
+
|
| 15 |
.d3-sft-packing-tokens .axes path,
|
| 16 |
.d3-sft-packing-tokens .axes line {
|
| 17 |
stroke: var(--axis-color);
|
| 18 |
}
|
| 19 |
+
|
| 20 |
.d3-sft-packing-tokens .axes text {
|
| 21 |
fill: var(--tick-color);
|
| 22 |
font-size: 11px;
|
| 23 |
}
|
| 24 |
+
|
| 25 |
.d3-sft-packing-tokens .grid line {
|
| 26 |
stroke: var(--grid-color);
|
| 27 |
+
stroke-dasharray: 2, 2;
|
| 28 |
}
|
| 29 |
+
|
| 30 |
.d3-sft-packing-tokens .bar {
|
| 31 |
cursor: pointer;
|
| 32 |
transition: opacity 0.15s ease;
|
| 33 |
}
|
| 34 |
+
|
| 35 |
.d3-sft-packing-tokens .bar:hover {
|
| 36 |
opacity: 0.85;
|
| 37 |
}
|
| 38 |
+
|
| 39 |
.d3-sft-packing-tokens .axis-label {
|
| 40 |
fill: var(--text-color);
|
| 41 |
font-size: 12px;
|
|
|
|
| 49 |
gap: 6px;
|
| 50 |
margin-top: 12px;
|
| 51 |
}
|
| 52 |
+
|
| 53 |
.d3-sft-packing-tokens .legend-title {
|
| 54 |
font-size: 12px;
|
| 55 |
font-weight: 700;
|
| 56 |
color: var(--text-color);
|
| 57 |
}
|
| 58 |
+
|
| 59 |
.d3-sft-packing-tokens .legend .items {
|
| 60 |
display: flex;
|
| 61 |
flex-wrap: wrap;
|
| 62 |
gap: 8px 14px;
|
| 63 |
}
|
| 64 |
+
|
| 65 |
.d3-sft-packing-tokens .legend .item {
|
| 66 |
display: inline-flex;
|
| 67 |
align-items: center;
|
|
|
|
| 72 |
cursor: pointer;
|
| 73 |
transition: opacity 0.15s ease;
|
| 74 |
}
|
| 75 |
+
|
| 76 |
.d3-sft-packing-tokens .legend .item:hover {
|
| 77 |
opacity: 0.7;
|
| 78 |
}
|
| 79 |
+
|
| 80 |
.d3-sft-packing-tokens .legend .swatch {
|
| 81 |
width: 14px;
|
| 82 |
height: 14px;
|
|
|
|
| 97 |
border: 1px solid var(--border-color);
|
| 98 |
background: var(--surface-bg);
|
| 99 |
color: var(--text-color);
|
| 100 |
+
box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
|
| 101 |
opacity: 0;
|
| 102 |
transition: opacity .12s ease;
|
| 103 |
}
|
| 104 |
+
|
| 105 |
.d3-sft-packing-tokens .d3-tooltip__inner {
|
| 106 |
text-align: left;
|
| 107 |
}
|
| 108 |
+
|
| 109 |
.d3-sft-packing-tokens .d3-tooltip .label {
|
| 110 |
font-weight: 700;
|
| 111 |
margin-bottom: 2px;
|
| 112 |
}
|
| 113 |
+
|
| 114 |
.d3-sft-packing-tokens .d3-tooltip .value {
|
| 115 |
color: var(--muted-color);
|
| 116 |
}
|
|
|
|
| 180 |
if (attr && attr.trim()) {
|
| 181 |
providedData = attr.trim().startsWith('[') ? JSON.parse(attr) : attr.trim();
|
| 182 |
}
|
| 183 |
+
} catch (_) { }
|
| 184 |
|
| 185 |
+
const DEFAULT_CSV = '/data/sft-packing-vs-no-packing-tokens.csv';
|
| 186 |
const ensureDataPrefix = (p) => {
|
| 187 |
if (typeof p !== 'string' || !p) return p;
|
| 188 |
// If path doesn't start with / or ./, add /data/ prefix
|
|
|
|
| 198 |
const CSV_PATHS = Array.isArray(providedData)
|
| 199 |
? normalizeInput(providedData)
|
| 200 |
: (typeof providedData === 'string' ? normalizeInput(providedData) || [DEFAULT_CSV] : [
|
| 201 |
+
DEFAULT_CSV,
|
| 202 |
+
'./assets/data/tech_report/sft-packing-vs-no-packing-tokens.csv',
|
| 203 |
+
'../assets/data/tech_report/sft-packing-vs-no-packing-tokens.csv',
|
| 204 |
+
'../../assets/data/tech_report/sft-packing-vs-no-packing-tokens.csv'
|
| 205 |
+
]);
|
| 206 |
|
| 207 |
const fetchFirstAvailable = async (paths) => {
|
| 208 |
for (const p of paths) {
|
| 209 |
try {
|
| 210 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 211 |
if (r.ok) return await r.text();
|
| 212 |
+
} catch (_) { }
|
| 213 |
}
|
| 214 |
throw new Error('CSV not found at any of: ' + paths.join(', '));
|
| 215 |
};
|
|
|
|
| 319 |
const barsEnter = bars.enter()
|
| 320 |
.append('rect')
|
| 321 |
.attr('class', 'bar')
|
| 322 |
+
.on('mouseenter', function (event, d) {
|
| 323 |
const [mx, my] = d3.pointer(event, container);
|
| 324 |
tipInner.innerHTML = `
|
| 325 |
<div class="label">${d.packing} - Batch Size ${d.batchSize}</div>
|
|
|
|
| 329 |
tip.style.opacity = '1';
|
| 330 |
tip.style.transform = `translate(${mx + 12}px, ${my - 12}px)`;
|
| 331 |
})
|
| 332 |
+
.on('mouseleave', function () {
|
| 333 |
tip.style.opacity = '0';
|
| 334 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 335 |
});
|
|
|
|
| 438 |
ensureD3(bootstrap);
|
| 439 |
}
|
| 440 |
})();
|
| 441 |
+
</script>
|
app/src/content/embeds/d3-sft-packing-vs-bs.html
CHANGED
|
@@ -5,50 +5,60 @@
|
|
| 5 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 6 |
position: relative;
|
| 7 |
}
|
|
|
|
| 8 |
.d3-sft-packing-vs-bs svg {
|
| 9 |
display: block;
|
| 10 |
overflow: visible;
|
| 11 |
}
|
|
|
|
| 12 |
.d3-sft-packing-vs-bs .axes path,
|
| 13 |
.d3-sft-packing-vs-bs .axes line {
|
| 14 |
stroke: var(--axis-color);
|
| 15 |
shape-rendering: crispEdges;
|
| 16 |
}
|
|
|
|
| 17 |
.d3-sft-packing-vs-bs .axes text {
|
| 18 |
fill: var(--tick-color);
|
| 19 |
font-size: 11px;
|
| 20 |
}
|
|
|
|
| 21 |
.d3-sft-packing-vs-bs .grid line {
|
| 22 |
stroke: var(--grid-color);
|
| 23 |
-
stroke-dasharray: 2,2;
|
| 24 |
shape-rendering: crispEdges;
|
| 25 |
}
|
|
|
|
| 26 |
.d3-sft-packing-vs-bs .axis-label {
|
| 27 |
fill: var(--text-color);
|
| 28 |
font-size: 12px;
|
| 29 |
font-weight: 600;
|
| 30 |
}
|
|
|
|
| 31 |
.d3-sft-packing-vs-bs .line-think {
|
| 32 |
fill: none;
|
| 33 |
stroke-width: 2.5;
|
| 34 |
stroke-linecap: round;
|
| 35 |
stroke-linejoin: round;
|
| 36 |
}
|
|
|
|
| 37 |
.d3-sft-packing-vs-bs .line-no-think {
|
| 38 |
fill: none;
|
| 39 |
stroke-width: 2.5;
|
| 40 |
stroke-linecap: round;
|
| 41 |
stroke-linejoin: round;
|
| 42 |
}
|
|
|
|
| 43 |
.d3-sft-packing-vs-bs .line-no-packing {
|
| 44 |
fill: none;
|
| 45 |
stroke-width: 2;
|
| 46 |
-
stroke-dasharray: 4,4;
|
| 47 |
}
|
|
|
|
| 48 |
.d3-sft-packing-vs-bs .dot {
|
| 49 |
stroke: var(--surface-bg);
|
| 50 |
stroke-width: 2;
|
| 51 |
}
|
|
|
|
| 52 |
.d3-sft-packing-vs-bs .header {
|
| 53 |
display: flex;
|
| 54 |
align-items: flex-start;
|
|
@@ -57,22 +67,26 @@
|
|
| 57 |
margin-top: 16px;
|
| 58 |
flex-wrap: wrap;
|
| 59 |
}
|
|
|
|
| 60 |
.d3-sft-packing-vs-bs .legend {
|
| 61 |
display: flex;
|
| 62 |
flex-direction: column;
|
| 63 |
align-items: flex-start;
|
| 64 |
gap: 6px;
|
| 65 |
}
|
|
|
|
| 66 |
.d3-sft-packing-vs-bs .legend-title {
|
| 67 |
font-size: 12px;
|
| 68 |
font-weight: 700;
|
| 69 |
color: var(--text-color);
|
| 70 |
}
|
|
|
|
| 71 |
.d3-sft-packing-vs-bs .legend .items {
|
| 72 |
display: flex;
|
| 73 |
flex-wrap: wrap;
|
| 74 |
gap: 8px 14px;
|
| 75 |
}
|
|
|
|
| 76 |
.d3-sft-packing-vs-bs .legend .item {
|
| 77 |
display: inline-flex;
|
| 78 |
align-items: center;
|
|
@@ -81,29 +95,31 @@
|
|
| 81 |
font-size: 12px;
|
| 82 |
color: var(--text-color);
|
| 83 |
}
|
|
|
|
| 84 |
.d3-sft-packing-vs-bs .legend .swatch {
|
| 85 |
width: 14px;
|
| 86 |
height: 14px;
|
| 87 |
border-radius: 3px;
|
| 88 |
border: 1px solid var(--border-color);
|
| 89 |
}
|
|
|
|
| 90 |
.d3-sft-packing-vs-bs .legend .swatch-line {
|
| 91 |
width: 20px;
|
| 92 |
height: 2px;
|
| 93 |
border: none;
|
| 94 |
}
|
|
|
|
| 95 |
.d3-sft-packing-vs-bs .legend .swatch-dashed {
|
| 96 |
width: 20px;
|
| 97 |
height: 2px;
|
| 98 |
border: none;
|
| 99 |
-
background: repeating-linear-gradient(
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
transparent 8px
|
| 105 |
-
);
|
| 106 |
}
|
|
|
|
| 107 |
.d3-sft-packing-vs-bs .controls {
|
| 108 |
display: flex;
|
| 109 |
gap: 16px;
|
|
@@ -111,17 +127,20 @@
|
|
| 111 |
justify-content: flex-end;
|
| 112 |
flex-wrap: wrap;
|
| 113 |
}
|
|
|
|
| 114 |
.d3-sft-packing-vs-bs .control-group {
|
| 115 |
display: flex;
|
| 116 |
flex-direction: column;
|
| 117 |
align-items: flex-start;
|
| 118 |
gap: 6px;
|
| 119 |
}
|
|
|
|
| 120 |
.d3-sft-packing-vs-bs .controls label {
|
| 121 |
font-size: 12px;
|
| 122 |
font-weight: 700;
|
| 123 |
color: var(--text-color);
|
| 124 |
}
|
|
|
|
| 125 |
.d3-sft-packing-vs-bs .controls select {
|
| 126 |
font-size: 12px;
|
| 127 |
padding: 8px 28px 8px 10px;
|
|
@@ -135,6 +154,7 @@
|
|
| 135 |
background-repeat: no-repeat;
|
| 136 |
background-position: right 8px center;
|
| 137 |
}
|
|
|
|
| 138 |
.d3-sft-packing-vs-bs .controls select:focus {
|
| 139 |
outline: 2px solid var(--primary-color);
|
| 140 |
outline-offset: 2px;
|
|
@@ -173,10 +193,10 @@
|
|
| 173 |
}
|
| 174 |
|
| 175 |
const CSV_PATHS = [
|
| 176 |
-
'/data/
|
| 177 |
-
'./assets/data/
|
| 178 |
-
'../assets/data/
|
| 179 |
-
'../../assets/data/
|
| 180 |
];
|
| 181 |
|
| 182 |
const fetchFirstAvailable = async (paths) => {
|
|
@@ -184,7 +204,7 @@
|
|
| 184 |
try {
|
| 185 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 186 |
if (r.ok) return await r.text();
|
| 187 |
-
} catch(_){}
|
| 188 |
}
|
| 189 |
throw new Error('CSV not found in any of the expected locations');
|
| 190 |
};
|
|
@@ -594,4 +614,4 @@
|
|
| 594 |
ensureD3(bootstrap);
|
| 595 |
}
|
| 596 |
})();
|
| 597 |
-
</script>
|
|
|
|
| 5 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 6 |
position: relative;
|
| 7 |
}
|
| 8 |
+
|
| 9 |
.d3-sft-packing-vs-bs svg {
|
| 10 |
display: block;
|
| 11 |
overflow: visible;
|
| 12 |
}
|
| 13 |
+
|
| 14 |
.d3-sft-packing-vs-bs .axes path,
|
| 15 |
.d3-sft-packing-vs-bs .axes line {
|
| 16 |
stroke: var(--axis-color);
|
| 17 |
shape-rendering: crispEdges;
|
| 18 |
}
|
| 19 |
+
|
| 20 |
.d3-sft-packing-vs-bs .axes text {
|
| 21 |
fill: var(--tick-color);
|
| 22 |
font-size: 11px;
|
| 23 |
}
|
| 24 |
+
|
| 25 |
.d3-sft-packing-vs-bs .grid line {
|
| 26 |
stroke: var(--grid-color);
|
| 27 |
+
stroke-dasharray: 2, 2;
|
| 28 |
shape-rendering: crispEdges;
|
| 29 |
}
|
| 30 |
+
|
| 31 |
.d3-sft-packing-vs-bs .axis-label {
|
| 32 |
fill: var(--text-color);
|
| 33 |
font-size: 12px;
|
| 34 |
font-weight: 600;
|
| 35 |
}
|
| 36 |
+
|
| 37 |
.d3-sft-packing-vs-bs .line-think {
|
| 38 |
fill: none;
|
| 39 |
stroke-width: 2.5;
|
| 40 |
stroke-linecap: round;
|
| 41 |
stroke-linejoin: round;
|
| 42 |
}
|
| 43 |
+
|
| 44 |
.d3-sft-packing-vs-bs .line-no-think {
|
| 45 |
fill: none;
|
| 46 |
stroke-width: 2.5;
|
| 47 |
stroke-linecap: round;
|
| 48 |
stroke-linejoin: round;
|
| 49 |
}
|
| 50 |
+
|
| 51 |
.d3-sft-packing-vs-bs .line-no-packing {
|
| 52 |
fill: none;
|
| 53 |
stroke-width: 2;
|
| 54 |
+
stroke-dasharray: 4, 4;
|
| 55 |
}
|
| 56 |
+
|
| 57 |
.d3-sft-packing-vs-bs .dot {
|
| 58 |
stroke: var(--surface-bg);
|
| 59 |
stroke-width: 2;
|
| 60 |
}
|
| 61 |
+
|
| 62 |
.d3-sft-packing-vs-bs .header {
|
| 63 |
display: flex;
|
| 64 |
align-items: flex-start;
|
|
|
|
| 67 |
margin-top: 16px;
|
| 68 |
flex-wrap: wrap;
|
| 69 |
}
|
| 70 |
+
|
| 71 |
.d3-sft-packing-vs-bs .legend {
|
| 72 |
display: flex;
|
| 73 |
flex-direction: column;
|
| 74 |
align-items: flex-start;
|
| 75 |
gap: 6px;
|
| 76 |
}
|
| 77 |
+
|
| 78 |
.d3-sft-packing-vs-bs .legend-title {
|
| 79 |
font-size: 12px;
|
| 80 |
font-weight: 700;
|
| 81 |
color: var(--text-color);
|
| 82 |
}
|
| 83 |
+
|
| 84 |
.d3-sft-packing-vs-bs .legend .items {
|
| 85 |
display: flex;
|
| 86 |
flex-wrap: wrap;
|
| 87 |
gap: 8px 14px;
|
| 88 |
}
|
| 89 |
+
|
| 90 |
.d3-sft-packing-vs-bs .legend .item {
|
| 91 |
display: inline-flex;
|
| 92 |
align-items: center;
|
|
|
|
| 95 |
font-size: 12px;
|
| 96 |
color: var(--text-color);
|
| 97 |
}
|
| 98 |
+
|
| 99 |
.d3-sft-packing-vs-bs .legend .swatch {
|
| 100 |
width: 14px;
|
| 101 |
height: 14px;
|
| 102 |
border-radius: 3px;
|
| 103 |
border: 1px solid var(--border-color);
|
| 104 |
}
|
| 105 |
+
|
| 106 |
.d3-sft-packing-vs-bs .legend .swatch-line {
|
| 107 |
width: 20px;
|
| 108 |
height: 2px;
|
| 109 |
border: none;
|
| 110 |
}
|
| 111 |
+
|
| 112 |
.d3-sft-packing-vs-bs .legend .swatch-dashed {
|
| 113 |
width: 20px;
|
| 114 |
height: 2px;
|
| 115 |
border: none;
|
| 116 |
+
background: repeating-linear-gradient(to right,
|
| 117 |
+
var(--text-color) 0,
|
| 118 |
+
var(--text-color) 4px,
|
| 119 |
+
transparent 4px,
|
| 120 |
+
transparent 8px);
|
|
|
|
|
|
|
| 121 |
}
|
| 122 |
+
|
| 123 |
.d3-sft-packing-vs-bs .controls {
|
| 124 |
display: flex;
|
| 125 |
gap: 16px;
|
|
|
|
| 127 |
justify-content: flex-end;
|
| 128 |
flex-wrap: wrap;
|
| 129 |
}
|
| 130 |
+
|
| 131 |
.d3-sft-packing-vs-bs .control-group {
|
| 132 |
display: flex;
|
| 133 |
flex-direction: column;
|
| 134 |
align-items: flex-start;
|
| 135 |
gap: 6px;
|
| 136 |
}
|
| 137 |
+
|
| 138 |
.d3-sft-packing-vs-bs .controls label {
|
| 139 |
font-size: 12px;
|
| 140 |
font-weight: 700;
|
| 141 |
color: var(--text-color);
|
| 142 |
}
|
| 143 |
+
|
| 144 |
.d3-sft-packing-vs-bs .controls select {
|
| 145 |
font-size: 12px;
|
| 146 |
padding: 8px 28px 8px 10px;
|
|
|
|
| 154 |
background-repeat: no-repeat;
|
| 155 |
background-position: right 8px center;
|
| 156 |
}
|
| 157 |
+
|
| 158 |
.d3-sft-packing-vs-bs .controls select:focus {
|
| 159 |
outline: 2px solid var(--primary-color);
|
| 160 |
outline-offset: 2px;
|
|
|
|
| 193 |
}
|
| 194 |
|
| 195 |
const CSV_PATHS = [
|
| 196 |
+
'/data/sft_packing-vs-bs.csv',
|
| 197 |
+
'./assets/data/sft_packing-vs-bs.csv',
|
| 198 |
+
'../assets/data/sft_packing-vs-bs.csv',
|
| 199 |
+
'../../assets/data/sft_packing-vs-bs.csv'
|
| 200 |
];
|
| 201 |
|
| 202 |
const fetchFirstAvailable = async (paths) => {
|
|
|
|
| 204 |
try {
|
| 205 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 206 |
if (r.ok) return await r.text();
|
| 207 |
+
} catch (_) { }
|
| 208 |
}
|
| 209 |
throw new Error('CSV not found in any of the expected locations');
|
| 210 |
};
|
|
|
|
| 614 |
ensureD3(bootstrap);
|
| 615 |
}
|
| 616 |
})();
|
| 617 |
+
</script>
|
app/src/content/embeds/d3-sft-packing-vs-no-packing.html
CHANGED
|
@@ -140,7 +140,7 @@
|
|
| 140 |
border: 1px solid var(--border-color);
|
| 141 |
background: var(--surface-bg);
|
| 142 |
color: var(--text-color);
|
| 143 |
-
box-shadow: 0 4px 24px rgba(0,0,0,.18);
|
| 144 |
opacity: 0;
|
| 145 |
transition: opacity .12s ease;
|
| 146 |
}
|
|
@@ -216,10 +216,10 @@
|
|
| 216 |
|
| 217 |
// Data loading
|
| 218 |
const CSV_PATHS = [
|
| 219 |
-
'/data/
|
| 220 |
-
'./assets/data/
|
| 221 |
-
'../assets/data/
|
| 222 |
-
'../../assets/data/
|
| 223 |
];
|
| 224 |
|
| 225 |
const fetchFirstAvailable = async (paths) => {
|
|
@@ -227,7 +227,7 @@
|
|
| 227 |
try {
|
| 228 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 229 |
if (r.ok) return await r.text();
|
| 230 |
-
} catch (_) {}
|
| 231 |
}
|
| 232 |
throw new Error('CSV not found in any of the expected locations');
|
| 233 |
};
|
|
@@ -330,7 +330,7 @@
|
|
| 330 |
.attr('transform', d => `translate(${xBenchmark(d.benchmark)},0)`);
|
| 331 |
|
| 332 |
// Bars within each group
|
| 333 |
-
groupsMerged.each(function(groupData) {
|
| 334 |
const bars = d3.select(this)
|
| 335 |
.selectAll('.bar')
|
| 336 |
.data(groupData.values, d => d.packing);
|
|
@@ -340,14 +340,14 @@
|
|
| 340 |
.attr('x', d => xPacking(d.packing))
|
| 341 |
.attr('width', xPacking.bandwidth())
|
| 342 |
.attr('fill', d => colorMap[d.packing])
|
| 343 |
-
.on('mouseenter', function(event, d) {
|
| 344 |
const packingLabel = d.packing === 'TRUE' ? 'Packing' : 'No Packing';
|
| 345 |
tipInner.innerHTML = `<strong>${groupData.benchmark}</strong><br/>${packingLabel}: ${d.value.toFixed(2)}`;
|
| 346 |
tip.style.opacity = '1';
|
| 347 |
const [mx, my] = d3.pointer(event, container);
|
| 348 |
tip.style.transform = `translate(${mx + 12}px, ${my - 12}px)`;
|
| 349 |
})
|
| 350 |
-
.on('mouseleave', function() {
|
| 351 |
tip.style.opacity = '0';
|
| 352 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 353 |
})
|
|
@@ -509,4 +509,4 @@
|
|
| 509 |
ensureD3(bootstrap);
|
| 510 |
}
|
| 511 |
})();
|
| 512 |
-
</script>
|
|
|
|
| 140 |
border: 1px solid var(--border-color);
|
| 141 |
background: var(--surface-bg);
|
| 142 |
color: var(--text-color);
|
| 143 |
+
box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
|
| 144 |
opacity: 0;
|
| 145 |
transition: opacity .12s ease;
|
| 146 |
}
|
|
|
|
| 216 |
|
| 217 |
// Data loading
|
| 218 |
const CSV_PATHS = [
|
| 219 |
+
'/data/sft_packing-vs-no-packing.csv',
|
| 220 |
+
'./assets/data/sft_packing-vs-no-packing.csv',
|
| 221 |
+
'../assets/data/sft_packing-vs-no-packing.csv',
|
| 222 |
+
'../../assets/data/sft_packing-vs-no-packing.csv'
|
| 223 |
];
|
| 224 |
|
| 225 |
const fetchFirstAvailable = async (paths) => {
|
|
|
|
| 227 |
try {
|
| 228 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 229 |
if (r.ok) return await r.text();
|
| 230 |
+
} catch (_) { }
|
| 231 |
}
|
| 232 |
throw new Error('CSV not found in any of the expected locations');
|
| 233 |
};
|
|
|
|
| 330 |
.attr('transform', d => `translate(${xBenchmark(d.benchmark)},0)`);
|
| 331 |
|
| 332 |
// Bars within each group
|
| 333 |
+
groupsMerged.each(function (groupData) {
|
| 334 |
const bars = d3.select(this)
|
| 335 |
.selectAll('.bar')
|
| 336 |
.data(groupData.values, d => d.packing);
|
|
|
|
| 340 |
.attr('x', d => xPacking(d.packing))
|
| 341 |
.attr('width', xPacking.bandwidth())
|
| 342 |
.attr('fill', d => colorMap[d.packing])
|
| 343 |
+
.on('mouseenter', function (event, d) {
|
| 344 |
const packingLabel = d.packing === 'TRUE' ? 'Packing' : 'No Packing';
|
| 345 |
tipInner.innerHTML = `<strong>${groupData.benchmark}</strong><br/>${packingLabel}: ${d.value.toFixed(2)}`;
|
| 346 |
tip.style.opacity = '1';
|
| 347 |
const [mx, my] = d3.pointer(event, container);
|
| 348 |
tip.style.transform = `translate(${mx + 12}px, ${my - 12}px)`;
|
| 349 |
})
|
| 350 |
+
.on('mouseleave', function () {
|
| 351 |
tip.style.opacity = '0';
|
| 352 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 353 |
})
|
|
|
|
| 509 |
ensureD3(bootstrap);
|
| 510 |
}
|
| 511 |
})();
|
| 512 |
+
</script>
|
app/src/content/embeds/d3-sft-think-follow-0.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
|
| 24 |
.d3-sft-think-follow .grid line {
|
| 25 |
stroke: var(--grid-color);
|
| 26 |
-
stroke-dasharray: 2,2;
|
| 27 |
}
|
| 28 |
|
| 29 |
.d3-sft-think-follow .bar {
|
|
@@ -194,10 +194,10 @@
|
|
| 194 |
|
| 195 |
// Data loading helpers
|
| 196 |
const CSV_PATHS = [
|
| 197 |
-
'/data/
|
| 198 |
-
'./assets/data/
|
| 199 |
-
'../assets/data/
|
| 200 |
-
'../../assets/data/
|
| 201 |
];
|
| 202 |
|
| 203 |
const fetchFirstAvailable = async (paths) => {
|
|
@@ -205,7 +205,7 @@
|
|
| 205 |
try {
|
| 206 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 207 |
if (r.ok) return await r.text();
|
| 208 |
-
} catch (_) {}
|
| 209 |
}
|
| 210 |
throw new Error('CSV not found at any of the specified paths');
|
| 211 |
};
|
|
@@ -408,18 +408,18 @@
|
|
| 408 |
|
| 409 |
// Hover interactions
|
| 410 |
groupsMerge.selectAll('rect.bar')
|
| 411 |
-
.on('mouseenter', function(event, d) {
|
| 412 |
const turn = d3.select(this.parentNode).datum().turn;
|
| 413 |
tipInner.innerHTML = `<strong>${d.model}</strong><br/>${turn}: <strong>${d.value.toFixed(2)}%</strong>`;
|
| 414 |
tip.classList.add('visible');
|
| 415 |
})
|
| 416 |
-
.on('mousemove', function(event) {
|
| 417 |
const [mx, my] = d3.pointer(event, container);
|
| 418 |
const offsetX = 10;
|
| 419 |
const offsetY = -10;
|
| 420 |
tip.style.transform = `translate(${mx + offsetX}px, ${my + offsetY}px)`;
|
| 421 |
})
|
| 422 |
-
.on('mouseleave', function() {
|
| 423 |
tip.classList.remove('visible');
|
| 424 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 425 |
});
|
|
@@ -488,4 +488,4 @@
|
|
| 488 |
ensureD3(bootstrap);
|
| 489 |
}
|
| 490 |
})();
|
| 491 |
-
</script>
|
|
|
|
| 23 |
|
| 24 |
.d3-sft-think-follow .grid line {
|
| 25 |
stroke: var(--grid-color);
|
| 26 |
+
stroke-dasharray: 2, 2;
|
| 27 |
}
|
| 28 |
|
| 29 |
.d3-sft-think-follow .bar {
|
|
|
|
| 194 |
|
| 195 |
// Data loading helpers
|
| 196 |
const CSV_PATHS = [
|
| 197 |
+
'/data/sft_think-follow-0.csv',
|
| 198 |
+
'./assets/data/sft_think-follow-0.csv',
|
| 199 |
+
'../assets/data/sft_think-follow-0.csv',
|
| 200 |
+
'../../assets/data/sft_think-follow-0.csv'
|
| 201 |
];
|
| 202 |
|
| 203 |
const fetchFirstAvailable = async (paths) => {
|
|
|
|
| 205 |
try {
|
| 206 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 207 |
if (r.ok) return await r.text();
|
| 208 |
+
} catch (_) { }
|
| 209 |
}
|
| 210 |
throw new Error('CSV not found at any of the specified paths');
|
| 211 |
};
|
|
|
|
| 408 |
|
| 409 |
// Hover interactions
|
| 410 |
groupsMerge.selectAll('rect.bar')
|
| 411 |
+
.on('mouseenter', function (event, d) {
|
| 412 |
const turn = d3.select(this.parentNode).datum().turn;
|
| 413 |
tipInner.innerHTML = `<strong>${d.model}</strong><br/>${turn}: <strong>${d.value.toFixed(2)}%</strong>`;
|
| 414 |
tip.classList.add('visible');
|
| 415 |
})
|
| 416 |
+
.on('mousemove', function (event) {
|
| 417 |
const [mx, my] = d3.pointer(event, container);
|
| 418 |
const offsetX = 10;
|
| 419 |
const offsetY = -10;
|
| 420 |
tip.style.transform = `translate(${mx + offsetX}px, ${my + offsetY}px)`;
|
| 421 |
})
|
| 422 |
+
.on('mouseleave', function () {
|
| 423 |
tip.classList.remove('visible');
|
| 424 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 425 |
});
|
|
|
|
| 488 |
ensureD3(bootstrap);
|
| 489 |
}
|
| 490 |
})();
|
| 491 |
+
</script>
|
app/src/content/embeds/d3-sft-think-follow-1.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
|
| 24 |
.d3-sft-think-follow-1 .grid line {
|
| 25 |
stroke: var(--grid-color);
|
| 26 |
-
stroke-dasharray: 2,2;
|
| 27 |
}
|
| 28 |
|
| 29 |
.d3-sft-think-follow-1 .bar {
|
|
@@ -194,10 +194,10 @@
|
|
| 194 |
|
| 195 |
// Data loading helpers
|
| 196 |
const CSV_PATHS = [
|
| 197 |
-
'/data/
|
| 198 |
-
'./assets/data/
|
| 199 |
-
'../assets/data/
|
| 200 |
-
'../../assets/data/
|
| 201 |
];
|
| 202 |
|
| 203 |
const fetchFirstAvailable = async (paths) => {
|
|
@@ -205,7 +205,7 @@
|
|
| 205 |
try {
|
| 206 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 207 |
if (r.ok) return await r.text();
|
| 208 |
-
} catch (_) {}
|
| 209 |
}
|
| 210 |
throw new Error('CSV not found at any of the specified paths');
|
| 211 |
};
|
|
@@ -408,18 +408,18 @@
|
|
| 408 |
|
| 409 |
// Hover interactions
|
| 410 |
groupsMerge.selectAll('rect.bar')
|
| 411 |
-
.on('mouseenter', function(event, d) {
|
| 412 |
const turn = d3.select(this.parentNode).datum().turn;
|
| 413 |
tipInner.innerHTML = `<strong>${d.model}</strong><br/>${turn}: <strong>${d.value.toFixed(2)}%</strong>`;
|
| 414 |
tip.classList.add('visible');
|
| 415 |
})
|
| 416 |
-
.on('mousemove', function(event) {
|
| 417 |
const [mx, my] = d3.pointer(event, container);
|
| 418 |
const offsetX = 10;
|
| 419 |
const offsetY = -10;
|
| 420 |
tip.style.transform = `translate(${mx + offsetX}px, ${my + offsetY}px)`;
|
| 421 |
})
|
| 422 |
-
.on('mouseleave', function() {
|
| 423 |
tip.classList.remove('visible');
|
| 424 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 425 |
});
|
|
@@ -488,4 +488,4 @@
|
|
| 488 |
ensureD3(bootstrap);
|
| 489 |
}
|
| 490 |
})();
|
| 491 |
-
</script>
|
|
|
|
| 23 |
|
| 24 |
.d3-sft-think-follow-1 .grid line {
|
| 25 |
stroke: var(--grid-color);
|
| 26 |
+
stroke-dasharray: 2, 2;
|
| 27 |
}
|
| 28 |
|
| 29 |
.d3-sft-think-follow-1 .bar {
|
|
|
|
| 194 |
|
| 195 |
// Data loading helpers
|
| 196 |
const CSV_PATHS = [
|
| 197 |
+
'/data/sft_think-follow-1.csv',
|
| 198 |
+
'./assets/data/sft_think-follow-1.csv',
|
| 199 |
+
'../assets/data/sft_think-follow-1.csv',
|
| 200 |
+
'../../assets/data/sft_think-follow-1.csv'
|
| 201 |
];
|
| 202 |
|
| 203 |
const fetchFirstAvailable = async (paths) => {
|
|
|
|
| 205 |
try {
|
| 206 |
const r = await fetch(p, { cache: 'no-cache' });
|
| 207 |
if (r.ok) return await r.text();
|
| 208 |
+
} catch (_) { }
|
| 209 |
}
|
| 210 |
throw new Error('CSV not found at any of the specified paths');
|
| 211 |
};
|
|
|
|
| 408 |
|
| 409 |
// Hover interactions
|
| 410 |
groupsMerge.selectAll('rect.bar')
|
| 411 |
+
.on('mouseenter', function (event, d) {
|
| 412 |
const turn = d3.select(this.parentNode).datum().turn;
|
| 413 |
tipInner.innerHTML = `<strong>${d.model}</strong><br/>${turn}: <strong>${d.value.toFixed(2)}%</strong>`;
|
| 414 |
tip.classList.add('visible');
|
| 415 |
})
|
| 416 |
+
.on('mousemove', function (event) {
|
| 417 |
const [mx, my] = d3.pointer(event, container);
|
| 418 |
const offsetX = 10;
|
| 419 |
const offsetY = -10;
|
| 420 |
tip.style.transform = `translate(${mx + offsetX}px, ${my + offsetY}px)`;
|
| 421 |
})
|
| 422 |
+
.on('mouseleave', function () {
|
| 423 |
tip.classList.remove('visible');
|
| 424 |
tip.style.transform = 'translate(-9999px, -9999px)';
|
| 425 |
});
|
|
|
|
| 488 |
ensureD3(bootstrap);
|
| 489 |
}
|
| 490 |
})();
|
| 491 |
+
</script>
|