Spaces:
Running
Running
File size: 10,703 Bytes
ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 5763bf2 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 4db3be0 ee472e7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | import React, { useState, useEffect } from "react";
import { useLocation, useNavigate } from "react-router-dom";
import { Box, Paper, Typography, Button, Stack, Collapse } from "@mui/material";
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
const DocLink = ({ href, children }) => (
<Button
variant="text"
size="small"
href={href}
target="_blank"
sx={{
fontFamily: "monospace",
textTransform: "none",
color: "primary.main",
fontSize: "0.875rem",
p: 0,
minWidth: "auto",
justifyContent: "flex-start",
"&:hover": {
color: "primary.dark",
backgroundColor: "transparent",
textDecoration: "underline",
},
}}
>
{children} {"\u2192"}
</Button>
);
const StepNumber = ({ number }) => (
<Box
sx={{
width: 32,
height: 32,
borderRadius: "50%",
display: "flex",
alignItems: "center",
justifyContent: "center",
border: "1px solid",
borderColor: "primary.main",
color: "primary.main",
fontSize: "0.875rem",
fontWeight: 600,
flexShrink: 0,
bgcolor: "transparent",
}}
>
{number}
</Box>
);
const CITATION = `@software{open_eeg_bench,
title = {Open EEG Bench: Benchmarking parameter-efficient fine-tuning of EEG foundation models},
author = {Guetschel, Pierre and Aristimunha, Bruno and Truong, Dung and Kokate, Kuntal and Moreau, Thomas and Tangermann, Michael and Delorme, Arnaud},
year = {2026},
url = {https://github.com/braindecode/OpenEEGBench},
doi = {10.5281/zenodo.19698863}
}
@inproceedings{guetschel2026openeegbench,
title = {Toward {OpenEEG-Bench}: A Live Community-Driven Benchmark for {EEG} Foundation Models},
author = {Guetschel, Pierre and Aristimunha, Bruno and Truong, Dung and Kokate, Kuntal and Tangermann, Michael and Delorme, Arnaud},
booktitle = {Proceedings of the 34th European Signal Processing Conference (EUSIPCO 2026)},
year = {2026},
address = {Bruges, Belgium},
month = aug,
pages = {1--5},
organization = {EURASIP}
}`;
const TUTORIAL_STEPS = [
{
title: "Install & implement the model contract",
content: (
<Stack spacing={2}>
<Typography variant="body2" color="text.secondary">
Install the benchmark with{" "}
<strong>pip install open-eeg-bench</strong>. Your model must accept
input of shape <strong>(batch, n_chans, n_times)</strong> and return{" "}
<strong>(batch, n_outputs)</strong>, exposing a named classification
head module (default <strong>final_layer</strong>).
</Typography>
<Box
sx={{
p: 2,
bgcolor: (theme) =>
theme.palette.mode === "dark" ? "grey.50" : "grey.900",
borderRadius: 1,
"& pre": {
m: 0,
p: 0,
fontFamily: "monospace",
fontSize: "0.875rem",
color: (theme) =>
theme.palette.mode === "dark" ? "grey.900" : "grey.50",
},
}}
>
<pre>
{`import open_eeg_bench as oeb
# Your model: (batch, n_chans, n_times) -> (batch, n_outputs)
results = oeb.benchmark(
model_cls="my_package.MyModel",
checkpoint_url="https://my-weights.pth",
head_module_name="final_layer",
)
print(results) # pd.DataFrame`}
</pre>
</Box>
<DocLink href="https://github.com/braindecode/OpenEEGBench">
OpenEEGBench repository
</DocLink>
</Stack>
),
},
{
title: "Publish your weights",
content: (
<Stack spacing={2}>
<Typography variant="body2" color="text.secondary">
Push your checkpoint to a <strong>public HuggingFace Hub repo</strong>{" "}
(with a <strong>license tag</strong>) or host it at a direct{" "}
<strong>checkpoint URL</strong>. The arena loads the weights to run
the evaluation.
</Typography>
<DocLink href="https://huggingface.co/docs/hub/models-uploading">
Model uploading guide
</DocLink>
</Stack>
),
},
{
title: "Sign in & fill the form",
content: (
<Stack spacing={2}>
<Typography variant="body2" color="text.secondary">
Provide your <strong>model class import path</strong>, the{" "}
<strong>weights source</strong>, a{" "}
<strong>fine-tuning strategy</strong> and{" "}
<strong>classification head</strong>, the{" "}
<strong>datasets</strong> (default: all 10), and the number of{" "}
<strong>seeds</strong>.
</Typography>
</Stack>
),
},
{
title: "Submit & wait",
content: (
<Stack spacing={2}>
<Typography variant="body2" color="text.secondary">
The arena queues your model and a worker runs{" "}
<strong>oeb.benchmark()</strong> to post official scores. Limit:{" "}
<strong>5 submissions per month</strong>.
</Typography>
</Stack>
),
},
{
title: "Privacy & help",
content: (
<Stack spacing={2}>
<Typography variant="body2" color="text.secondary">
Your <strong>contact email</strong> is stored privately. For help or
to request removal of a submission, open an issue.
</Typography>
<DocLink href="https://github.com/braindecode/OpenEEGBench/issues">
OpenEEGBench issues
</DocLink>
</Stack>
),
},
];
function SubmissionGuide() {
const location = useLocation();
const navigate = useNavigate();
// Initialize state directly with URL value
const initialExpanded = !new URLSearchParams(location.search).get("guide");
const [expanded, setExpanded] = useState(initialExpanded);
// Sync expanded state with URL changes after initial render
useEffect(() => {
const guideOpen = !new URLSearchParams(location.search).get("guide");
if (guideOpen !== expanded) {
setExpanded(guideOpen);
}
}, [location.search, expanded]);
const handleAccordionChange = () => {
const newExpanded = !expanded;
setExpanded(newExpanded);
const params = new URLSearchParams(location.search);
if (newExpanded) {
params.delete("guide");
} else {
params.set("guide", "closed");
}
navigate({ search: params.toString() }, { replace: true });
};
return (
<Paper
elevation={0}
sx={{
mb: 3,
borderRadius: "8px !important",
border: "1px solid",
borderColor: (theme) =>
theme.palette.mode === "dark" ? "grey.800" : "grey.200",
overflow: "hidden",
}}
>
<Box
onClick={handleAccordionChange}
sx={{
p: 2,
display: "flex",
alignItems: "center",
justifyContent: "space-between",
cursor: "pointer",
bgcolor: (theme) =>
theme.palette.mode === "dark" ? "grey.900" : "grey.50",
borderBottom: "1px solid",
borderColor: (theme) =>
expanded
? theme.palette.mode === "dark"
? "grey.800"
: "grey.200"
: "transparent",
}}
>
<Typography
variant="h6"
sx={{ fontWeight: 600, color: "text.primary" }}
>
Submission Guide
</Typography>
<ExpandMoreIcon
sx={{
transform: expanded ? "rotate(180deg)" : "rotate(0deg)",
transition: "transform 0.3s",
}}
/>
</Box>
<Collapse in={expanded} appear={false}>
<Box sx={{ py: 4 }}>
<Stack spacing={4}>
{TUTORIAL_STEPS.map((step, index) => (
<Box key={step.title}>
<Stack spacing={3}>
<Stack
direction="row"
spacing={2}
alignItems="center"
sx={{ px: 4 }}
>
<StepNumber number={index + 1} />
<Typography
variant="subtitle1"
sx={{
fontWeight: 600,
color: "text.primary",
letterSpacing: "-0.01em",
}}
>
{step.title}
</Typography>
</Stack>
<Box sx={{ px: 4, pl: 7 }}>{step.content}</Box>
</Stack>
{index < TUTORIAL_STEPS.length - 1 && (
<Box
sx={{
mt: 4,
borderTop: "1px solid",
borderColor: (theme) =>
theme.palette.mode === "dark" ? "grey.800" : "grey.100",
}}
/>
)}
</Box>
))}
<Box
sx={{
mt: 4,
pt: 4,
px: 4,
borderTop: "1px solid",
borderColor: (theme) =>
theme.palette.mode === "dark" ? "grey.800" : "grey.100",
}}
>
<Stack spacing={2}>
<Typography
variant="subtitle1"
sx={{
fontWeight: 600,
color: "text.primary",
letterSpacing: "-0.01em",
}}
>
Citation
</Typography>
<Typography variant="body2" color="text.secondary">
If you use OpenEEGBench in your research, please cite it.
</Typography>
<Box
sx={{
p: 2,
bgcolor: (theme) =>
theme.palette.mode === "dark" ? "grey.50" : "grey.900",
borderRadius: 1,
overflowX: "auto",
"& pre": {
m: 0,
p: 0,
fontFamily: "monospace",
fontSize: "0.8125rem",
whiteSpace: "pre",
color: (theme) =>
theme.palette.mode === "dark" ? "grey.900" : "grey.50",
},
}}
>
<pre>{CITATION}</pre>
</Box>
</Stack>
</Box>
</Stack>
</Box>
</Collapse>
</Paper>
);
}
export default SubmissionGuide;
|