MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / EvalsTable

Function EvalsTable

app/src/components/evals/EvalsTable.tsx:21–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19import { ProjectLink } from "../ProjectLink";
20
21const EvalsTable = () => {
22 const { data: datasetEvals, isLoading } = useDatasetEvals();
23
24 return (
25 <Card width="100%" overflowX="auto">
26 <Skeleton isLoaded={!isLoading}>
27 {datasetEvals?.length ? (
28 <Table>
29 <Thead>
30 <Tr>
31 <Th>Name</Th>
32 <Th>Created At</Th>
33 <Th>Models</Th>
34 <Th>Dataset Entries</Th>
35 <Th>Dataset</Th>
36 </Tr>
37 </Thead>
38 <Tbody>
39 {datasetEvals.map((datasetEval) => {
40 return (
41 <Tr key={datasetEval.id}>
42 <Td>
43 <ProjectLink
44 href={{ pathname: "/evals/[id]", query: { id: datasetEval.id } }}
45 >
46 <Text color="blue.600">{datasetEval.name}</Text>
47 </ProjectLink>
48 </Td>
49 <Td>{dayjs(datasetEval.createdAt).format("MMMM D h:mm A")}</Td>
50 <Td>{datasetEval.numModels.toLocaleString()}</Td>
51 <Td>{datasetEval.numRows.toLocaleString()}</Td>
52 <Td>
53 <ViewDatasetButton
54 buttonText={datasetEval.datasetName}
55 datasetId={datasetEval.datasetId}
56 />
57 </Td>
58 </Tr>
59 );
60 })}
61 </Tbody>
62 </Table>
63 ) : (
64 <VStack py={8}>
65 <Icon as={FaTable} boxSize={16} color="gray.300" />
66 <Text color="gray.500" textAlign="center" w="full" p={4}>
67 This project has no evals. Start with a dataset in the{" "}
68 <ProjectLink href="/datasets">
69 <Text as="span" color="blue.600">
70 Datasets
71 </Text>
72 </ProjectLink>{" "}
73 tab.
74 </Text>
75 </VStack>
76 )}
77 </Skeleton>
78 </Card>

Callers

nothing calls this directly

Calls 1

useDatasetEvalsFunction · 0.90

Tested by

no test coverage detected