Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Evaluations - Support for Inspect AI #142

Merged
merged 55 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
b178105
Pagination bug
karthikscale3 Apr 4, 2024
af47e53
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 4, 2024
cc6ab77
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 4, 2024
677b1aa
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 4, 2024
f996899
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 4, 2024
0e963e2
Bug fix
karthikscale3 Apr 5, 2024
f3a8a23
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 5, 2024
3c353a5
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 5, 2024
94f0fb1
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 7, 2024
f22f397
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 8, 2024
5023d1f
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 9, 2024
4178d5c
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 11, 2024
4fe4108
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 13, 2024
784f09c
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 14, 2024
42f1128
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 19, 2024
0c8e92b
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 24, 2024
28227d9
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 28, 2024
0cec8be
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 28, 2024
eae354d
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 7, 2024
7723147
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 7, 2024
31bfd5f
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 7, 2024
1b9c986
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
31f50e6
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
4e30354
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
9cbb929
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
bee3df8
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
186f82b
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 13, 2024
2099f1d
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 13, 2024
047f9b6
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 13, 2024
194c65e
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 17, 2024
63eb067
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 20, 2024
3a44486
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 21, 2024
9ad8c44
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 21, 2024
5605411
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 21, 2024
eb53696
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 21, 2024
1d29604
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 22, 2024
020a3a9
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 22, 2024
b9b73db
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 22, 2024
a41a9f0
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 7, 2024
6111ef5
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 7, 2024
af27884
Experiments view
karthikscale3 Jun 10, 2024
f94b472
re-order
karthikscale3 Jun 10, 2024
a04cb3a
Comparison view
karthikscale3 Jun 10, 2024
80e7c7d
Experiment report
karthikscale3 Jun 11, 2024
577eea3
Experiments - hook up APIs
karthikscale3 Jun 13, 2024
699f37e
Experiments pagination
karthikscale3 Jun 13, 2024
987173f
deduplicate paginated data
karthikscale3 Jun 13, 2024
1930af7
Fix loading and error states - experiments
karthikscale3 Jun 13, 2024
5bb4741
Rename experiments and evaluations
karthikscale3 Jun 13, 2024
b165588
Add loading spinner
karthikscale3 Jun 13, 2024
2d30fe9
Link evaluation
karthikscale3 Jun 13, 2024
405dc92
Link to evals
karthikscale3 Jun 13, 2024
dca1611
Fixes
karthikscale3 Jun 13, 2024
b9f5e83
Fix merge commit
karthikscale3 Jun 13, 2024
4a5ea2c
Minor UI fixes
karthikscale3 Jun 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
"use client";

import { EvalChart } from "@/components/charts/eval-chart";
import LargeChartSkeleton from "@/components/charts/large-chart-skeleton";
import { CreateTest } from "@/components/evaluate/create-test";
import { EditTest } from "@/components/evaluate/edit-test";
import { CreateTest } from "@/components/annotations/create-test";
import { EditTest } from "@/components/annotations/edit-test";
import EvaluationTable, {
EvaluationTableSkeleton,
} from "@/components/evaluate/evaluation-table";
} from "@/components/annotations/evaluation-table";
import { EvalChart } from "@/components/charts/eval-chart";
import LargeChartSkeleton from "@/components/charts/large-chart-skeleton";
import { AddtoDataset } from "@/components/shared/add-to-dataset";
import { Separator } from "@/components/ui/separator";
import { Skeleton } from "@/components/ui/skeleton";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import { Test } from "@prisma/client";
import { RabbitIcon } from "lucide-react";
import { useParams } from "next/navigation";
Expand Down Expand Up @@ -75,7 +73,7 @@ export default function PageClient({ email }: { email: string }) {
return (
<div className="w-full flex flex-col gap-4">
<div className="md:px-24 px-12 py-12 flex justify-between bg-muted">
<h1 className="text-3xl font-semibold">Evaluations</h1>
<h1 className="text-3xl font-semibold">Annotate & Measure</h1>
<div className="flex gap-2">
<CreateTest projectId={projectId} variant={"outline"} />
{tests?.tests?.length > 0 && (
Expand Down Expand Up @@ -123,57 +121,12 @@ export default function PageClient({ email }: { email: string }) {
function PageSkeleton() {
return (
<div className="w-full flex flex-col">
<div className="flex flex-row gap-4 absolute top-[14rem] w-full md:px-24 px-12">
<div className="bg-primary-foreground flex flex-col gap-0 border rounded-md w-[12rem] h-fit">
{Array.from({ length: 5 }).map((_, i) => {
return (
<div className="flex flex-col" key={i}>
<div
className={cn(
"flex flex-col gap-4 p-4 items-start cursor-pointer",
i === 0 ? "rounded-t-md" : "",
i === 4 ? "rounded-b-md" : ""
)}
>
<div
className={cn(
"text-sm text-muted-foreground font-semibold capitalize",
i === 0 ? "text-primary" : ""
)}
>
<Skeleton className="w-20 h-6" />
</div>
<span className="text-[0.6rem] text-primary font-bold">
<Skeleton className="w-20 h-6" />
</span>
</div>
<Separator />
</div>
);
})}
</div>
<div className="bg-primary-foreground flex flex-col gap-12 border rounded-md w-full p-4 mb-24">
<div className="flex flex-row">
<div className="flex flex-col gap-3 items-start w-[25rem]">
<div className="flex flex-col gap-1">
<div className="text-xl font-semibold capitalize">
<Skeleton className="w-20 h-6" />
</div>
<span className="text-xs font-semibold text-muted-foreground">
<Skeleton className="w-20 h-6" />
</span>
</div>
<span className="text-sm text-primary font-bold">
<Skeleton className="w-20 h-6" />
</span>
<div className="text-sm text-muted-foreground">
<Skeleton className="w-20 h-6" />
</div>
</div>
<LargeChartSkeleton />
</div>
<EvaluationTableSkeleton />
<div className="flex flex-col gap-12 top-[16rem] w-full md:px-24 px-12 mb-24">
<LargeChartSkeleton />
<div className="flex flex-col gap-2">
<Button variant="outline" disabled={true} />
</div>
<EvaluationTableSkeleton />
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ import DatasetRowSkeleton from "@/components/project/dataset/dataset-row-skeleto
import { EditData } from "@/components/project/dataset/edit-data";
import { DownloadDataset } from "@/components/shared/download-dataset";
import { Spinner } from "@/components/shared/spinner";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
import { PAGE_SIZE } from "@/lib/constants";
import { EVALUATIONS_DOCS_URL, PAGE_SIZE } from "@/lib/constants";
import { Data } from "@prisma/client";
import { ChevronLeft } from "lucide-react";
import { ArrowTopRightIcon } from "@radix-ui/react-icons";
import { ChevronLeft, FlaskConical } from "lucide-react";
import Link from "next/link";
import { useParams } from "next/navigation";
import { useState } from "react";
import { useBottomScrollListener } from "react-bottom-scroll-listener";
import { useQuery } from "react-query";
import { toast } from "sonner";

export default function Dataset() {
const projectId = useParams()?.project_id as string;
const dataset_id = useParams()?.dataset_id as string;
const [page, setPage] = useState<number>(1);
const [totalPages, setTotalPages] = useState<number>(1);
Expand Down Expand Up @@ -86,16 +90,31 @@ export default function Dataset() {
} else {
return (
<div className="w-full py-6 px-6 flex flex-col gap-4">
<div className="flex gap-4 items-center w-fit">
<Button variant="secondary" onClick={() => window.history.back()}>
<ChevronLeft className="mr-1" />
Back
</Button>
<CreateData datasetId={dataset_id} />
<DownloadDataset
datasetId={dataset_id}
disabled={fetchDataset.isLoading || currentData?.length === 0}
/>
<div className="flex justify-between items-center">
<div className="flex gap-4 items-center w-fit">
<Button variant="secondary" onClick={() => window.history.back()}>
<ChevronLeft className="mr-1" />
Back
</Button>
<CreateData datasetId={dataset_id} />
<DownloadDataset
projectId={projectId}
datasetId={dataset_id}
disabled={fetchDataset.isLoading || currentData?.length === 0}
/>
</div>
<div className="flex gap-4 items-center w-fit">
<Badge variant={"outline"} className="text-sm">
Dataset ID: {dataset_id}
</Badge>
<Link href={EVALUATIONS_DOCS_URL} target="_blank">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using target="_blank" in a link, it's a best practice to include rel="noopener noreferrer" to enhance security.

Suggested change
<Link href={EVALUATIONS_DOCS_URL} target="_blank">
<Link href={EVALUATIONS_DOCS_URL} target="_blank" rel="noopener noreferrer">

<Button variant="outline">
Run Evaluation
<FlaskConical className="ml-1 h-4 w-4" />
<ArrowTopRightIcon className="ml-1 h-4 w-4" />
</Button>
</Link>
</div>
</div>
<div className="flex flex-col gap-3 rounded-md border border-muted max-h-screen overflow-y-scroll">
<div className="grid grid-cols-5 items-center justify-stretch gap-3 py-3 px-4 bg-muted">
Expand Down
Loading