Skip to content

Commit

Permalink
fix: remove expected from inputs interface
Browse files Browse the repository at this point in the history
  • Loading branch information
saikatmitra91 committed May 22, 2024
1 parent d8e87e4 commit 9a42b0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 32 deletions.
33 changes: 6 additions & 27 deletions apps/web/components/sample-output-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,12 @@ export default function SampleOutputCard({
const showCompareAgainst = useMemo(
() =>
!baseSample?.output.tool_calls?.length &&
(baseSample?.expected?.value ||
comparisonSamples?.some(
(comparisonSample, index) =>
comparisonSample?.output &&
comparisonResults?.[index]?.id !== baseResult?.id,
)),
[
baseResult?.id,
baseSample?.expected?.value,
comparisonResults,
comparisonSamples,
],
comparisonSamples?.some(
(comparisonSample, index) =>
comparisonSample?.output &&
comparisonResults?.[index]?.id !== baseResult?.id,
),
[baseResult?.id, comparisonResults, comparisonSamples],
);

const clearDiffView = useCallback(() => {
Expand Down Expand Up @@ -163,21 +157,6 @@ export default function SampleOutputCard({
>
<span className="text-xs">none</span>
</DropdownMenuCheckboxItem>
{baseSample?.expected?.value && (
<DropdownMenuCheckboxItem
checked={
diffView.enabled && diffView.type === "expected"
}
onCheckedChange={() => {
enableDiffView({
type: "expected",
text: baseSample?.expected?.value || "",
});
}}
>
<span className="text-xs">expected</span>
</DropdownMenuCheckboxItem>
)}
{comparisonSamples?.map((s, i) => {
const result = comparisonResults?.[i];
if (result?.id === baseResult.id) {
Expand Down
5 changes: 0 additions & 5 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ export type DatasetSampleInputs = any;
export type DatasetSample = {
id: string;
inputs: DatasetSampleInputs;
expected?: string;
};

export type Dataset = {
Expand All @@ -183,7 +182,6 @@ export type Dataset = {
export type DatasetSampleConfig = {
id?: string;
inputs: DatasetSampleInputs;
expected?: string;
};

export type DatasetConfig =
Expand Down Expand Up @@ -215,9 +213,6 @@ export type RunSampleOutput = {
scores?: Score[];
inputs: DatasetSampleInputs;
output: RunOutput;
expected?: {
value: string;
};
error?: {
code?: string;
message: string;
Expand Down

0 comments on commit 9a42b0c

Please sign in to comment.