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 }) => ( ); const StepNumber = ({ number }) => ( {number} ); const TUTORIAL_STEPS = [ { title: "Model Information", content: ( Your model should be public on the Hub and follow the{" "} username/model-id format (e.g. braindecode/labram-lora-bcic2a). Specify the revision{" "} (commit hash or branch) and adapter method used for fine-tuning. Model uploading guide ), }, { title: "Technical Details", content: ( Make sure your model can be loaded locally before submitting. The arena evaluates EEG foundation models with PEFT adapters: 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", }, }} >
            {`from braindecode.models import LaBraM
from peft import get_peft_model, LoraConfig

# Load the foundation model
model = LaBraM(n_chans=22, n_outputs=4, n_times=1000)

# Apply a PEFT adapter (e.g., LoRA)
peft_config = LoraConfig(
    r=16, lora_alpha=32,
    target_modules=["qkv"],
    lora_dropout=0.1,
)
model = get_peft_model(model, peft_config)
print(model.print_trainable_parameters())`}
          
Braindecode documentation
), }, { title: "License Requirements", content: ( A license tag is required.{" "} Open licenses (Apache, MIT, etc) are strongly recommended. About model licenses ), }, { title: "Model Card Requirements", content: ( Your model card must include: foundation model (e.g. LaBraM, EEGPT, BIOT), adapter method (LoRA, IA3, etc.),{" "} training details,{" "} dataset information (EEG paradigm, number of channels, sampling rate), and performance metrics. Model cards guide ), }, { title: "Final Checklist", content: ( Ensure your model is public, uses{" "} safetensors format, has a{" "} license tag, and loads correctly{" "} with braindecode + PEFT. HuggingFace PEFT documentation ), }, ]; 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 ( theme.palette.mode === "dark" ? "grey.800" : "grey.200", overflow: "hidden", }} > theme.palette.mode === "dark" ? "grey.900" : "grey.50", borderBottom: "1px solid", borderColor: (theme) => expanded ? theme.palette.mode === "dark" ? "grey.800" : "grey.200" : "transparent", }} > Submission Guide {TUTORIAL_STEPS.map((step, index) => ( {step.title} {step.content} {index < TUTORIAL_STEPS.length - 1 && ( theme.palette.mode === "dark" ? "grey.800" : "grey.100", }} /> )} ))} ); } export default SubmissionGuide;