-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(traces): show all evaluations in the table" (#1819)
* feat(traces): show all evaluations in the table relay codegen * wrap
- Loading branch information
1 parent
125431a
commit 2b27333
Showing
9 changed files
with
319 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from "react"; | ||
|
||
import { Flex, Label, Text } from "@arizeai/components"; | ||
|
||
import { formatFloat } from "@phoenix/utils/numberFormatUtils"; | ||
|
||
interface Evaluation { | ||
name: string; | ||
label?: string | null; | ||
score?: number | null; | ||
} | ||
export function EvaluationLabel({ evaluation }: { evaluation: Evaluation }) { | ||
const labelValue = | ||
evaluation.label || | ||
(typeof evaluation.score == "number" && formatFloat(evaluation.score)) || | ||
"n/a"; | ||
return ( | ||
<Label color="cyan-1000"> | ||
<Flex direction="row" gap="size-50"> | ||
<Text weight="heavy" textSize="small" color="inherit"> | ||
{evaluation.name} | ||
</Text> | ||
<Text textSize="small">{labelValue}</Text> | ||
</Flex> | ||
</Label> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 41 additions & 14 deletions
55
app/src/pages/tracing/__generated__/SpansTableSpansQuery.graphql.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.