Spaces:
Running
Running
Commit ·
31167c5
1
Parent(s): 755439a
Link dataset column headers to HF dataset pages
Browse filesEach benchmark column header (BCIC-2a, PhysioNet, ISRUC, etc.) is now
a hyperlink to its braindecode HF dataset page. The existing hover
tooltip with dataset details is preserved. The link opens in a new tab
and shows an underline on hover.
frontend/src/pages/LeaderboardPage/components/Leaderboard/utils/columnUtils.js
CHANGED
|
@@ -274,12 +274,24 @@ const RankIndicator = ({ rank, previousRank, mode }) => {
|
|
| 274 |
);
|
| 275 |
};
|
| 276 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 277 |
const getDetailsUrl = (modelName) => {
|
| 278 |
const formattedName = modelName.replace("/", "__");
|
| 279 |
return `https://huggingface.co/datasets/braindecode/${formattedName}-details`;
|
| 280 |
};
|
| 281 |
|
| 282 |
-
const HeaderLabel = ({ label, tooltip, className, isSorted }) => (
|
| 283 |
<Tooltip
|
| 284 |
title={label}
|
| 285 |
arrow
|
|
@@ -289,12 +301,28 @@ const HeaderLabel = ({ label, tooltip, className, isSorted }) => (
|
|
| 289 |
>
|
| 290 |
<Typography
|
| 291 |
className={className}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
sx={{
|
| 293 |
fontWeight: 600,
|
| 294 |
color: isSorted ? "primary.main" : "grey.700",
|
| 295 |
flex: 1,
|
| 296 |
transition: "max-width 0.2s ease",
|
| 297 |
maxWidth: "100%",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
...(label === "Rank" || label === "Type"
|
| 299 |
? {
|
| 300 |
overflow: "visible",
|
|
@@ -333,7 +361,7 @@ const InfoIcon = ({ tooltip }) => (
|
|
| 333 |
</Box>
|
| 334 |
);
|
| 335 |
|
| 336 |
-
const createHeaderCell = (label, tooltip) => (header) =>
|
| 337 |
(
|
| 338 |
<Box
|
| 339 |
className="header-content"
|
|
@@ -349,6 +377,7 @@ const createHeaderCell = (label, tooltip) => (header) =>
|
|
| 349 |
tooltip={tooltip}
|
| 350 |
className="header-label"
|
| 351 |
isSorted={header?.column?.getIsSorted()}
|
|
|
|
| 352 |
/>
|
| 353 |
|
| 354 |
<Box
|
|
@@ -751,7 +780,7 @@ export const createColumns = (
|
|
| 751 |
const evaluationColumns = [
|
| 752 |
{
|
| 753 |
accessorKey: "evaluations.bcic2a.normalized_score",
|
| 754 |
-
header: createHeaderCell("BCIC-2a", COLUMN_TOOLTIPS.BCIC2A),
|
| 755 |
cell: ({ row, getValue }) =>
|
| 756 |
createScoreCell(getValue, row, "evaluations.bcic2a.normalized_score"),
|
| 757 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
@@ -760,7 +789,7 @@ export const createColumns = (
|
|
| 760 |
},
|
| 761 |
{
|
| 762 |
accessorKey: "evaluations.physionet.normalized_score",
|
| 763 |
-
header: createHeaderCell("PhysioNet", COLUMN_TOOLTIPS.PHYSIONET),
|
| 764 |
cell: ({ row, getValue }) =>
|
| 765 |
createScoreCell(getValue, row, "evaluations.physionet.normalized_score"),
|
| 766 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
@@ -769,7 +798,7 @@ export const createColumns = (
|
|
| 769 |
},
|
| 770 |
{
|
| 771 |
accessorKey: "evaluations.isruc_sleep.normalized_score",
|
| 772 |
-
header: createHeaderCell("ISRUC", COLUMN_TOOLTIPS.ISRUC_SLEEP),
|
| 773 |
cell: ({ row, getValue }) =>
|
| 774 |
createScoreCell(getValue, row, "evaluations.isruc_sleep.normalized_score"),
|
| 775 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
@@ -778,7 +807,7 @@ export const createColumns = (
|
|
| 778 |
},
|
| 779 |
{
|
| 780 |
accessorKey: "evaluations.tuab.normalized_score",
|
| 781 |
-
header: createHeaderCell("TUAB", COLUMN_TOOLTIPS.TUAB),
|
| 782 |
cell: ({ row, getValue }) =>
|
| 783 |
createScoreCell(getValue, row, "evaluations.tuab.normalized_score"),
|
| 784 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
@@ -787,7 +816,7 @@ export const createColumns = (
|
|
| 787 |
},
|
| 788 |
{
|
| 789 |
accessorKey: "evaluations.tuev.normalized_score",
|
| 790 |
-
header: createHeaderCell("TUEV", COLUMN_TOOLTIPS.TUEV),
|
| 791 |
cell: ({ row, getValue }) =>
|
| 792 |
createScoreCell(getValue, row, "evaluations.tuev.normalized_score"),
|
| 793 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
@@ -796,7 +825,7 @@ export const createColumns = (
|
|
| 796 |
},
|
| 797 |
{
|
| 798 |
accessorKey: "evaluations.chbmit.normalized_score",
|
| 799 |
-
header: createHeaderCell("CHB-MIT", COLUMN_TOOLTIPS.CHBMIT),
|
| 800 |
cell: ({ row, getValue }) =>
|
| 801 |
createScoreCell(getValue, row, "evaluations.chbmit.normalized_score"),
|
| 802 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
@@ -805,7 +834,7 @@ export const createColumns = (
|
|
| 805 |
},
|
| 806 |
{
|
| 807 |
accessorKey: "evaluations.faced.normalized_score",
|
| 808 |
-
header: createHeaderCell("FACED", COLUMN_TOOLTIPS.FACED),
|
| 809 |
cell: ({ row, getValue }) =>
|
| 810 |
createScoreCell(getValue, row, "evaluations.faced.normalized_score"),
|
| 811 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
@@ -814,7 +843,7 @@ export const createColumns = (
|
|
| 814 |
},
|
| 815 |
{
|
| 816 |
accessorKey: "evaluations.seedv.normalized_score",
|
| 817 |
-
header: createHeaderCell("SEED-V", COLUMN_TOOLTIPS.SEEDV),
|
| 818 |
cell: ({ row, getValue }) =>
|
| 819 |
createScoreCell(getValue, row, "evaluations.seedv.normalized_score"),
|
| 820 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
|
|
| 274 |
);
|
| 275 |
};
|
| 276 |
|
| 277 |
+
// Hugging Face dataset URLs for each benchmark
|
| 278 |
+
const DATASET_URLS = {
|
| 279 |
+
bcic2a: "https://huggingface.co/datasets/braindecode/bcic-iv-2a",
|
| 280 |
+
physionet: "https://huggingface.co/datasets/braindecode/physionet-mi",
|
| 281 |
+
isruc_sleep: "https://huggingface.co/datasets/braindecode/isruc-sleep",
|
| 282 |
+
tuab: "https://huggingface.co/datasets/braindecode/tuab",
|
| 283 |
+
tuev: "https://huggingface.co/datasets/braindecode/tuev",
|
| 284 |
+
chbmit: "https://huggingface.co/datasets/braindecode/chb-mit",
|
| 285 |
+
faced: "https://huggingface.co/datasets/braindecode/faced",
|
| 286 |
+
seedv: "https://huggingface.co/datasets/braindecode/seed-v",
|
| 287 |
+
};
|
| 288 |
+
|
| 289 |
const getDetailsUrl = (modelName) => {
|
| 290 |
const formattedName = modelName.replace("/", "__");
|
| 291 |
return `https://huggingface.co/datasets/braindecode/${formattedName}-details`;
|
| 292 |
};
|
| 293 |
|
| 294 |
+
const HeaderLabel = ({ label, tooltip, className, isSorted, href }) => (
|
| 295 |
<Tooltip
|
| 296 |
title={label}
|
| 297 |
arrow
|
|
|
|
| 301 |
>
|
| 302 |
<Typography
|
| 303 |
className={className}
|
| 304 |
+
{...(href
|
| 305 |
+
? {
|
| 306 |
+
component: "a",
|
| 307 |
+
href,
|
| 308 |
+
target: "_blank",
|
| 309 |
+
rel: "noopener noreferrer",
|
| 310 |
+
}
|
| 311 |
+
: {})}
|
| 312 |
sx={{
|
| 313 |
fontWeight: 600,
|
| 314 |
color: isSorted ? "primary.main" : "grey.700",
|
| 315 |
flex: 1,
|
| 316 |
transition: "max-width 0.2s ease",
|
| 317 |
maxWidth: "100%",
|
| 318 |
+
textDecoration: "none",
|
| 319 |
+
...(href
|
| 320 |
+
? {
|
| 321 |
+
"&:hover": {
|
| 322 |
+
textDecoration: "underline",
|
| 323 |
+
},
|
| 324 |
+
}
|
| 325 |
+
: {}),
|
| 326 |
...(label === "Rank" || label === "Type"
|
| 327 |
? {
|
| 328 |
overflow: "visible",
|
|
|
|
| 361 |
</Box>
|
| 362 |
);
|
| 363 |
|
| 364 |
+
const createHeaderCell = (label, tooltip, href) => (header) =>
|
| 365 |
(
|
| 366 |
<Box
|
| 367 |
className="header-content"
|
|
|
|
| 377 |
tooltip={tooltip}
|
| 378 |
className="header-label"
|
| 379 |
isSorted={header?.column?.getIsSorted()}
|
| 380 |
+
href={href}
|
| 381 |
/>
|
| 382 |
|
| 383 |
<Box
|
|
|
|
| 780 |
const evaluationColumns = [
|
| 781 |
{
|
| 782 |
accessorKey: "evaluations.bcic2a.normalized_score",
|
| 783 |
+
header: createHeaderCell("BCIC-2a", COLUMN_TOOLTIPS.BCIC2A, DATASET_URLS.bcic2a),
|
| 784 |
cell: ({ row, getValue }) =>
|
| 785 |
createScoreCell(getValue, row, "evaluations.bcic2a.normalized_score"),
|
| 786 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
|
|
| 789 |
},
|
| 790 |
{
|
| 791 |
accessorKey: "evaluations.physionet.normalized_score",
|
| 792 |
+
header: createHeaderCell("PhysioNet", COLUMN_TOOLTIPS.PHYSIONET, DATASET_URLS.physionet),
|
| 793 |
cell: ({ row, getValue }) =>
|
| 794 |
createScoreCell(getValue, row, "evaluations.physionet.normalized_score"),
|
| 795 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
|
|
| 798 |
},
|
| 799 |
{
|
| 800 |
accessorKey: "evaluations.isruc_sleep.normalized_score",
|
| 801 |
+
header: createHeaderCell("ISRUC", COLUMN_TOOLTIPS.ISRUC_SLEEP, DATASET_URLS.isruc_sleep),
|
| 802 |
cell: ({ row, getValue }) =>
|
| 803 |
createScoreCell(getValue, row, "evaluations.isruc_sleep.normalized_score"),
|
| 804 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
|
|
| 807 |
},
|
| 808 |
{
|
| 809 |
accessorKey: "evaluations.tuab.normalized_score",
|
| 810 |
+
header: createHeaderCell("TUAB", COLUMN_TOOLTIPS.TUAB, DATASET_URLS.tuab),
|
| 811 |
cell: ({ row, getValue }) =>
|
| 812 |
createScoreCell(getValue, row, "evaluations.tuab.normalized_score"),
|
| 813 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
|
|
| 816 |
},
|
| 817 |
{
|
| 818 |
accessorKey: "evaluations.tuev.normalized_score",
|
| 819 |
+
header: createHeaderCell("TUEV", COLUMN_TOOLTIPS.TUEV, DATASET_URLS.tuev),
|
| 820 |
cell: ({ row, getValue }) =>
|
| 821 |
createScoreCell(getValue, row, "evaluations.tuev.normalized_score"),
|
| 822 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
|
|
| 825 |
},
|
| 826 |
{
|
| 827 |
accessorKey: "evaluations.chbmit.normalized_score",
|
| 828 |
+
header: createHeaderCell("CHB-MIT", COLUMN_TOOLTIPS.CHBMIT, DATASET_URLS.chbmit),
|
| 829 |
cell: ({ row, getValue }) =>
|
| 830 |
createScoreCell(getValue, row, "evaluations.chbmit.normalized_score"),
|
| 831 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
|
|
| 834 |
},
|
| 835 |
{
|
| 836 |
accessorKey: "evaluations.faced.normalized_score",
|
| 837 |
+
header: createHeaderCell("FACED", COLUMN_TOOLTIPS.FACED, DATASET_URLS.faced),
|
| 838 |
cell: ({ row, getValue }) =>
|
| 839 |
createScoreCell(getValue, row, "evaluations.faced.normalized_score"),
|
| 840 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
|
|
|
| 843 |
},
|
| 844 |
{
|
| 845 |
accessorKey: "evaluations.seedv.normalized_score",
|
| 846 |
+
header: createHeaderCell("SEED-V", COLUMN_TOOLTIPS.SEEDV, DATASET_URLS.seedv),
|
| 847 |
cell: ({ row, getValue }) =>
|
| 848 |
createScoreCell(getValue, row, "evaluations.seedv.normalized_score"),
|
| 849 |
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|