openness
Browse files
frontend/src/pages/LeaderboardPage/components/Leaderboard/constants/defaults.js
CHANGED
|
@@ -74,44 +74,52 @@ const FILTERS = {
|
|
| 74 |
|
| 75 |
// Column size constants
|
| 76 |
const COLUMN_SIZES = {
|
| 77 |
-
RANK:
|
| 78 |
-
TYPE_ICON:
|
| 79 |
-
MODEL:
|
| 80 |
-
AVERAGE_SCORE:
|
|
|
|
| 81 |
BENCHMARK: 110,
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
MOE:
|
| 95 |
-
FLAG_STATUS:
|
| 96 |
-
|
|
|
|
| 97 |
};
|
| 98 |
|
| 99 |
// Column definitions with organized structure
|
| 100 |
const COLUMNS = {
|
| 101 |
FIXED: {
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
group: "fixed",
|
| 104 |
size: COLUMN_SIZES.RANK,
|
| 105 |
defaultVisible: true,
|
| 106 |
label: "Rank",
|
| 107 |
},
|
| 108 |
-
"
|
| 109 |
group: "fixed",
|
| 110 |
size: COLUMN_SIZES.TYPE_ICON,
|
| 111 |
defaultVisible: true,
|
| 112 |
label: "Type",
|
| 113 |
},
|
| 114 |
-
id: {
|
| 115 |
group: "fixed",
|
| 116 |
size: COLUMN_SIZES.MODEL,
|
| 117 |
defaultVisible: true,
|
|
@@ -121,7 +129,13 @@ const COLUMNS = {
|
|
| 121 |
group: "fixed",
|
| 122 |
size: COLUMN_SIZES.AVERAGE_SCORE,
|
| 123 |
defaultVisible: true,
|
| 124 |
-
label: "Average
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
},
|
| 126 |
},
|
| 127 |
EVALUATION: {
|
|
@@ -141,7 +155,7 @@ const COLUMNS = {
|
|
| 141 |
},
|
| 142 |
"metadata.hub_hearts": {
|
| 143 |
group: "model_info",
|
| 144 |
-
size: COLUMN_SIZES.
|
| 145 |
defaultVisible: false,
|
| 146 |
label: "Hub ❤️",
|
| 147 |
},
|
|
|
|
| 74 |
|
| 75 |
// Column size constants
|
| 76 |
const COLUMN_SIZES = {
|
| 77 |
+
RANK: 80,
|
| 78 |
+
TYPE_ICON: 50,
|
| 79 |
+
MODEL: 220,
|
| 80 |
+
AVERAGE_SCORE: 110,
|
| 81 |
+
OPENNESS: 150,
|
| 82 |
BENCHMARK: 110,
|
| 83 |
+
ARCHITECTURE: 120,
|
| 84 |
+
PRECISION: 90,
|
| 85 |
+
PARAMS: 110,
|
| 86 |
+
LICENSE: 100,
|
| 87 |
+
HUB_LINK: 80,
|
| 88 |
+
HEARTS: 80,
|
| 89 |
+
CHAT_TEMPLATE: 90,
|
| 90 |
+
UPLOAD_DATE: 110,
|
| 91 |
+
SUBMISSION_DATE: 130,
|
| 92 |
+
GENERATION: 100,
|
| 93 |
+
BASE_MODEL: 150,
|
| 94 |
+
CO2_COST: 100,
|
| 95 |
+
MOE: 80,
|
| 96 |
+
FLAG_STATUS: 90,
|
| 97 |
+
HUB_AVAILABILITY: 110,
|
| 98 |
+
OFFICIAL_PROVIDER: 150,
|
| 99 |
};
|
| 100 |
|
| 101 |
// Column definitions with organized structure
|
| 102 |
const COLUMNS = {
|
| 103 |
FIXED: {
|
| 104 |
+
"isPinned": {
|
| 105 |
+
group: "fixed",
|
| 106 |
+
size: 40,
|
| 107 |
+
defaultVisible: true,
|
| 108 |
+
label: "Pin",
|
| 109 |
+
},
|
| 110 |
+
"rank": {
|
| 111 |
group: "fixed",
|
| 112 |
size: COLUMN_SIZES.RANK,
|
| 113 |
defaultVisible: true,
|
| 114 |
label: "Rank",
|
| 115 |
},
|
| 116 |
+
"model_type": {
|
| 117 |
group: "fixed",
|
| 118 |
size: COLUMN_SIZES.TYPE_ICON,
|
| 119 |
defaultVisible: true,
|
| 120 |
label: "Type",
|
| 121 |
},
|
| 122 |
+
"id": {
|
| 123 |
group: "fixed",
|
| 124 |
size: COLUMN_SIZES.MODEL,
|
| 125 |
defaultVisible: true,
|
|
|
|
| 129 |
group: "fixed",
|
| 130 |
size: COLUMN_SIZES.AVERAGE_SCORE,
|
| 131 |
defaultVisible: true,
|
| 132 |
+
label: "Average",
|
| 133 |
+
},
|
| 134 |
+
"model.openness": {
|
| 135 |
+
group: "fixed",
|
| 136 |
+
size: COLUMN_SIZES.OPENNESS,
|
| 137 |
+
defaultVisible: true,
|
| 138 |
+
label: "Openness",
|
| 139 |
},
|
| 140 |
},
|
| 141 |
EVALUATION: {
|
|
|
|
| 155 |
},
|
| 156 |
"metadata.hub_hearts": {
|
| 157 |
group: "model_info",
|
| 158 |
+
size: COLUMN_SIZES.HEARTS,
|
| 159 |
defaultVisible: false,
|
| 160 |
label: "Hub ❤️",
|
| 161 |
},
|
frontend/src/pages/LeaderboardPage/components/Leaderboard/utils/columnUtils.js
CHANGED
|
@@ -869,6 +869,46 @@ export const createColumns = (
|
|
| 869 |
}),
|
| 870 |
},
|
| 871 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 872 |
];
|
| 873 |
const createScoreCell = (getValue, row, field) => {
|
| 874 |
const value = getValue();
|
|
|
|
| 869 |
}),
|
| 870 |
},
|
| 871 |
},
|
| 872 |
+
{
|
| 873 |
+
accessorKey: "model.openness",
|
| 874 |
+
header: createHeaderCell("Openness", "Model openness classification"),
|
| 875 |
+
cell: ({ row }) => {
|
| 876 |
+
return (
|
| 877 |
+
<Box
|
| 878 |
+
sx={{
|
| 879 |
+
width: "100%",
|
| 880 |
+
display: "flex",
|
| 881 |
+
alignItems: "center",
|
| 882 |
+
}}
|
| 883 |
+
>
|
| 884 |
+
<Typography variant="body2">
|
| 885 |
+
Class III-Open Model
|
| 886 |
+
</Typography>
|
| 887 |
+
</Box>
|
| 888 |
+
);
|
| 889 |
+
},
|
| 890 |
+
size: 150,
|
| 891 |
+
enableSorting: false,
|
| 892 |
+
meta: {
|
| 893 |
+
headerStyle: {
|
| 894 |
+
borderRight: (theme) =>
|
| 895 |
+
`2px solid ${alpha(
|
| 896 |
+
theme.palette.divider,
|
| 897 |
+
theme.palette.mode === "dark" ? 0.1 : 0.2
|
| 898 |
+
)}`,
|
| 899 |
+
},
|
| 900 |
+
cellStyle: () => ({
|
| 901 |
+
position: "relative",
|
| 902 |
+
overflow: "hidden",
|
| 903 |
+
padding: "8px 16px",
|
| 904 |
+
borderRight: (theme) =>
|
| 905 |
+
`2px solid ${alpha(
|
| 906 |
+
theme.palette.divider,
|
| 907 |
+
theme.palette.mode === "dark" ? 0.1 : 0.2
|
| 908 |
+
)}`,
|
| 909 |
+
}),
|
| 910 |
+
},
|
| 911 |
+
},
|
| 912 |
];
|
| 913 |
const createScoreCell = (getValue, row, field) => {
|
| 914 |
const value = getValue();
|