Update index.html
Browse files- index.html +726 -136
index.html
CHANGED
|
@@ -2,109 +2,636 @@
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
|
|
|
| 5 |
<title>Infernet Econometrics Benchmark Leaderboard</title>
|
|
|
|
|
|
|
|
|
|
| 6 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
* {
|
| 8 |
box-sizing: border-box;
|
|
|
|
|
|
|
| 9 |
}
|
|
|
|
| 10 |
body {
|
| 11 |
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
}
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
text-align: center;
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
border-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
}
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
.panel{
|
| 68 |
-
display:none;
|
| 69 |
-
}
|
| 70 |
-
.panel.show{
|
| 71 |
-
display:block;
|
| 72 |
-
}
|
| 73 |
-
.metric-block{
|
| 74 |
-
margin-top:30px;
|
| 75 |
-
padding:20px;
|
| 76 |
-
background-color:#f8fafc;
|
| 77 |
-
border-radius:10px;
|
| 78 |
}
|
| 79 |
</style>
|
| 80 |
</head>
|
| 81 |
<body>
|
| 82 |
-
<div class="
|
| 83 |
-
<
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
</div>
|
| 88 |
|
| 89 |
-
<div class="
|
| 90 |
-
<
|
| 91 |
-
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
</div>
|
| 94 |
|
| 95 |
-
<div class="panel
|
| 96 |
-
|
| 97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
-
<div class="metric-
|
| 100 |
-
<h3>
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
| 102 |
<li><strong>Compilation Success:</strong> Generated code runs without runtime errors.</li>
|
| 103 |
<li><strong>Partial Replication:</strong> Partially reproduce target estimation results.</li>
|
| 104 |
<li><strong>Correct Coefficient Direction:</strong> Correct sign of estimated coefficients.</li>
|
| 105 |
</ul>
|
| 106 |
-
<p
|
| 107 |
-
|
|
|
|
| 108 |
</p>
|
| 109 |
</div>
|
| 110 |
</div>
|
|
@@ -112,79 +639,142 @@
|
|
| 112 |
<script>
|
| 113 |
const panels = document.querySelectorAll(".panel");
|
| 114 |
const tabs = document.querySelectorAll(".tab");
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
|
| 122 |
function parseCSV(text) {
|
| 123 |
-
text = text.replace(/\r\n/g,"\n").replace(/\r/g,"\n");
|
| 124 |
-
const lines = text.trim().split("\n").filter(line=>line.trim()!==
|
| 125 |
-
const headers = lines[0].split(",").map(h=>h.trim());
|
| 126 |
const rows = [];
|
| 127 |
-
for(let i=1;i<lines.length;i++){
|
| 128 |
-
const vals = lines[i].split(",").map(v=>v.trim());
|
| 129 |
const obj = {};
|
| 130 |
-
headers.forEach((h,idx)=>{
|
| 131 |
-
obj[h] = vals[idx];
|
| 132 |
-
});
|
| 133 |
rows.push(obj);
|
| 134 |
}
|
| 135 |
return rows;
|
| 136 |
}
|
| 137 |
|
| 138 |
-
function
|
| 139 |
-
const
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
}
|
| 151 |
|
| 152 |
-
//读取space本地csv
|
| 153 |
const csvUrl = "./results.csv";
|
| 154 |
|
| 155 |
-
async function loadData(){
|
| 156 |
try {
|
| 157 |
const res = await fetch(csvUrl);
|
| 158 |
-
if(!res.ok) throw new Error(`HTTP ${res.status}`);
|
| 159 |
const csvText = await res.text();
|
| 160 |
const data = parseCSV(csvText);
|
| 161 |
|
| 162 |
-
if(data.length ===0){
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
);
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
);
|
| 177 |
-
document.getElementById("panel-dir").innerHTML = buildTable(
|
| 178 |
-
"Ranked by Correct Coefficient Direction",
|
| 179 |
-
data,
|
| 180 |
-
"Correct Coefficient Direction (%)"
|
| 181 |
-
);
|
| 182 |
-
} catch(err){
|
| 183 |
-
console.error("load csv error",err);
|
| 184 |
-
document.body.insertAdjacentHTML("beforeend",`<p style='color:red;text‑align:center'>Failed to load ranking data: ${err.message}</p>`);
|
| 185 |
}
|
| 186 |
}
|
|
|
|
| 187 |
loadData();
|
| 188 |
</script>
|
| 189 |
</body>
|
| 190 |
-
</html>
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Infernet Econometrics Benchmark Leaderboard</title>
|
| 7 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 8 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
| 10 |
<style>
|
| 11 |
+
:root {
|
| 12 |
+
--bg-primary: #0b0f19;
|
| 13 |
+
--bg-secondary: #111827;
|
| 14 |
+
--bg-tertiary: #1a2234;
|
| 15 |
+
--bg-hover: #1e293b;
|
| 16 |
+
--border: #1f2937;
|
| 17 |
+
--border-light: #374151;
|
| 18 |
+
--text-primary: #f9fafb;
|
| 19 |
+
--text-secondary: #9ca3af;
|
| 20 |
+
--text-muted: #6b7280;
|
| 21 |
+
--accent-blue: #3b82f6;
|
| 22 |
+
--accent-blue-dim: rgba(59, 130, 246, 0.15);
|
| 23 |
+
--accent-gold: #fbbf24;
|
| 24 |
+
--accent-green: #22c55e;
|
| 25 |
+
--accent-green-dim: rgba(34, 197, 94, 0.12);
|
| 26 |
+
--radius: 10px;
|
| 27 |
+
--radius-sm: 6px;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
* {
|
| 31 |
box-sizing: border-box;
|
| 32 |
+
margin: 0;
|
| 33 |
+
padding: 0;
|
| 34 |
}
|
| 35 |
+
|
| 36 |
body {
|
| 37 |
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
| 38 |
+
background: var(--bg-primary);
|
| 39 |
+
color: var(--text-primary);
|
| 40 |
+
line-height: 1.5;
|
| 41 |
+
min-height: 100vh;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
a {
|
| 45 |
+
color: var(--accent-blue);
|
| 46 |
+
text-decoration: none;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
a:hover {
|
| 50 |
+
text-decoration: underline;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.page {
|
| 54 |
+
max-width: 980px;
|
| 55 |
+
margin: 0 auto;
|
| 56 |
+
padding: 28px 24px 64px;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/* Breadcrumb */
|
| 60 |
+
.breadcrumb {
|
| 61 |
+
display: flex;
|
| 62 |
+
align-items: center;
|
| 63 |
+
gap: 8px;
|
| 64 |
+
font-size: 14px;
|
| 65 |
+
color: var(--text-secondary);
|
| 66 |
+
margin-bottom: 20px;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.breadcrumb svg {
|
| 70 |
+
opacity: 0.6;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.breadcrumb span {
|
| 74 |
+
color: var(--text-muted);
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
/* Header */
|
| 78 |
+
.header {
|
| 79 |
+
margin-bottom: 24px;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.title-row {
|
| 83 |
+
display: flex;
|
| 84 |
+
align-items: flex-start;
|
| 85 |
+
gap: 12px;
|
| 86 |
+
margin-bottom: 12px;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.title-icon {
|
| 90 |
+
width: 40px;
|
| 91 |
+
height: 40px;
|
| 92 |
+
background: linear-gradient(135deg, #fbbf24, #f59e0b);
|
| 93 |
+
border-radius: var(--radius-sm);
|
| 94 |
+
display: flex;
|
| 95 |
+
align-items: center;
|
| 96 |
+
justify-content: center;
|
| 97 |
+
font-size: 20px;
|
| 98 |
+
flex-shrink: 0;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
.title-block h1 {
|
| 102 |
+
font-size: 22px;
|
| 103 |
+
font-weight: 600;
|
| 104 |
+
letter-spacing: -0.02em;
|
| 105 |
+
line-height: 1.3;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
.title-block .subtitle {
|
| 109 |
+
font-size: 14px;
|
| 110 |
+
color: var(--text-secondary);
|
| 111 |
+
margin-top: 4px;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
.like-btn {
|
| 115 |
+
margin-left: auto;
|
| 116 |
+
display: flex;
|
| 117 |
+
align-items: center;
|
| 118 |
+
gap: 6px;
|
| 119 |
+
padding: 6px 14px;
|
| 120 |
+
background: var(--bg-secondary);
|
| 121 |
+
border: 1px solid var(--border);
|
| 122 |
+
border-radius: 999px;
|
| 123 |
+
color: var(--text-secondary);
|
| 124 |
+
font-size: 13px;
|
| 125 |
+
cursor: default;
|
| 126 |
+
flex-shrink: 0;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
/* Tags */
|
| 130 |
+
.tags {
|
| 131 |
+
display: flex;
|
| 132 |
+
flex-wrap: wrap;
|
| 133 |
+
gap: 8px;
|
| 134 |
+
margin-bottom: 24px;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
.tag {
|
| 138 |
+
display: inline-flex;
|
| 139 |
+
align-items: center;
|
| 140 |
+
gap: 6px;
|
| 141 |
+
padding: 5px 12px;
|
| 142 |
+
background: var(--bg-secondary);
|
| 143 |
+
border: 1px solid var(--border);
|
| 144 |
+
border-radius: 999px;
|
| 145 |
+
font-size: 12px;
|
| 146 |
+
color: var(--text-secondary);
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
.tag.benchmark {
|
| 150 |
+
background: rgba(251, 191, 36, 0.1);
|
| 151 |
+
border-color: rgba(251, 191, 36, 0.3);
|
| 152 |
+
color: var(--accent-gold);
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.tag .dot {
|
| 156 |
+
width: 6px;
|
| 157 |
+
height: 6px;
|
| 158 |
+
border-radius: 50%;
|
| 159 |
+
background: var(--accent-blue);
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
.tag .dot.green { background: var(--accent-green); }
|
| 163 |
+
.tag .dot.orange { background: #f97316; }
|
| 164 |
+
|
| 165 |
+
/* Tabs */
|
| 166 |
+
.tab-bar {
|
| 167 |
+
display: flex;
|
| 168 |
+
gap: 0;
|
| 169 |
+
border-bottom: 1px solid var(--border);
|
| 170 |
+
margin-bottom: 0;
|
| 171 |
+
overflow-x: auto;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.tab {
|
| 175 |
+
padding: 12px 18px;
|
| 176 |
+
background: none;
|
| 177 |
+
border: none;
|
| 178 |
+
color: var(--text-muted);
|
| 179 |
+
font-family: inherit;
|
| 180 |
+
font-size: 14px;
|
| 181 |
+
font-weight: 500;
|
| 182 |
+
cursor: pointer;
|
| 183 |
+
white-space: nowrap;
|
| 184 |
+
position: relative;
|
| 185 |
+
transition: color 0.15s;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
.tab:hover {
|
| 189 |
+
color: var(--text-secondary);
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
.tab.active {
|
| 193 |
+
color: var(--text-primary);
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
.tab.active::after {
|
| 197 |
+
content: "";
|
| 198 |
+
position: absolute;
|
| 199 |
+
bottom: -1px;
|
| 200 |
+
left: 0;
|
| 201 |
+
right: 0;
|
| 202 |
+
height: 2px;
|
| 203 |
+
background: var(--text-primary);
|
| 204 |
+
border-radius: 2px 2px 0 0;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
/* Panels */
|
| 208 |
+
.panel {
|
| 209 |
+
display: none;
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
.panel.show {
|
| 213 |
+
display: block;
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
/* Leaderboard card */
|
| 217 |
+
.leaderboard-card {
|
| 218 |
+
background: var(--bg-secondary);
|
| 219 |
+
border: 1px solid var(--border);
|
| 220 |
+
border-radius: var(--radius);
|
| 221 |
+
overflow: hidden;
|
| 222 |
+
margin-top: 24px;
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
.leaderboard-header {
|
| 226 |
+
display: flex;
|
| 227 |
+
align-items: center;
|
| 228 |
+
gap: 10px;
|
| 229 |
+
padding: 16px 20px;
|
| 230 |
+
border-bottom: 1px solid var(--border);
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
.leaderboard-header h2 {
|
| 234 |
+
font-size: 15px;
|
| 235 |
+
font-weight: 600;
|
| 236 |
+
display: flex;
|
| 237 |
+
align-items: center;
|
| 238 |
+
gap: 8px;
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
.badge-official {
|
| 242 |
+
display: inline-flex;
|
| 243 |
+
align-items: center;
|
| 244 |
+
gap: 4px;
|
| 245 |
+
padding: 3px 10px;
|
| 246 |
+
background: var(--accent-blue-dim);
|
| 247 |
+
border: 1px solid rgba(59, 130, 246, 0.3);
|
| 248 |
+
border-radius: 999px;
|
| 249 |
+
font-size: 11px;
|
| 250 |
+
font-weight: 500;
|
| 251 |
+
color: var(--accent-blue);
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
/* Table header row */
|
| 255 |
+
.lb-columns {
|
| 256 |
+
display: grid;
|
| 257 |
+
grid-template-columns: 48px 1fr 100px;
|
| 258 |
+
padding: 10px 20px;
|
| 259 |
+
font-size: 11px;
|
| 260 |
+
font-weight: 600;
|
| 261 |
+
text-transform: uppercase;
|
| 262 |
+
letter-spacing: 0.06em;
|
| 263 |
+
color: var(--text-muted);
|
| 264 |
+
border-bottom: 1px solid var(--border);
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
.lb-columns .col-score {
|
| 268 |
+
text-align: right;
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
/* Leaderboard rows */
|
| 272 |
+
.lb-row {
|
| 273 |
+
display: grid;
|
| 274 |
+
grid-template-columns: 48px 1fr 100px;
|
| 275 |
+
align-items: center;
|
| 276 |
+
padding: 14px 20px;
|
| 277 |
+
border-bottom: 1px solid var(--border);
|
| 278 |
+
transition: background 0.12s;
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
.lb-row:last-child {
|
| 282 |
+
border-bottom: none;
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
.lb-row:hover {
|
| 286 |
+
background: var(--bg-hover);
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
.lb-row.top-1 {
|
| 290 |
+
background: rgba(251, 191, 36, 0.04);
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
.lb-rank {
|
| 294 |
+
font-size: 14px;
|
| 295 |
+
color: var(--text-muted);
|
| 296 |
+
font-weight: 500;
|
| 297 |
+
display: flex;
|
| 298 |
+
align-items: center;
|
| 299 |
+
gap: 4px;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
.lb-rank .trophy {
|
| 303 |
+
font-size: 16px;
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
.lb-model {
|
| 307 |
+
display: flex;
|
| 308 |
+
align-items: center;
|
| 309 |
+
gap: 10px;
|
| 310 |
+
min-width: 0;
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
.model-avatar {
|
| 314 |
+
width: 28px;
|
| 315 |
+
height: 28px;
|
| 316 |
+
border-radius: var(--radius-sm);
|
| 317 |
+
background: var(--bg-tertiary);
|
| 318 |
+
border: 1px solid var(--border-light);
|
| 319 |
+
display: flex;
|
| 320 |
+
align-items: center;
|
| 321 |
+
justify-content: center;
|
| 322 |
+
font-size: 11px;
|
| 323 |
+
font-weight: 700;
|
| 324 |
+
color: var(--text-secondary);
|
| 325 |
+
flex-shrink: 0;
|
| 326 |
+
text-transform: uppercase;
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
.model-info {
|
| 330 |
+
min-width: 0;
|
| 331 |
+
}
|
| 332 |
+
|
| 333 |
+
.model-name {
|
| 334 |
+
font-size: 14px;
|
| 335 |
+
font-weight: 500;
|
| 336 |
+
color: var(--text-primary);
|
| 337 |
+
white-space: nowrap;
|
| 338 |
+
overflow: hidden;
|
| 339 |
+
text-overflow: ellipsis;
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
.model-meta {
|
| 343 |
+
display: flex;
|
| 344 |
+
align-items: center;
|
| 345 |
+
gap: 6px;
|
| 346 |
+
margin-top: 3px;
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
.status-badge {
|
| 350 |
+
display: inline-flex;
|
| 351 |
+
align-items: center;
|
| 352 |
+
gap: 3px;
|
| 353 |
+
padding: 1px 8px;
|
| 354 |
+
border-radius: 999px;
|
| 355 |
+
font-size: 11px;
|
| 356 |
+
font-weight: 500;
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
.status-badge.verified {
|
| 360 |
+
background: var(--accent-green-dim);
|
| 361 |
+
color: var(--accent-green);
|
| 362 |
+
border: 1px solid rgba(34, 197, 94, 0.25);
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
.status-badge.self-reported {
|
| 366 |
+
background: var(--bg-tertiary);
|
| 367 |
+
color: var(--text-muted);
|
| 368 |
+
border: 1px solid var(--border);
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
.lb-score {
|
| 372 |
+
text-align: right;
|
| 373 |
+
font-size: 15px;
|
| 374 |
+
font-weight: 600;
|
| 375 |
+
color: var(--text-primary);
|
| 376 |
+
font-variant-numeric: tabular-nums;
|
| 377 |
+
}
|
| 378 |
+
|
| 379 |
+
.lb-score-bar {
|
| 380 |
+
margin-top: 4px;
|
| 381 |
+
height: 3px;
|
| 382 |
+
background: var(--bg-tertiary);
|
| 383 |
+
border-radius: 999px;
|
| 384 |
+
overflow: hidden;
|
| 385 |
+
}
|
| 386 |
+
|
| 387 |
+
.lb-score-bar-fill {
|
| 388 |
+
height: 100%;
|
| 389 |
+
background: linear-gradient(90deg, var(--accent-blue), #6366f1);
|
| 390 |
+
border-radius: 999px;
|
| 391 |
+
transition: width 0.4s ease;
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
.lb-row.top-1 .lb-score-bar-fill {
|
| 395 |
+
background: linear-gradient(90deg, var(--accent-gold), #f59e0b);
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
/* Show more */
|
| 399 |
+
.show-more {
|
| 400 |
+
display: flex;
|
| 401 |
+
align-items: center;
|
| 402 |
+
justify-content: center;
|
| 403 |
+
gap: 6px;
|
| 404 |
+
padding: 14px;
|
| 405 |
+
color: var(--text-secondary);
|
| 406 |
+
font-size: 13px;
|
| 407 |
+
cursor: pointer;
|
| 408 |
+
border-top: 1px solid var(--border);
|
| 409 |
+
transition: color 0.15s, background 0.15s;
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
.show-more:hover {
|
| 413 |
+
color: var(--text-primary);
|
| 414 |
+
background: var(--bg-hover);
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
/* Metric definition card */
|
| 418 |
+
.metric-card {
|
| 419 |
+
margin-top: 32px;
|
| 420 |
+
background: var(--bg-secondary);
|
| 421 |
+
border: 1px solid var(--border);
|
| 422 |
+
border-radius: var(--radius);
|
| 423 |
+
padding: 20px 24px;
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
.metric-card h3 {
|
| 427 |
+
font-size: 14px;
|
| 428 |
+
font-weight: 600;
|
| 429 |
+
margin-bottom: 14px;
|
| 430 |
+
display: flex;
|
| 431 |
+
align-items: center;
|
| 432 |
+
gap: 8px;
|
| 433 |
+
color: var(--text-primary);
|
| 434 |
+
}
|
| 435 |
+
|
| 436 |
+
.metric-list {
|
| 437 |
+
list-style: none;
|
| 438 |
+
display: flex;
|
| 439 |
+
flex-direction: column;
|
| 440 |
+
gap: 10px;
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
.metric-list li {
|
| 444 |
+
font-size: 13px;
|
| 445 |
+
color: var(--text-secondary);
|
| 446 |
+
padding-left: 16px;
|
| 447 |
+
position: relative;
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
.metric-list li::before {
|
| 451 |
+
content: "";
|
| 452 |
+
position: absolute;
|
| 453 |
+
left: 0;
|
| 454 |
+
top: 8px;
|
| 455 |
+
width: 6px;
|
| 456 |
+
height: 6px;
|
| 457 |
+
border-radius: 50%;
|
| 458 |
+
background: var(--accent-blue);
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
.metric-list strong {
|
| 462 |
+
color: var(--text-primary);
|
| 463 |
+
font-weight: 500;
|
| 464 |
+
}
|
| 465 |
+
|
| 466 |
+
.metric-note {
|
| 467 |
+
margin-top: 16px;
|
| 468 |
+
padding-top: 14px;
|
| 469 |
+
border-top: 1px solid var(--border);
|
| 470 |
+
font-size: 12px;
|
| 471 |
+
color: var(--text-muted);
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
/* Loading & error states */
|
| 475 |
+
.loading {
|
| 476 |
+
padding: 48px 20px;
|
| 477 |
text-align: center;
|
| 478 |
+
color: var(--text-muted);
|
| 479 |
+
font-size: 14px;
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
.loading-spinner {
|
| 483 |
+
width: 24px;
|
| 484 |
+
height: 24px;
|
| 485 |
+
border: 2px solid var(--border);
|
| 486 |
+
border-top-color: var(--accent-blue);
|
| 487 |
+
border-radius: 50%;
|
| 488 |
+
animation: spin 0.7s linear infinite;
|
| 489 |
+
margin: 0 auto 12px;
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
@keyframes spin {
|
| 493 |
+
to { transform: rotate(360deg); }
|
| 494 |
+
}
|
| 495 |
+
|
| 496 |
+
.error-banner {
|
| 497 |
+
margin-top: 16px;
|
| 498 |
+
padding: 12px 16px;
|
| 499 |
+
background: rgba(239, 68, 68, 0.1);
|
| 500 |
+
border: 1px solid rgba(239, 68, 68, 0.3);
|
| 501 |
+
border-radius: var(--radius-sm);
|
| 502 |
+
color: #fca5a5;
|
| 503 |
+
font-size: 13px;
|
| 504 |
+
text-align: center;
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
.hidden { display: none !important; }
|
| 508 |
+
|
| 509 |
+
@media (max-width: 600px) {
|
| 510 |
+
.page { padding: 16px 16px 48px; }
|
| 511 |
+
.title-row { flex-wrap: wrap; }
|
| 512 |
+
.like-btn { margin-left: 0; }
|
| 513 |
+
.lb-columns, .lb-row {
|
| 514 |
+
grid-template-columns: 36px 1fr 72px;
|
| 515 |
+
padding-left: 14px;
|
| 516 |
+
padding-right: 14px;
|
| 517 |
+
}
|
| 518 |
+
.model-name { font-size: 13px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 519 |
}
|
| 520 |
</style>
|
| 521 |
</head>
|
| 522 |
<body>
|
| 523 |
+
<div class="page">
|
| 524 |
+
<nav class="breadcrumb">
|
| 525 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 526 |
+
<ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/>
|
| 527 |
+
</svg>
|
| 528 |
+
<a href="https://huggingface.co/datasets/CamoAiLab/Infernet" target="_blank">Datasets</a>
|
| 529 |
+
<span>/</span>
|
| 530 |
+
<span>CamoAiLab/Infernet</span>
|
| 531 |
+
</nav>
|
| 532 |
+
|
| 533 |
+
<header class="header">
|
| 534 |
+
<div class="title-row">
|
| 535 |
+
<div class="title-icon">🏆</div>
|
| 536 |
+
<div class="title-block">
|
| 537 |
+
<h1>Infernet Econometrics Benchmark</h1>
|
| 538 |
+
<p class="subtitle">CamoAiLab · HKU CAMO</p>
|
| 539 |
+
</div>
|
| 540 |
+
<div class="like-btn">
|
| 541 |
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 542 |
+
<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/>
|
| 543 |
+
</svg>
|
| 544 |
+
Leaderboard
|
| 545 |
+
</div>
|
| 546 |
+
</div>
|
| 547 |
+
|
| 548 |
+
<div class="tags">
|
| 549 |
+
<span class="tag benchmark">🏆 Benchmark</span>
|
| 550 |
+
<span class="tag"><span class="dot"></span> Tasks: Econometrics</span>
|
| 551 |
+
<span class="tag"><span class="dot green"></span> Modalities: Code</span>
|
| 552 |
+
<span class="tag"><span class="dot orange"></span> Formats: CSV</span>
|
| 553 |
+
<span class="tag">
|
| 554 |
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
|
| 555 |
+
Open
|
| 556 |
+
</span>
|
| 557 |
+
</div>
|
| 558 |
+
</header>
|
| 559 |
+
|
| 560 |
+
<div class="tab-bar">
|
| 561 |
+
<button class="tab active" data-idx="0">Compilation Success</button>
|
| 562 |
+
<button class="tab" data-idx="1">Partial Replication</button>
|
| 563 |
+
<button class="tab" data-idx="2">Coefficient Direction</button>
|
| 564 |
+
</div>
|
| 565 |
+
|
| 566 |
+
<div class="panel show" id="panel-compile">
|
| 567 |
+
<div class="leaderboard-card">
|
| 568 |
+
<div class="leaderboard-header">
|
| 569 |
+
<h2>
|
| 570 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 20V10M12 20V4M6 20v-6"/></svg>
|
| 571 |
+
Leaderboard
|
| 572 |
+
</h2>
|
| 573 |
+
<span class="badge-official">Official Benchmark</span>
|
| 574 |
+
</div>
|
| 575 |
+
<div class="lb-columns">
|
| 576 |
+
<span>#</span>
|
| 577 |
+
<span>Model</span>
|
| 578 |
+
<span class="col-score">Score</span>
|
| 579 |
+
</div>
|
| 580 |
+
<div id="rows-compile"><div class="loading"><div class="loading-spinner"></div>Loading rankings…</div></div>
|
| 581 |
+
</div>
|
| 582 |
</div>
|
| 583 |
|
| 584 |
+
<div class="panel" id="panel-rep">
|
| 585 |
+
<div class="leaderboard-card">
|
| 586 |
+
<div class="leaderboard-header">
|
| 587 |
+
<h2>
|
| 588 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 20V10M12 20V4M6 20v-6"/></svg>
|
| 589 |
+
Leaderboard
|
| 590 |
+
</h2>
|
| 591 |
+
<span class="badge-official">Official Benchmark</span>
|
| 592 |
+
</div>
|
| 593 |
+
<div class="lb-columns">
|
| 594 |
+
<span>#</span>
|
| 595 |
+
<span>Model</span>
|
| 596 |
+
<span class="col-score">Score</span>
|
| 597 |
+
</div>
|
| 598 |
+
<div id="rows-rep"><div class="loading"><div class="loading-spinner"></div>Loading rankings…</div></div>
|
| 599 |
+
</div>
|
| 600 |
</div>
|
| 601 |
|
| 602 |
+
<div class="panel" id="panel-dir">
|
| 603 |
+
<div class="leaderboard-card">
|
| 604 |
+
<div class="leaderboard-header">
|
| 605 |
+
<h2>
|
| 606 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 20V10M12 20V4M6 20v-6"/></svg>
|
| 607 |
+
Leaderboard
|
| 608 |
+
</h2>
|
| 609 |
+
<span class="badge-official">Official Benchmark</span>
|
| 610 |
+
</div>
|
| 611 |
+
<div class="lb-columns">
|
| 612 |
+
<span>#</span>
|
| 613 |
+
<span>Model</span>
|
| 614 |
+
<span class="col-score">Score</span>
|
| 615 |
+
</div>
|
| 616 |
+
<div id="rows-dir"><div class="loading"><div class="loading-spinner"></div>Loading rankings…</div></div>
|
| 617 |
+
</div>
|
| 618 |
+
</div>
|
| 619 |
+
|
| 620 |
+
<div id="error-banner" class="error-banner hidden"></div>
|
| 621 |
|
| 622 |
+
<div class="metric-card">
|
| 623 |
+
<h3>
|
| 624 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>
|
| 625 |
+
Metric Definitions
|
| 626 |
+
</h3>
|
| 627 |
+
<ul class="metric-list">
|
| 628 |
<li><strong>Compilation Success:</strong> Generated code runs without runtime errors.</li>
|
| 629 |
<li><strong>Partial Replication:</strong> Partially reproduce target estimation results.</li>
|
| 630 |
<li><strong>Correct Coefficient Direction:</strong> Correct sign of estimated coefficients.</li>
|
| 631 |
</ul>
|
| 632 |
+
<p class="metric-note">
|
| 633 |
+
Native Hugging Face Community Evals leaderboard pending official allowlist.
|
| 634 |
+
Dataset: <a href="https://huggingface.co/datasets/CamoAiLab/Infernet" target="_blank">CamoAiLab/Infernet</a>
|
| 635 |
</p>
|
| 636 |
</div>
|
| 637 |
</div>
|
|
|
|
| 639 |
<script>
|
| 640 |
const panels = document.querySelectorAll(".panel");
|
| 641 |
const tabs = document.querySelectorAll(".tab");
|
| 642 |
+
const INITIAL_SHOW = 10;
|
| 643 |
+
|
| 644 |
+
tabs.forEach(tab => {
|
| 645 |
+
tab.addEventListener("click", () => {
|
| 646 |
+
const idx = Number(tab.dataset.idx);
|
| 647 |
+
panels.forEach(p => p.classList.remove("show"));
|
| 648 |
+
tabs.forEach(t => t.classList.remove("active"));
|
| 649 |
+
panels[idx].classList.add("show");
|
| 650 |
+
tab.classList.add("active");
|
| 651 |
+
});
|
| 652 |
+
});
|
| 653 |
|
| 654 |
function parseCSV(text) {
|
| 655 |
+
text = text.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
| 656 |
+
const lines = text.trim().split("\n").filter(line => line.trim() !== "");
|
| 657 |
+
const headers = lines[0].split(",").map(h => h.trim());
|
| 658 |
const rows = [];
|
| 659 |
+
for (let i = 1; i < lines.length; i++) {
|
| 660 |
+
const vals = lines[i].split(",").map(v => v.trim());
|
| 661 |
const obj = {};
|
| 662 |
+
headers.forEach((h, idx) => { obj[h] = vals[idx]; });
|
|
|
|
|
|
|
| 663 |
rows.push(obj);
|
| 664 |
}
|
| 665 |
return rows;
|
| 666 |
}
|
| 667 |
|
| 668 |
+
function getAvatarLetter(modelId) {
|
| 669 |
+
const parts = modelId.split("/");
|
| 670 |
+
const name = parts.length > 1 ? parts[1] : parts[0];
|
| 671 |
+
return name.charAt(0).toUpperCase();
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
function getOrgColor(modelId) {
|
| 675 |
+
const colors = {
|
| 676 |
+
meta: "#0668E1", openai: "#10a37f", google: "#4285f4",
|
| 677 |
+
anthropic: "#d4a574", mistral: "#ff7000", qwen: "#6366f1",
|
| 678 |
+
deepseek: "#4f46e5", microsoft: "#00a4ef", camo: "#3b82f6"
|
| 679 |
+
};
|
| 680 |
+
const org = (modelId.split("/")[0] || "").toLowerCase();
|
| 681 |
+
for (const [key, color] of Object.entries(colors)) {
|
| 682 |
+
if (org.includes(key)) return color;
|
| 683 |
+
}
|
| 684 |
+
return "#6b7280";
|
| 685 |
+
}
|
| 686 |
+
|
| 687 |
+
function buildRows(data, sortKey, containerId) {
|
| 688 |
+
const sorted = [...data].sort((a, b) => Number(b[sortKey]) - Number(a[sortKey]));
|
| 689 |
+
const container = document.getElementById(containerId);
|
| 690 |
+
|
| 691 |
+
if (sorted.length === 0) {
|
| 692 |
+
container.innerHTML = '<div class="loading">No data available</div>';
|
| 693 |
+
return;
|
| 694 |
+
}
|
| 695 |
+
|
| 696 |
+
function renderRows(limit) {
|
| 697 |
+
let html = "";
|
| 698 |
+
sorted.slice(0, limit).forEach((row, i) => {
|
| 699 |
+
const rank = i + 1;
|
| 700 |
+
const score = Number(row[sortKey]);
|
| 701 |
+
const modelId = row["Model ID"] || "Unknown";
|
| 702 |
+
const isTop = rank === 1;
|
| 703 |
+
const avatarColor = getOrgColor(modelId);
|
| 704 |
+
|
| 705 |
+
html += `
|
| 706 |
+
<div class="lb-row${isTop ? " top-1" : ""}">
|
| 707 |
+
<div class="lb-rank">
|
| 708 |
+
${isTop ? '<span class="trophy">🏆</span>' : rank}
|
| 709 |
+
</div>
|
| 710 |
+
<div class="lb-model">
|
| 711 |
+
<div class="model-avatar" style="background:${avatarColor}22;border-color:${avatarColor}44;color:${avatarColor}">
|
| 712 |
+
${getAvatarLetter(modelId)}
|
| 713 |
+
</div>
|
| 714 |
+
<div class="model-info">
|
| 715 |
+
<div class="model-name" title="${modelId}">${modelId}</div>
|
| 716 |
+
<div class="model-meta">
|
| 717 |
+
<span class="status-badge ${isTop ? "verified" : "self-reported"}">
|
| 718 |
+
${isTop ? "✓ verified" : "self-reported"}
|
| 719 |
+
</span>
|
| 720 |
+
</div>
|
| 721 |
+
</div>
|
| 722 |
+
</div>
|
| 723 |
+
<div>
|
| 724 |
+
<div class="lb-score">${score.toFixed(1)}%</div>
|
| 725 |
+
<div class="lb-score-bar">
|
| 726 |
+
<div class="lb-score-bar-fill" style="width:${Math.min(score, 100)}%"></div>
|
| 727 |
+
</div>
|
| 728 |
+
</div>
|
| 729 |
+
</div>`;
|
| 730 |
+
});
|
| 731 |
+
container.innerHTML = html;
|
| 732 |
+
|
| 733 |
+
const existingBtn = container.parentElement.querySelector(".show-more");
|
| 734 |
+
if (existingBtn) existingBtn.remove();
|
| 735 |
+
|
| 736 |
+
if (sorted.length > limit) {
|
| 737 |
+
const btn = document.createElement("div");
|
| 738 |
+
btn.className = "show-more";
|
| 739 |
+
btn.innerHTML = `Show all ${sorted.length} models <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>`;
|
| 740 |
+
btn.addEventListener("click", () => {
|
| 741 |
+
renderRows(sorted.length);
|
| 742 |
+
});
|
| 743 |
+
container.parentElement.appendChild(btn);
|
| 744 |
+
}
|
| 745 |
+
}
|
| 746 |
+
|
| 747 |
+
renderRows(INITIAL_SHOW);
|
| 748 |
}
|
| 749 |
|
|
|
|
| 750 |
const csvUrl = "./results.csv";
|
| 751 |
|
| 752 |
+
async function loadData() {
|
| 753 |
try {
|
| 754 |
const res = await fetch(csvUrl);
|
| 755 |
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
| 756 |
const csvText = await res.text();
|
| 757 |
const data = parseCSV(csvText);
|
| 758 |
|
| 759 |
+
if (data.length === 0) {
|
| 760 |
+
throw new Error("CSV parsed zero rows");
|
| 761 |
+
}
|
| 762 |
+
|
| 763 |
+
buildRows(data, "Compilation Success (%)", "rows-compile");
|
| 764 |
+
buildRows(data, "Partial Replication (%)", "rows-rep");
|
| 765 |
+
buildRows(data, "Correct Coefficient Direction (%)", "rows-dir");
|
| 766 |
+
} catch (err) {
|
| 767 |
+
console.error("load csv error", err);
|
| 768 |
+
const banner = document.getElementById("error-banner");
|
| 769 |
+
banner.textContent = `Failed to load ranking data: ${err.message}`;
|
| 770 |
+
banner.classList.remove("hidden");
|
| 771 |
+
["rows-compile", "rows-rep", "rows-dir"].forEach(id => {
|
| 772 |
+
document.getElementById(id).innerHTML = '<div class="loading">Unable to load data</div>';
|
| 773 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 774 |
}
|
| 775 |
}
|
| 776 |
+
|
| 777 |
loadData();
|
| 778 |
</script>
|
| 779 |
</body>
|
| 780 |
+
</html>
|