From 02f3ec491f36dca2166bff5aa869169036b450b5 Mon Sep 17 00:00:00 2001 From: farzaank Date: Wed, 25 Oct 2023 12:40:20 -0700 Subject: [PATCH] fixed fmt --- src/helm-frontend/src/App.tsx | 32 +-- .../src/components/NavBar/NavBar.tsx | 110 ++++---- .../src/components/NavDropdown.tsx | 138 +++++----- src/helm-frontend/src/routes/Home.tsx | 258 +++++++++--------- .../src/routes/LegacyLanding.tsx | 246 ++++++++--------- 5 files changed, 392 insertions(+), 392 deletions(-) diff --git a/src/helm-frontend/src/App.tsx b/src/helm-frontend/src/App.tsx index 9ce523468cb..7c77983fabe 100644 --- a/src/helm-frontend/src/App.tsx +++ b/src/helm-frontend/src/App.tsx @@ -10,20 +10,20 @@ import Runs from "@/routes/Runs"; import Run from "@/routes/Run"; import LegacyLanding from "@/routes/LegacyLanding"; export default function App() { - return ( - - - }> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - - - ); + return ( + + + }> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + + + ); } diff --git a/src/helm-frontend/src/components/NavBar/NavBar.tsx b/src/helm-frontend/src/components/NavBar/NavBar.tsx index ffe6c61f798..26bfa8ee4f4 100644 --- a/src/helm-frontend/src/components/NavBar/NavBar.tsx +++ b/src/helm-frontend/src/components/NavBar/NavBar.tsx @@ -5,59 +5,59 @@ import crfmLogo from "@/assets/crfm-logo.png"; import NavDropdown from "@/components/NavDropdown"; export default function NavBar() { - return ( - - ); + return ( + + ); } diff --git a/src/helm-frontend/src/components/NavDropdown.tsx b/src/helm-frontend/src/components/NavDropdown.tsx index 37c5c2c8cbe..f93780afbdc 100644 --- a/src/helm-frontend/src/components/NavDropdown.tsx +++ b/src/helm-frontend/src/components/NavDropdown.tsx @@ -2,78 +2,78 @@ import { useState } from "react"; import { Link } from "react-router-dom"; function NavDropdown() { - const [dropdownOpen, setDropdownOpen] = useState(false); + const [dropdownOpen, setDropdownOpen] = useState(false); - return ( -
-
- - Image 1 - + return ( +
+
+ + Image 1 + - {/* Chevron Button */} - -
+ {/* Chevron Button */} + +
- {dropdownOpen && ( -
-
-
- - Image 1 - -
-
- - Image 2 - -
-
-
- )} -
- ); + {dropdownOpen && ( +
+
+
+ + Image 1 + +
+
+ + Image 2 + +
+
+
+ )} +
+ ); } export default NavDropdown; diff --git a/src/helm-frontend/src/routes/Home.tsx b/src/helm-frontend/src/routes/Home.tsx index 0d5d7e4190b..b6cede81b17 100644 --- a/src/helm-frontend/src/routes/Home.tsx +++ b/src/helm-frontend/src/routes/Home.tsx @@ -11,144 +11,144 @@ import Loading from "@/components/Loading"; import getGroupsTables from "@/services/getGroupsTables"; interface GroupDisplayData { - title: string; - name: string; + title: string; + name: string; } export default function Group() { - const defaultGroup = { title: "Core Scenarios", name: "core_scenarios" }; - //const defaultGroup.name = "core_scenarios"; - const [allGroupData, setAllGroupData] = useState([]); - const [selectedGroupDisplayData, setSelectedGroupDisplayData] = - useState(defaultGroup); - const [groupsTables, setGroupsTables] = useState([]); - const [groupMetadata, setGroupMetadata] = useState< - GroupMetadata | undefined - >(); - const [isLoading, setIsLoading] = useState(true); - const [activeGroup, setActiveGroup] = useState(0); - console.log(allGroupData); + const defaultGroup = { title: "Core Scenarios", name: "core_scenarios" }; + //const defaultGroup.name = "core_scenarios"; + const [allGroupData, setAllGroupData] = useState([]); + const [selectedGroupDisplayData, setSelectedGroupDisplayData] = + useState(defaultGroup); + const [groupsTables, setGroupsTables] = useState([]); + const [groupMetadata, setGroupMetadata] = useState< + GroupMetadata | undefined + >(); + const [isLoading, setIsLoading] = useState(true); + const [activeGroup, setActiveGroup] = useState(0); + console.log(allGroupData); - function findMatchingGroup( - allGroupData: GroupDisplayData[], - target: string - ): GroupDisplayData { - console.log(allGroupData, target); - const searchResult = allGroupData.find((group) => group.title === target); - if (searchResult != undefined) { - return searchResult; - } else { - return defaultGroup; - } - } + function findMatchingGroup( + allGroupData: GroupDisplayData[], + target: string, + ): GroupDisplayData { + console.log(allGroupData, target); + const searchResult = allGroupData.find((group) => group.title === target); + if (searchResult != undefined) { + return searchResult; + } else { + return defaultGroup; + } + } - function updateLeaderboard(allGroupData: GroupDisplayData[], target: string) { - setSelectedGroupDisplayData(findMatchingGroup(allGroupData, target)); - } + function updateLeaderboard(allGroupData: GroupDisplayData[], target: string) { + setSelectedGroupDisplayData(findMatchingGroup(allGroupData, target)); + } - useEffect(() => { - const controller = new AbortController(); - async function fetchData() { - if (selectedGroupDisplayData.name === undefined) { - return; - } - const groups = await getGroupsTables(controller.signal); - const result: GroupDisplayData[] = []; - groups.forEach((group) => { - group.rows.forEach((row) => { - result.push({ - title: String(row[0].value), - name: row[0].href.replace("?group=", ""), - }); - }); - }); - setAllGroupData(result); + useEffect(() => { + const controller = new AbortController(); + async function fetchData() { + if (selectedGroupDisplayData.name === undefined) { + return; + } + const groups = await getGroupsTables(controller.signal); + const result: GroupDisplayData[] = []; + groups.forEach((group) => { + group.rows.forEach((row) => { + result.push({ + title: String(row[0].value), + name: row[0].href.replace("?group=", ""), + }); + }); + }); + setAllGroupData(result); - const [group, metadata] = await Promise.all([ - getGroupsTablesByName(selectedGroupDisplayData.name, controller.signal), - getGroupsMetadata(controller.signal), - ]); - setGroupsTables(group); - setGroupMetadata(metadata[selectedGroupDisplayData.name]); - setIsLoading(false); - } + const [group, metadata] = await Promise.all([ + getGroupsTablesByName(selectedGroupDisplayData.name, controller.signal), + getGroupsMetadata(controller.signal), + ]); + setGroupsTables(group); + setGroupMetadata(metadata[selectedGroupDisplayData.name]); + setIsLoading(false); + } - void fetchData(); - return () => controller.abort(); - }, [selectedGroupDisplayData]); + void fetchData(); + return () => controller.abort(); + }, [selectedGroupDisplayData]); - if (isLoading || groupMetadata === undefined) { - return ; - } + if (isLoading || groupMetadata === undefined) { + return ; + } - if (groupsTables.length === 0) { - return ( - <> - -
-

Group currently has no results.

- - ); - } + if (groupsTables.length === 0) { + return ( + <> + +
+

Group currently has no results.

+ + ); + } - return ( - <> -
- -
- - -
-
-
- {groupsTables.length > 1 ? ( - - {groupsTables.map((groupsTable, idx) => ( - setActiveGroup(idx)} - > - {groupsTable.title} - - ))} - - ) : null} -
- - - ); + return ( + <> +
+ +
+ + +
+
+
+ {groupsTables.length > 1 ? ( + + {groupsTables.map((groupsTable, idx) => ( + setActiveGroup(idx)} + > + {groupsTable.title} + + ))} + + ) : null} +
+ + + ); } diff --git a/src/helm-frontend/src/routes/LegacyLanding.tsx b/src/helm-frontend/src/routes/LegacyLanding.tsx index 1ad70170d22..0d829193226 100644 --- a/src/helm-frontend/src/routes/LegacyLanding.tsx +++ b/src/helm-frontend/src/routes/LegacyLanding.tsx @@ -25,136 +25,136 @@ import tsinghuaKeg from "@/assets/logos/tsinghua-keg.png"; import yandex from "@/assets/logos/yandex.png"; const logos = [ - ai21, - anthropic, - bigscience, - cohere, - eleutherai, - google, - meta, - microsoft, - nvidia, - openai, - together, - tsinghuaKeg, - yandex, + ai21, + anthropic, + bigscience, + cohere, + eleutherai, + google, + meta, + microsoft, + nvidia, + openai, + together, + tsinghuaKeg, + yandex, ]; export default function LegacyLanding() { - const [schema, setSchema] = useState(undefined); + const [schema, setSchema] = useState(undefined); - useEffect(() => { - const controller = new AbortController(); - async function fetchData() { - const schema = await getSchema(controller.signal); - setSchema(schema); - } + useEffect(() => { + const controller = new AbortController(); + async function fetchData() { + const schema = await getSchema(controller.signal); + setSchema(schema); + } - void fetchData(); - return () => controller.abort(); - }, []); + void fetchData(); + return () => controller.abort(); + }, []); - if (!schema) { - return null; - } + if (!schema) { + return null; + } - return ( - <> - -
- {" "} -

- About HELM -

-
-
- - - - - - - - - -
-
-

- A language model takes in text and produces text: - Language model diagram -

+ return ( + <> + +
+ {" "} +

+ About HELM +

+
+
+ + + + + + + + + +
+
+

+ A language model takes in text and produces text: + Language model diagram +

-

- Despite their simplicity, language models are increasingly functioning - as the foundation for almost all language technologies from question - answering to summarization. But their immense capabilities and risks - are not well understood. Holistic Evaluation of Language Models (HELM) - is a living benchmark that aims to improve the transparency of - language models. -

+

+ Despite their simplicity, language models are increasingly functioning + as the foundation for almost all language technologies from question + answering to summarization. But their immense capabilities and risks + are not well understood. Holistic Evaluation of Language Models (HELM) + is a living benchmark that aims to improve the transparency of + language models. +

-
    -
  1. - Broad coverage and recognition of incompleteness.{" "} - We define a taxonomy over the scenarios we would ideally like to - evaluate, select scenarios and metrics to cover the space and make - explicit what is missing. - Taxonomy scenarios chart -
  2. -
  3. - Multi-metric measurement. Rather than focus on - isolated metrics such as accuracy, we simultaneously measure - multiple metrics (e.g., accuracy, robustness, calibration, - efficiency) for each scenario, allowing analysis of tradeoffs. - Scenarios by metrics table -
  4. -
  5. - Standardization. We evaluate all the models that we - have access to on the same scenarios with the same adaptation - strategy (e.g., prompting), allowing for controlled comparisons. - Thanks to all the companies for providing API access to the - limited-access and closed models and{" "} - - Together - {" "} - for providing the infrastructure to run the open models. -
    - {logos.map((logo, idx) => ( -
    - Logo -
    - ))} -
    -
  6. -
-
-
-
- - - -
-
- - ); +
    +
  1. + Broad coverage and recognition of incompleteness.{" "} + We define a taxonomy over the scenarios we would ideally like to + evaluate, select scenarios and metrics to cover the space and make + explicit what is missing. + Taxonomy scenarios chart +
  2. +
  3. + Multi-metric measurement. Rather than focus on + isolated metrics such as accuracy, we simultaneously measure + multiple metrics (e.g., accuracy, robustness, calibration, + efficiency) for each scenario, allowing analysis of tradeoffs. + Scenarios by metrics table +
  4. +
  5. + Standardization. We evaluate all the models that we + have access to on the same scenarios with the same adaptation + strategy (e.g., prompting), allowing for controlled comparisons. + Thanks to all the companies for providing API access to the + limited-access and closed models and{" "} + + Together + {" "} + for providing the infrastructure to run the open models. +
    + {logos.map((logo, idx) => ( +
    + Logo +
    + ))} +
    +
  6. +
+
+
+
+ + + +
+
+ + ); }