Skip to content

Commit

Permalink
Update numModelsToAutoFilter in MiniLeaderboard to be customizable (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
farzaank authored Apr 23, 2024
1 parent 6059b65 commit ffc775c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion helm-frontend/src/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function Hero() {
className="py-2 pb-6 rounded-3xl bg-gray-100 h-full" // Stretched to full height
style={{ maxWidth: "100%" }}
>
<MiniLeaderboard></MiniLeaderboard>
<MiniLeaderboard />
<div className="flex justify-end">
<Link to="leaderboard">
<button className="px-4 mx-3 mt-1 btn bg-white rounded-md">
Expand Down
8 changes: 5 additions & 3 deletions helm-frontend/src/components/Landing/MMLULanding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export default function MMLULanding() {
Massive Multitask Language Understanding (MMLU) on HELM
</h1>

<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
<div>
<div className="flex flex-row md:flex-row items-center gap-8">
<div className="flex-1 text-xl">
<p>
<strong>Massive Multitask Language Understanding (MMLU)</strong>{" "}
<a href="https://arxiv.org/pdf/2009.03300.pdf" className="link">
Expand All @@ -31,7 +31,9 @@ export default function MMLULanding() {
</a>
</div>
</div>
<MiniLeaderboard />
<div className="flex-1">
<MiniLeaderboard numModelsToAutoFilter={10} />
</div>
</div>
</div>
);
Expand Down
7 changes: 5 additions & 2 deletions helm-frontend/src/components/MiniLeaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ interface GroupDisplayData {
name: string;
}

export default function MiniLeaderboard() {
interface Props {
numModelsToAutoFilter?: number;
}
export default function MiniLeaderboard({ numModelsToAutoFilter = 6 }: Props) {
const [allGroupData, setAllGroupData] = useState<GroupDisplayData[]>([]);
const [groupsTables, setGroupsTables] = useState<GroupsTable[]>([]);
const [groupMetadata, setGroupMetadata] = useState<
Expand Down Expand Up @@ -78,7 +81,7 @@ export default function MiniLeaderboard() {
<MiniLeaderboardTables
groupsTables={groupsTables}
activeGroup={activeGroup}
numModelsToAutoFilter={6}
numModelsToAutoFilter={numModelsToAutoFilter}
filteredCols={[0, 1]}
/>
</>
Expand Down

0 comments on commit ffc775c

Please sign in to comment.