diff --git a/agenta-web/cypress/e2e/ab-testing-evaluation.cy.ts b/agenta-web/cypress/e2e/ab-testing-evaluation.cy.ts index a46112b76e..c166affcf9 100644 --- a/agenta-web/cypress/e2e/ab-testing-evaluation.cy.ts +++ b/agenta-web/cypress/e2e/ab-testing-evaluation.cy.ts @@ -43,9 +43,9 @@ describe("A/B Testing Evaluation workflow", () => { context("When executing the evaluation", () => { it("Should successfully execute the evaluation process", () => { - cy.visit(`/apps/${app_id}/annotations/human_a_b_testing`) - cy.url().should("include", "/annotations/human_a_b_testing") - cy.clickLinkAndWait('[data-cy="new-annotation-modal-button"]') + cy.visit(`/apps/${app_id}/evaluations?selectedEvaluation=ab_testing_evaluation`) + cy.url().should("include", "/evaluations?selectedEvaluation=ab_testing_evaluation") + cy.clickLinkAndWait('[data-cy="new-human-eval-modal-button"]') cy.get(".ant-modal-content").should("exist") cy.get('[data-cy="variants-dropdown-0"]').trigger("mouseover") diff --git a/agenta-web/cypress/e2e/app-navigation.cy.ts b/agenta-web/cypress/e2e/app-navigation.cy.ts index a5d3127501..b72066acf5 100644 --- a/agenta-web/cypress/e2e/app-navigation.cy.ts +++ b/agenta-web/cypress/e2e/app-navigation.cy.ts @@ -28,28 +28,19 @@ describe("App Navigation without errors", () => { cy.get('[data-cy="app-testset-list"]').should("exist") }) - it("should navigate successfully to Automatic Evaluation results evaluators page", () => { - cy.clickLinkAndWait('[data-cy="app-auto-evaluations-link"]') - cy.clickLinkAndWait('[data-cy="app-evaluators-link"]') - cy.url().should("include", "/evaluations/new-evaluator") - }) + it("should navigate successfully to Evaluations page", () => { + cy.clickLinkAndWait('[data-cy="app-evaluations-link"]') + cy.url().should("include", "/evaluations") + cy.contains(/evaluations/i) - it("should navigate successfully to Automatic Evaluation results page", () => { - cy.clickLinkAndWait('[data-cy="app-auto-evaluations-link"]') - cy.clickLinkAndWait('[data-cy="app-evaluations-results-link"]') - cy.url().should("include", "/evaluations/results") - }) + cy.get(".ant-tabs-tab").eq(1).click() + cy.url().should("include", "/evaluations?selectedEvaluation=ab_testing_evaluation") - it("should navigate successfully to A/B Test page", () => { - cy.clickLinkAndWait('[data-cy="app-human-evaluations-link"]') - cy.clickLinkAndWait('[data-cy="app-human-ab-testing-link"]') - cy.location("pathname").should("include", "/annotations/human_a_b_testing") - }) + cy.get(".ant-tabs-tab").eq(2).click() + cy.url().should("include", "/evaluations?selectedEvaluation=single_model_evaluation") - it("should navigate successfully to Single Model Test page", () => { - cy.clickLinkAndWait('[data-cy="app-human-evaluations-link"]') - cy.clickLinkAndWait('[data-cy="app-single-model-test-link"]') - cy.location("pathname").should("include", "/annotations/single_model_test") + cy.get(".ant-tabs-tab").eq(0).click() + cy.url().should("include", "/evaluations?selectedEvaluation=auto_evaluation") }) if (isDemo()) { diff --git a/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts b/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts index f6a9a6070a..37af94e625 100644 --- a/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts +++ b/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts @@ -16,9 +16,9 @@ describe("Single Model Test workflow", () => { context("When executing the evaluation", () => { it("Should successfully execute the evaluation process", () => { - cy.visit(`/apps/${app_id}/annotations/single_model_test`) - cy.url().should("include", "/annotations/single_model_test") - cy.clickLinkAndWait('[data-cy="new-annotation-modal-button"]') + cy.visit(`/apps/${app_id}/evaluations?selectedEvaluation=single_model_evaluation`) + cy.url().should("include", "/evaluations?selectedEvaluation=single_model_evaluation") + cy.clickLinkAndWait('[data-cy="new-human-eval-modal-button"]') cy.get(".ant-modal-content").should("exist") @@ -49,10 +49,10 @@ describe("Single Model Test workflow", () => { }) it("Should modify the evaluation vote scores", () => { - cy.visit(`/apps/${app_id}/annotations/single_model_test`) - cy.url().should("include", "/annotations/single_model_test") + cy.visit(`/apps/${app_id}/evaluations?selectedEvaluation=single_model_evaluation`) + cy.url().should("include", "/evaluations?selectedEvaluation=single_model_evaluation") cy.wait(1000) - cy.clickLinkAndWait('[data-cy="single-model-view-evaluation-button"]') + cy.clickLinkAndWait(".ant-table-row").eq(0) cy.get('[data-cy="evalInstructionsShown-ok-btn"]').click() cy.get('[data-cy="evaluation-vote-panel-numeric-vote-input"]').clear() cy.get('[data-cy="evaluation-vote-panel-numeric-vote-input"]').type("85") diff --git a/agenta-web/src/components/Evaluations/AutomaticEvaluationResult.tsx b/agenta-web/src/components/Evaluations/AutomaticEvaluationResult.tsx deleted file mode 100644 index 2b6ef8ef5c..0000000000 --- a/agenta-web/src/components/Evaluations/AutomaticEvaluationResult.tsx +++ /dev/null @@ -1,286 +0,0 @@ -import { - deleteEvaluations, - fetchEvaluationResults, - fetchAllLoadEvaluations, -} from "@/services/human-evaluations/api" -import {Button, Spin, Statistic, Table, Typography} from "antd" -import {useRouter} from "next/router" -import {useEffect, useState} from "react" -import {ColumnsType} from "antd/es/table" -import {Evaluation, SingleModelEvaluationListTableDataType, StyleProps} from "@/lib/Types" -import {DeleteOutlined} from "@ant-design/icons" -import {EvaluationFlow, EvaluationType} from "@/lib/enums" -import {createUseStyles} from "react-jss" -import {useAppTheme} from "../Layout/ThemeContextProvider" -import {calculateResultsDataAvg} from "@/lib/helpers/evaluate" -import { - fromEvaluationResponseToEvaluation, - singleModelTestEvaluationTransformer, -} from "@/lib/transformers" -import {variantNameWithRev} from "@/lib/helpers/variantHelper" - -const useStyles = createUseStyles({ - container: { - marginBottom: 20, - }, - collapse: ({themeMode}: StyleProps) => ({ - margin: "10px 0", - "& .ant-collapse-header": { - alignItems: "center !important", - padding: "0px 20px !important", - borderTopLeftRadius: "10px !important", - borderTopRightRadius: "10px !important", - background: themeMode === "dark" ? "#1d1d1d" : "#f8f8f8", - }, - }), - stat: { - "& .ant-statistic-content-value": { - fontSize: 20, - color: "#1677ff", - }, - "& .ant-statistic-content-suffix": { - fontSize: 20, - color: "#1677ff", - }, - }, - btnContainer: { - display: "flex", - alignItems: "center", - justifyContent: "flex-end", - margin: "20px 0", - gap: 10, - "& svg": { - color: "red", - }, - }, -}) - -const {Title} = Typography -interface AutomaticEvaluationResultProps { - setIsEvalModalOpen: React.Dispatch> -} -export default function AutomaticEvaluationResult({ - setIsEvalModalOpen, -}: AutomaticEvaluationResultProps) { - const router = useRouter() - const [evaluationsList, setEvaluationsList] = useState< - SingleModelEvaluationListTableDataType[] - >([]) - const [selectedRowKeys, setSelectedRowKeys] = useState([]) - const [selectionType] = useState<"checkbox" | "radio">("checkbox") - const {appTheme} = useAppTheme() - const classes = useStyles({themeMode: appTheme} as StyleProps) - const app_id = router.query.app_id?.toString() || "" - const [fetchingEvaluations, setFetchingEvaluations] = useState(false) - - useEffect(() => { - if (!app_id) { - return - } - - const fetchEvaluations = async () => { - try { - setFetchingEvaluations(true) - const evals: Evaluation[] = (await fetchAllLoadEvaluations(app_id)).map( - fromEvaluationResponseToEvaluation, - ) - const results = await Promise.all(evals.map((e) => fetchEvaluationResults(e.id))) - const newEvals = results.map((result, ix) => { - const item = evals[ix] - if ([EvaluationType.single_model_test].includes(item.evaluationType)) { - return singleModelTestEvaluationTransformer({item, result}) - } - }) - - setEvaluationsList( - newEvals - .filter((evaluation) => evaluation !== undefined) - .filter( - (item: any) => - item.resultsData !== undefined || - !(Object.keys(item.scoresData || {}).length === 0) || - item.avgScore !== undefined, - ) as any, - ) - } catch (error) { - console.error(error) - } finally { - setFetchingEvaluations(false) - } - } - - fetchEvaluations() - }, [app_id]) - - const handleNavigation = (variantName: string, revisionNum: string) => { - router.push(`/apps/${app_id}/playground?variant=${variantName}&revision=${revisionNum}`) - } - - const onCompleteEvaluation = (evaluation: any) => { - // TODO: improve type - const evaluationType = - EvaluationType[evaluation.evaluationType as keyof typeof EvaluationType] - - if (evaluationType === EvaluationType.single_model_test) { - router.push(`/apps/${app_id}/annotations/single_model_test/${evaluation.key}`) - } - } - - const columns: ColumnsType = [ - { - title: "Variant", - dataIndex: "variants", - key: "variants", - render: (value, record: SingleModelEvaluationListTableDataType) => { - return ( -
handleNavigation(value[0].variantName, record.revisions[0])} - style={{cursor: "pointer"}} - > - - {variantNameWithRev({ - variant_name: value[0].variantName, - revision: record.revisions[0], - })} - -
- ) - }, - }, - { - title: "Test set", - dataIndex: "testsetName", - key: "testsetName", - render: (value: any, record: SingleModelEvaluationListTableDataType, index: number) => { - return {record.testset.name} - }, - }, - { - title: "Average score", - dataIndex: "averageScore", - key: "averageScore", - render: (value: any, record: SingleModelEvaluationListTableDataType, index: number) => { - let score = 0 - if (record.scoresData) { - score = - ((record.scoresData.correct?.length || - record.scoresData.true?.length || - 0) / - record.scoresData.nb_of_rows) * - 100 - } else if (record.resultsData) { - const multiplier = { - [EvaluationType.auto_webhook_test]: 100, - [EvaluationType.single_model_test]: 1, - } - score = calculateResultsDataAvg( - record.resultsData, - multiplier[record.evaluationType as keyof typeof multiplier], - ) - score = isNaN(score) ? 0 : score - } else if (record.avgScore) { - score = record.avgScore * 100 - } - - return ( - - - - ) - }, - }, - { - title: "Created at", - dataIndex: "createdAt", - key: "createdAt", - width: "300", - }, - { - title: "Action", - dataIndex: "action", - key: "action", - render: (value: any, record: SingleModelEvaluationListTableDataType, index: number) => { - let actionText = "View evaluation" - if (record.status !== EvaluationFlow.EVALUATION_FINISHED) { - actionText = "Continue evaluation" - } - return ( -
- -
- ) - }, - }, - ] - - const rowSelection = { - onChange: ( - selectedRowKeys: React.Key[], - selectedRows: SingleModelEvaluationListTableDataType[], - ) => { - setSelectedRowKeys(selectedRowKeys) - }, - } - - const onDelete = async () => { - const evaluationsIds = selectedRowKeys.map((key) => key.toString()) - try { - await deleteEvaluations(evaluationsIds) - setEvaluationsList((prevEvaluationsList) => - prevEvaluationsList.filter( - (evaluation) => !evaluationsIds.includes(evaluation.key), - ), - ) - - setSelectedRowKeys([]) - } catch (error) { - console.error(error) - } - } - - return ( -
-
- - -
- -
- Single Model Test Results -
- - - - - - ) -} diff --git a/agenta-web/src/components/Evaluations/HumanEvaluationResult.tsx b/agenta-web/src/components/Evaluations/HumanEvaluationResult.tsx deleted file mode 100644 index 87720a4387..0000000000 --- a/agenta-web/src/components/Evaluations/HumanEvaluationResult.tsx +++ /dev/null @@ -1,373 +0,0 @@ -import { - deleteEvaluations, - fetchAllLoadEvaluations, - fetchEvaluationResults, -} from "@/services/human-evaluations/api" -import {Button, Spin, Statistic, Table, Typography} from "antd" -import {useRouter} from "next/router" -import {useEffect, useState} from "react" -import {ColumnsType} from "antd/es/table" -import {EvaluationResponseType, StyleProps} from "@/lib/Types" -import {DeleteOutlined} from "@ant-design/icons" -import {EvaluationFlow, EvaluationType} from "@/lib/enums" -import {createUseStyles} from "react-jss" -import {useAppTheme} from "../Layout/ThemeContextProvider" -import {getVotesPercentage} from "@/lib/helpers/evaluate" -import {isDemo} from "@/lib/helpers/utils" -import {variantNameWithRev} from "@/lib/helpers/variantHelper" -import {abTestingEvaluationTransformer} from "@/lib/transformers" - -interface VariantVotesData { - number_of_votes: number - percentage: number -} - -export interface HumanEvaluationListTableDataType { - key: string - variants: string[] - testset: { - _id: string - name: string - } - evaluationType: string - status: EvaluationFlow - votesData: { - nb_of_rows: number - variants: string[] - flag_votes: { - number_of_votes: number - percentage: number - } - positive_votes: { - number_of_votes: number - percentage: number - } - variants_votes_data: Record - } - createdAt: string - revisions: string[] - variant_revision_ids: string[] - variantNames: string[] -} - -const useStyles = createUseStyles({ - container: { - marginBottom: 20, - }, - collapse: ({themeMode}: StyleProps) => ({ - margin: "10px 0", - "& .ant-collapse-header": { - alignItems: "center !important", - padding: "0px 20px !important", - borderTopLeftRadius: "10px !important", - borderTopRightRadius: "10px !important", - background: themeMode === "dark" ? "#1d1d1d" : "#f8f8f8", - }, - }), - statFlag: { - "& .ant-statistic-content-value": { - fontSize: 20, - color: "#cf1322", - }, - "& .ant-statistic-content-suffix": { - fontSize: 20, - color: "#cf1322", - }, - }, - stat: { - "& .ant-statistic-content-value": { - fontSize: 20, - color: "#1677ff", - }, - "& .ant-statistic-content-suffix": { - fontSize: 20, - color: "#1677ff", - }, - }, - statGood: { - "& .ant-statistic-content-value": { - fontSize: 20, - color: "#3f8600", - }, - "& .ant-statistic-content-suffix": { - fontSize: 20, - color: "#3f8600", - }, - }, - btnContainer: { - display: "flex", - alignItems: "center", - justifyContent: "flex-end", - margin: "20px 0", - gap: 10, - "& svg": { - color: "red", - }, - }, -}) - -const {Title} = Typography - -interface HumanEvaluationResultProps { - setIsEvalModalOpen: React.Dispatch> -} - -export default function HumanEvaluationResult({setIsEvalModalOpen}: HumanEvaluationResultProps) { - const router = useRouter() - const [evaluationsList, setEvaluationsList] = useState([]) - const [selectedRowKeys, setSelectedRowKeys] = useState([]) - const [selectionType] = useState<"checkbox" | "radio">("checkbox") - const {appTheme} = useAppTheme() - const classes = useStyles({themeMode: appTheme} as StyleProps) - const app_id = router.query.app_id?.toString() || "" - const [fetchingEvaluations, setFetchingEvaluations] = useState(false) - - useEffect(() => { - if (!app_id) { - return - } - const fetchEvaluations = async () => { - try { - setFetchingEvaluations(true) - fetchAllLoadEvaluations(app_id) - .then((response) => { - const fetchPromises = response.map((item: EvaluationResponseType) => { - return fetchEvaluationResults(item.id) - .then((results) => { - if (item.evaluation_type === EvaluationType.human_a_b_testing) { - if (Object.keys(results.votes_data).length > 0) { - return abTestingEvaluationTransformer({item, results}) - } - } - }) - .catch((err) => console.error(err)) - }) - Promise.all(fetchPromises) - .then((evaluations) => { - const validEvaluations = evaluations.filter( - (evaluation) => evaluation !== undefined, - ) - setEvaluationsList(validEvaluations) - }) - .catch((err) => console.error(err)) - }) - .catch((err) => console.error(err)) - .finally(() => setFetchingEvaluations(false)) - } catch (error) { - console.error(error) - } - } - - fetchEvaluations() - }, [app_id]) - - const onCompleteEvaluation = (evaluation: any) => { - // TODO: improve type - const evaluationType = - EvaluationType[evaluation.evaluationType as keyof typeof EvaluationType] - - if (evaluationType === EvaluationType.human_a_b_testing) { - router.push(`/apps/${app_id}/annotations/human_a_b_testing/${evaluation.key}`) - } - } - - const handleNavigation = (variantName: string, revisionNum: string) => { - router.push(`/apps/${app_id}/playground?variant=${variantName}&revision=${revisionNum}`) - } - - const columns: ColumnsType = [ - { - title: "Test set", - dataIndex: "testsetName", - key: "testsetName", - render: (_, record: HumanEvaluationListTableDataType, index: number) => { - return {record.testset.name} - }, - }, - { - title: "Variant 1", - dataIndex: "variantNames", - key: "variant1", - render: (value, record) => { - const percentage = getVotesPercentage(record, 0) - return ( -
- -
handleNavigation(value[0], record.revisions[0])} - > - ( - {variantNameWithRev({ - variant_name: value[0], - revision: record.revisions[0], - })} - ) -
-
- ) - }, - }, - { - title: "Variant 2", - dataIndex: "variantNames", - key: "variant2", - render: (value, record) => { - const percentage = getVotesPercentage(record, 1) - return ( -
- -
handleNavigation(value[1], record.revisions[1])} - > - ( - {variantNameWithRev({ - variant_name: value[1], - revision: record.revisions[1], - })} - ) -
-
- ) - }, - }, - { - title: "Both are good", - dataIndex: "positive", - key: "positive", - render: (value: any, record: HumanEvaluationListTableDataType) => { - let percentage = record.votesData.positive_votes.percentage - return ( - - - - ) - }, - }, - { - title: "Flag", - dataIndex: "flag", - key: "flag", - render: (value: any, record: HumanEvaluationListTableDataType) => { - let percentage = record.votesData.flag_votes.percentage - return ( - - - - ) - }, - }, - ] - - if (isDemo()) { - columns.push({ - title: "User", - dataIndex: ["user", "username"], - key: "username", - }) - } - - columns.push( - ...[ - { - title: "Created at", - dataIndex: "createdAt", - key: "createdAt", - width: "300", - }, - { - title: "Action", - dataIndex: "action", - key: "action", - render: (value: any, record: HumanEvaluationListTableDataType, index: number) => { - let actionText = "View evaluation" - if (record.status !== EvaluationFlow.EVALUATION_FINISHED) { - actionText = "Continue evaluation" - } - return ( -
- -
- ) - }, - }, - ], - ) - - const rowSelection = { - onChange: (selectedRowKeys: React.Key[]) => { - setSelectedRowKeys(selectedRowKeys) - }, - } - - const onDelete = async () => { - const evaluationsIds = selectedRowKeys.map((key) => key.toString()) - try { - await deleteEvaluations(evaluationsIds) - setEvaluationsList((prevEvaluationsList) => - prevEvaluationsList.filter( - (evaluation) => !evaluationsIds.includes(evaluation.key), - ), - ) - - setSelectedRowKeys([]) - } catch {} - } - - return ( -
-
- - -
- -
- A/B Test Results -
- - -
- - - ) -} diff --git a/agenta-web/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx b/agenta-web/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx index 142ea39a09..5e8f6a0667 100644 --- a/agenta-web/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx +++ b/agenta-web/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx @@ -5,7 +5,6 @@ import {createNewEvaluation} from "@/services/human-evaluations/api" import {isDemo} from "@/lib/helpers/utils" import {Button, Col, Dropdown, MenuProps, Modal, ModalProps, Row, Spin, message} from "antd" import {getErrorMessage} from "@/lib/helpers/errorHandler" -import {DownOutlined} from "@ant-design/icons" import {EvaluationType} from "@/lib/enums" import {PERMISSION_ERR_MSG} from "@/lib/helpers/axiosConfig" import {getAllVariantParameters} from "@/lib/helpers/variantHelper" @@ -15,6 +14,7 @@ import {createUseStyles} from "react-jss" import EvaluationErrorModal from "../Evaluations/EvaluationErrorModal" import {dynamicComponent} from "@/lib/helpers/dynamic" import {useLoadTestsetsList} from "@/services/testsets/api" +import {CaretDown, Play} from "@phosphor-icons/react" const useStyles = createUseStyles((theme: JSSTheme) => ({ evaluationContainer: { @@ -111,6 +111,11 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ alignItems: "center", justifyContent: "space-between", }, + dropdownItemLabels: { + fontSize: theme.fontSizeSM, + lineHeight: theme.lineHeightSM, + color: theme.colorTextDescription, + }, })) interface HumanEvaluationModalProps { @@ -278,7 +283,15 @@ const HumanEvaluationModal = ({ filteredVariants.push({ label: ( <> -
{variant.variantName}
+
+ {variant.variantName} + + #{variant.variantId.split("-")[0]} + +
), key: label, @@ -356,7 +369,7 @@ const HumanEvaluationModal = ({ setSelectedTestset({name: "Select a Test set"}) setSelectedVariants(new Array(1).fill({variantName: "Select a variant"})) }} - title="Start a New Evaluation" + title="New Evaluation" footer={null} > @@ -373,7 +386,7 @@ const HumanEvaluationModal = ({ >
{selectedTestset.name} - +
@@ -393,7 +406,7 @@ const HumanEvaluationModal = ({
{selectedVariants[index]?.variantName || "Select a variant"} - +
@@ -430,6 +443,8 @@ const HumanEvaluationModal = ({ onClick={onStartEvaluation} type="primary" data-cy="start-new-evaluation-button" + icon={} + className="flex items-center" > Start diff --git a/agenta-web/src/components/pages/overview/abTestingEvaluation/AbTestingEvalOverview.tsx b/agenta-web/src/components/HumanEvaluations/AbTestingEvaluation.tsx similarity index 79% rename from agenta-web/src/components/pages/overview/abTestingEvaluation/AbTestingEvalOverview.tsx rename to agenta-web/src/components/HumanEvaluations/AbTestingEvaluation.tsx index efbcdadb58..b774a55c64 100644 --- a/agenta-web/src/components/pages/overview/abTestingEvaluation/AbTestingEvalOverview.tsx +++ b/agenta-web/src/components/HumanEvaluations/AbTestingEvaluation.tsx @@ -1,5 +1,5 @@ import DeleteEvaluationModal from "@/components/DeleteEvaluationModal/DeleteEvaluationModal" -import {HumanEvaluationListTableDataType} from "@/components/Evaluations/HumanEvaluationResult" +import {HumanEvaluationListTableDataType, JSSTheme} from "@/lib/Types" import HumanEvaluationModal from "@/components/HumanEvaluationModal/HumanEvaluationModal" import {EvaluationType} from "@/lib/enums" import {getColorFromStr} from "@/lib/helpers/colors" @@ -7,14 +7,13 @@ import {getVotesPercentage} from "@/lib/helpers/evaluate" import {getInitials, isDemo} from "@/lib/helpers/utils" import {variantNameWithRev} from "@/lib/helpers/variantHelper" import {abTestingEvaluationTransformer} from "@/lib/transformers" -import {JSSTheme} from "@/lib/Types" import { deleteEvaluations, fetchAllLoadEvaluations, fetchEvaluationResults, } from "@/services/human-evaluations/api" import {MoreOutlined, PlusOutlined} from "@ant-design/icons" -import {Database, GearSix, Note, Rocket, Trash} from "@phosphor-icons/react" +import {Database, GearSix, Note, Plus, Rocket, Trash} from "@phosphor-icons/react" import {Avatar, Button, Dropdown, message, Space, Spin, Statistic, Table, Typography} from "antd" import {ColumnsType} from "antd/es/table" import {useRouter} from "next/router" @@ -62,9 +61,13 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ color: theme.colorSuccess, }, }, + button: { + display: "flex", + alignItems: "center", + }, })) -const AbTestingEvalOverview = () => { +const AbTestingEvaluation = ({viewType}: {viewType: "evaluation" | "overview"}) => { const classes = useStyles() const router = useRouter() const appId = router.query.app_id as string @@ -74,6 +77,8 @@ const AbTestingEvalOverview = () => { const [isEvalModalOpen, setIsEvalModalOpen] = useState(false) const [selectedEvalRecord, setSelectedEvalRecord] = useState() const [isDeleteEvalModalOpen, setIsDeleteEvalModalOpen] = useState(false) + const [isDeleteMultipleEvalModalOpen, setIsDeleteMultipleEvalModalOpen] = useState(false) + const [selectedRowKeys, setSelectedRowKeys] = useState([]) useEffect(() => { if (!appId) return @@ -102,9 +107,8 @@ const AbTestingEvalOverview = () => { new Date(b.createdAt || 0).getTime() - new Date(a.createdAt || 0).getTime(), ) - .slice(0, 5) - setEvaluationsList(results) + setEvaluationsList(viewType === "overview" ? results.slice(0, 5) : results) } catch (error) { console.error(error) } finally { @@ -119,6 +123,31 @@ const AbTestingEvalOverview = () => { router.push(`/apps/${appId}/playground?variant=${variantName}&revision=${revisionNum}`) } + const rowSelection = { + onChange: (selectedRowKeys: React.Key[]) => { + setSelectedRowKeys(selectedRowKeys) + }, + } + + const handleDeleteMultipleEvaluations = async () => { + const evaluationsIds = selectedRowKeys.map((key) => key.toString()) + try { + setFetchingEvaluations(true) + await deleteEvaluations(evaluationsIds) + setEvaluationsList((prevEvaluationsList) => + prevEvaluationsList.filter( + (evaluation) => !evaluationsIds.includes(evaluation.key), + ), + ) + setSelectedRowKeys([]) + message.success("Evaluations Deleted") + } catch (error) { + console.error(error) + } finally { + setFetchingEvaluations(false) + } + } + const handleDeleteEvaluation = async (record: HumanEvaluationListTableDataType) => { try { setFetchingEvaluations(true) @@ -381,25 +410,61 @@ const AbTestingEvalOverview = () => { return (
-
- - A/B Testing Evaluations - + + + +
+ ) : ( +
+ - - -
+ + + +
+ )}
{ evaluationType={"a/b testing evaluation"} /> )} + + {isDeleteMultipleEvalModalOpen && ( + setIsDeleteMultipleEvalModalOpen(false)} + onOk={async () => { + await handleDeleteMultipleEvaluations() + setIsDeleteMultipleEvalModalOpen(false) + }} + evaluationType={"a/b testing evaluation"} + /> + )} ) } -export default AbTestingEvalOverview +export default AbTestingEvaluation diff --git a/agenta-web/src/components/pages/overview/singleModelEvaluation/SingleModelEvalOverview.tsx b/agenta-web/src/components/HumanEvaluations/SingleModelEvaluation.tsx similarity index 74% rename from agenta-web/src/components/pages/overview/singleModelEvaluation/SingleModelEvalOverview.tsx rename to agenta-web/src/components/HumanEvaluations/SingleModelEvaluation.tsx index 02d4961289..9f9a4bbaf4 100644 --- a/agenta-web/src/components/pages/overview/singleModelEvaluation/SingleModelEvalOverview.tsx +++ b/agenta-web/src/components/HumanEvaluations/SingleModelEvaluation.tsx @@ -14,7 +14,7 @@ import { fetchEvaluationResults, } from "@/services/human-evaluations/api" import {MoreOutlined, PlusOutlined} from "@ant-design/icons" -import {Database, GearSix, Note, Rocket, Trash} from "@phosphor-icons/react" +import {Database, GearSix, Note, Plus, Rocket, Trash} from "@phosphor-icons/react" import {Button, Dropdown, message, Space, Spin, Statistic, Table, Typography} from "antd" import {ColumnsType} from "antd/es/table" import {useRouter} from "next/router" @@ -42,9 +42,13 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ color: theme.colorPrimary, }, }, + button: { + display: "flex", + alignItems: "center", + }, })) -const SingleModelEvalOverview = () => { +const SingleModelEvaluation = ({viewType}: {viewType: "evaluation" | "overview"}) => { const classes = useStyles() const router = useRouter() const appId = router.query.app_id as string @@ -57,6 +61,8 @@ const SingleModelEvalOverview = () => { const [selectedEvalRecord, setSelectedEvalRecord] = useState() const [isDeleteEvalModalOpen, setIsDeleteEvalModalOpen] = useState(false) + const [isDeleteEvalMultipleModalOpen, setIsDeleteEvalMultipleModalOpen] = useState(false) + const [selectedRowKeys, setSelectedRowKeys] = useState([]) useEffect(() => { if (!appId) return @@ -88,9 +94,10 @@ const SingleModelEvalOverview = () => { new Date(b?.createdAt ?? 0).getTime() - new Date(a?.createdAt ?? 0).getTime(), ) - .slice(0, 5) - setEvaluationsList(newEvalResults as any) + setEvaluationsList( + viewType === "overview" ? newEvalResults.slice(0, 5) : (newEvalResults as any), + ) } catch (error) { console.error(error) } finally { @@ -101,6 +108,31 @@ const SingleModelEvalOverview = () => { fetchEvaluations() }, [appId]) + const rowSelection = { + onChange: (selectedRowKeys: React.Key[]) => { + setSelectedRowKeys(selectedRowKeys) + }, + } + + const handleDeleteMultipleEvaluations = async () => { + const evaluationsIds = selectedRowKeys.map((key) => key.toString()) + try { + setFetchingEvaluations(true) + await deleteEvaluations(evaluationsIds) + setEvaluationsList((prevEvaluationsList) => + prevEvaluationsList.filter( + (evaluation) => !evaluationsIds.includes(evaluation.key), + ), + ) + setSelectedRowKeys([]) + message.success("Evaluations Deleted") + } catch (error) { + console.error(error) + } finally { + setFetchingEvaluations(false) + } + } + const handleNavigation = (variantName: string, revisionNum: string) => { router.push(`/apps/${appId}/playground?variant=${variantName}&revision=${revisionNum}`) } @@ -274,26 +306,62 @@ const SingleModelEvalOverview = () => { return (
-
- - Single Model Evaluations + {viewType === "overview" ? ( +
+ + Single Model Evaluations + + + - +
+ ) : ( +
+ - - -
+ + + +
+ )}
{ evaluationType={"single model evaluation"} /> )} + {isDeleteEvalMultipleModalOpen && ( + setIsDeleteEvalMultipleModalOpen(false)} + onOk={async () => { + await handleDeleteMultipleEvaluations() + setIsDeleteEvalMultipleModalOpen(false) + }} + evaluationType={"single model evaluation"} + /> + )} ) } -export default SingleModelEvalOverview +export default SingleModelEvaluation diff --git a/agenta-web/src/components/pages/evaluations/abTestingEvaluation/AbTestingEvaluation.tsx b/agenta-web/src/components/pages/evaluations/abTestingEvaluation/AbTestingEvaluation.tsx deleted file mode 100644 index 358626d3d6..0000000000 --- a/agenta-web/src/components/pages/evaluations/abTestingEvaluation/AbTestingEvaluation.tsx +++ /dev/null @@ -1,373 +0,0 @@ -import {HumanEvaluationListTableDataType} from "@/components/Evaluations/HumanEvaluationResult" -import {getColorFromStr} from "@/lib/helpers/colors" -import {getVotesPercentage} from "@/lib/helpers/evaluate" -import {getInitials, isDemo} from "@/lib/helpers/utils" -import {variantNameWithRev} from "@/lib/helpers/variantHelper" -import {JSSTheme} from "@/lib/Types" -import {MoreOutlined} from "@ant-design/icons" -import { - ArrowsLeftRight, - Columns, - Database, - GearSix, - Note, - Plus, - Rocket, - Trash, -} from "@phosphor-icons/react" -import {Avatar, Button, Dropdown, Space, Statistic, Table, Typography} from "antd" -import {ColumnsType} from "antd/es/table" -import {useRouter} from "next/router" -import React, {useState} from "react" -import {createUseStyles} from "react-jss" - -interface AbTestingEvaluationProps { - evaluationList: HumanEvaluationListTableDataType[] - fetchingEvaluations: boolean -} - -const useStyles = createUseStyles((theme: JSSTheme) => ({ - button: { - display: "flex", - alignItems: "center", - }, - statFlag: { - lineHeight: theme.lineHeight, - "& .ant-statistic-content-value": { - fontSize: theme.fontSize, - color: theme.colorError, - }, - "& .ant-statistic-content-suffix": { - fontSize: theme.fontSize, - color: theme.colorError, - }, - }, - stat: { - lineHeight: theme.lineHeight, - "& .ant-statistic-content-value": { - fontSize: theme.fontSize, - color: theme.colorPrimary, - }, - "& .ant-statistic-content-suffix": { - fontSize: theme.fontSize, - color: theme.colorPrimary, - }, - }, - statGood: { - lineHeight: theme.lineHeight, - "& .ant-statistic-content-value": { - fontSize: theme.fontSize, - color: theme.colorSuccess, - }, - "& .ant-statistic-content-suffix": { - fontSize: theme.fontSize, - color: theme.colorSuccess, - }, - }, -})) - -const AbTestingEvaluation = ({evaluationList, fetchingEvaluations}: AbTestingEvaluationProps) => { - const classes = useStyles() - const router = useRouter() - const appId = router.query.app_id as string - const [selectedRowKeys, setSelectedRowKeys] = useState([]) - - const handleNavigation = (variantName: string, revisionNum: string) => { - router.push(`/apps/${appId}/playground?variant=${variantName}&revision=${revisionNum}`) - } - - const columns: ColumnsType = [ - { - title: "Variant A", - dataIndex: "variantNames", - key: "variant1", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - render: (value, record) => { - return ( -
- {variantNameWithRev({ - variant_name: value[0], - revision: record.revisions[0], - })} -
- ) - }, - }, - { - title: "Variant B", - dataIndex: "variantNames", - key: "variant2", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - render: (value, record) => { - return ( -
- {variantNameWithRev({ - variant_name: value[1], - revision: record.revisions[1], - })} -
- ) - }, - }, - { - title: "Test set", - dataIndex: "testsetName", - key: "testsetName", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - render: (_, record: HumanEvaluationListTableDataType, index: number) => { - return {record.testset.name} - }, - }, - { - title: "Results", - key: "results", - onHeaderCell: () => ({ - style: {minWidth: 240}, - }), - render: (_, record: HumanEvaluationListTableDataType) => { - const stat1 = getVotesPercentage(record, 0) - const stat2 = getVotesPercentage(record, 1) - - return ( -
- - | - -
- ) - }, - }, - { - title: "Both are good", - dataIndex: "positive", - key: "positive", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - render: (_, record: HumanEvaluationListTableDataType) => { - let percentage = record.votesData.positive_votes.percentage - return ( - - - - ) - }, - }, - { - title: "Flag", - dataIndex: "flag", - key: "flag", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - render: (value: any, record: HumanEvaluationListTableDataType) => { - let percentage = record.votesData.flag_votes.percentage - return ( - - - - ) - }, - }, - ] - - if (isDemo()) { - columns.push({ - title: "User", - dataIndex: ["user", "username"], - key: "username", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - render: (_, record: any) => { - return ( - - - {getInitials(record.user.username)} - - {record.user.username} - - ) - }, - }) - } - - columns.push( - ...([ - { - title: "Created on", - dataIndex: "createdAt", - key: "createdAt", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - }, - { - title: , - key: "key", - width: 56, - fixed: "right", - align: "center", - render: (_: any, record: HumanEvaluationListTableDataType) => { - return ( - , - onClick: (e) => { - e.domEvent.stopPropagation() - router.push( - `/apps/${appId}/annotations/human_a_b_testing/${record.key}`, - ) - }, - }, - { - key: "variant1", - label: "View variant 1", - icon: , - onClick: (e) => { - e.domEvent.stopPropagation() - handleNavigation( - record.variantNames[0], - record.revisions[0], - ) - }, - }, - { - key: "variant2", - label: "View variant 2", - icon: , - onClick: (e) => { - e.domEvent.stopPropagation() - handleNavigation( - record.variantNames[1], - record.revisions[1], - ) - }, - }, - { - key: "view_testset", - label: "View test set", - icon: , - onClick: (e) => { - e.domEvent.stopPropagation() - router.push( - `/apps/${appId}/testsets/${record.testset._id}`, - ) - }, - }, - {type: "divider"}, - { - key: "delete_eval", - label: "Delete", - icon: , - danger: true, - onClick: (e) => { - e.domEvent.stopPropagation() - }, - }, - ], - }} - > - - - - - - - - -
{ - setSelectedRowKeys(selectedRowKeys) - }, - }} - className="ph-no-capture" - columns={columns} - rowKey={"id"} - dataSource={evaluationList} - scroll={{x: true}} - bordered - pagination={false} - onRow={(record) => ({ - style: {cursor: "pointer"}, - onClick: () => {}, - })} - /> - - ) -} - -export default AbTestingEvaluation diff --git a/agenta-web/src/components/pages/evaluations/singleModelEvaluation/SingleModelEvaluation.tsx b/agenta-web/src/components/pages/evaluations/singleModelEvaluation/SingleModelEvaluation.tsx deleted file mode 100644 index b2500c0892..0000000000 --- a/agenta-web/src/components/pages/evaluations/singleModelEvaluation/SingleModelEvaluation.tsx +++ /dev/null @@ -1,241 +0,0 @@ -import {EvaluationType} from "@/lib/enums" -import {calculateResultsDataAvg} from "@/lib/helpers/evaluate" -import {variantNameWithRev} from "@/lib/helpers/variantHelper" -import {JSSTheme, SingleModelEvaluationListTableDataType} from "@/lib/Types" -import {MoreOutlined} from "@ant-design/icons" -import {ArrowsLeftRight, Database, GearSix, Note, Plus, Rocket, Trash} from "@phosphor-icons/react" -import {Button, Dropdown, Space, Statistic, Table} from "antd" -import {ColumnsType} from "antd/es/table" -import {useRouter} from "next/router" -import React from "react" -import {createUseStyles} from "react-jss" - -interface SingleModelEvaluationProps { - evaluationList: SingleModelEvaluationListTableDataType[] - fetchingEvaluations: boolean -} - -const useStyles = createUseStyles((theme: JSSTheme) => ({ - button: { - display: "flex", - alignItems: "center", - }, - stat: { - lineHeight: theme.lineHeight, - "& .ant-statistic-content-value": { - fontSize: theme.fontSize, - color: theme.colorPrimary, - }, - "& .ant-statistic-content-suffix": { - fontSize: theme.fontSize, - color: theme.colorPrimary, - }, - }, -})) - -const SingleModelEvaluation = ({ - evaluationList, - fetchingEvaluations, -}: SingleModelEvaluationProps) => { - const classes = useStyles() - const router = useRouter() - const appId = router.query.app_id as string - - const handleNavigation = (variantName: string, revisionNum: string) => { - router.push(`/apps/${appId}/playground?variant=${variantName}&revision=${revisionNum}`) - } - - const columns: ColumnsType = [ - { - title: "Variant", - dataIndex: "variants", - key: "variants", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - render: (value, record: SingleModelEvaluationListTableDataType) => { - return ( - - {variantNameWithRev({ - variant_name: value[0].variantName, - revision: record.revisions[0], - })} - - ) - }, - }, - { - title: "Test set", - dataIndex: "testsetName", - key: "testsetName", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - render: (_, record) => { - return {record.testset.name} - }, - }, - { - title: "Average score", - dataIndex: "averageScore", - key: "averageScore", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - render: (_, record) => { - let score = 0 - if (record.scoresData) { - score = - ((record.scoresData.correct?.length || - record.scoresData.true?.length || - 0) / - record.scoresData.nb_of_rows) * - 100 - } else if (record.resultsData) { - const multiplier = { - [EvaluationType.auto_webhook_test]: 100, - [EvaluationType.single_model_test]: 1, - } - score = calculateResultsDataAvg( - record.resultsData, - multiplier[record.evaluationType as keyof typeof multiplier], - ) - score = isNaN(score) ? 0 : score - } else if (record.avgScore) { - score = record.avgScore * 100 - } - - return ( - - - - ) - }, - }, - { - title: "Created on", - dataIndex: "createdAt", - key: "createdAt", - onHeaderCell: () => ({ - style: {minWidth: 160}, - }), - }, - { - title: , - key: "key", - width: 56, - fixed: "right", - align: "center", - render: (_, record) => { - return ( - , - onClick: (e) => { - e.domEvent.stopPropagation() - router.push( - `/apps/${appId}/annotations/single_model_test/${record.key}`, - ) - }, - }, - { - key: "variant", - label: "View variant", - icon: , - onClick: (e) => { - e.domEvent.stopPropagation() - handleNavigation( - record.variants[0].variantName, - record.revisions[0], - ) - }, - }, - { - key: "view_testset", - label: "View test set", - icon: , - onClick: (e) => { - e.domEvent.stopPropagation() - router.push(`/apps/${appId}/testsets/${record.testset._id}`) - }, - }, - {type: "divider"}, - { - key: "delete_eval", - label: "Delete", - icon: , - danger: true, - onClick: (e) => { - e.domEvent.stopPropagation() - }, - }, - ], - }} - > - - - - - - - - -
({ - style: {cursor: "pointer"}, - onClick: () => {}, - })} - /> - - ) -} - -export default SingleModelEvaluation diff --git a/agenta-web/src/lib/Types.ts b/agenta-web/src/lib/Types.ts index 5e1002b1c7..7b12d64804 100644 --- a/agenta-web/src/lib/Types.ts +++ b/agenta-web/src/lib/Types.ts @@ -631,3 +631,35 @@ export interface TraceSpanTreeNode { key: string children?: TraceSpanTreeNode[] } + +interface VariantVotesData { + number_of_votes: number + percentage: number +} +export interface HumanEvaluationListTableDataType { + key: string + variants: string[] + testset: { + _id: string + name: string + } + evaluationType: string + status: EvaluationFlow + votesData: { + nb_of_rows: number + variants: string[] + flag_votes: { + number_of_votes: number + percentage: number + } + positive_votes: { + number_of_votes: number + percentage: number + } + variants_votes_data: Record + } + createdAt: string + revisions: string[] + variant_revision_ids: string[] + variantNames: string[] +} diff --git a/agenta-web/src/lib/helpers/evaluate.ts b/agenta-web/src/lib/helpers/evaluate.ts index 87b5b48f4b..2a1af7ee59 100644 --- a/agenta-web/src/lib/helpers/evaluate.ts +++ b/agenta-web/src/lib/helpers/evaluate.ts @@ -1,4 +1,4 @@ -import {HumanEvaluationListTableDataType} from "@/components/Evaluations/HumanEvaluationResult" +import {HumanEvaluationListTableDataType} from "@/lib/Types" import { Evaluation, GenericObject, diff --git a/agenta-web/src/pages/apps/[app_id]/annotations/human_a_b_testing.tsx b/agenta-web/src/pages/apps/[app_id]/annotations/human_a_b_testing.tsx deleted file mode 100644 index ea60e0a9af..0000000000 --- a/agenta-web/src/pages/apps/[app_id]/annotations/human_a_b_testing.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import HumanEvaluationResult from "@/components/Evaluations/HumanEvaluationResult" -import HumanEvaluationModal from "@/components/HumanEvaluationModal/HumanEvaluationModal" -import React, {useState} from "react" - -const HumanABTestingEvaluation = () => { - const [isEvalModalOpen, setIsEvalModalOpen] = useState(false) - - return ( - <> - - - - - ) -} - -export default HumanABTestingEvaluation diff --git a/agenta-web/src/pages/apps/[app_id]/annotations/single_model_test.tsx b/agenta-web/src/pages/apps/[app_id]/annotations/single_model_test.tsx deleted file mode 100644 index 9487da1bc3..0000000000 --- a/agenta-web/src/pages/apps/[app_id]/annotations/single_model_test.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React, {useState} from "react" -import AutomaticEvaluationResult from "@/components/Evaluations/AutomaticEvaluationResult" -import HumanEvaluationModal from "@/components/HumanEvaluationModal/HumanEvaluationModal" - -const SingleModelTestEvaluation = () => { - const [isEvalModalOpen, setIsEvalModalOpen] = useState(false) - - return ( - <> - - - - - ) -} - -export default SingleModelTestEvaluation diff --git a/agenta-web/src/pages/apps/[app_id]/evaluations/index.tsx b/agenta-web/src/pages/apps/[app_id]/evaluations/index.tsx index b4d3bea986..a9507f3919 100644 --- a/agenta-web/src/pages/apps/[app_id]/evaluations/index.tsx +++ b/agenta-web/src/pages/apps/[app_id]/evaluations/index.tsx @@ -1,15 +1,10 @@ -import {HumanEvaluationListTableDataType} from "@/components/Evaluations/HumanEvaluationResult" -import AbTestingEvaluation from "@/components/pages/evaluations/abTestingEvaluation/AbTestingEvaluation" +import AbTestingEvaluation from "@/components/HumanEvaluations/AbTestingEvaluation" import AutoEvaluation from "@/components/pages/evaluations/autoEvaluation/AutoEvaluation" -import SingleModelEvaluation from "@/components/pages/evaluations/singleModelEvaluation/SingleModelEvaluation" +import SingleModelEvaluation from "@/components/HumanEvaluations/SingleModelEvaluation" import {useAppId} from "@/hooks/useAppId" import {useQueryParam} from "@/hooks/useQuery" -import {_Evaluation, JSSTheme, SingleModelEvaluationListTableDataType} from "@/lib/Types" +import {_Evaluation, JSSTheme} from "@/lib/Types" import {fetchAllEvaluations} from "@/services/evaluations/api" -import { - fetchAbTestingEvaluationResult, - fetchSingleModelEvaluationResult, -} from "@/services/human-evaluations/api" import {ChartDonut, ListChecks, TestTube} from "@phosphor-icons/react" import {Tabs, TabsProps, Typography} from "antd" import React, {useEffect, useState} from "react" @@ -44,12 +39,6 @@ const EvaluationsPage = () => { const appId = useAppId() const classes = useStyles() const [autoEvaluationList, setAutoEvaluationList] = useState<_Evaluation[]>([]) - const [singleModelEvalList, setSingleModelEvalList] = useState< - SingleModelEvaluationListTableDataType[] - >([]) - const [abTestingEvalList, setAbTestingEvalList] = useState( - [], - ) const [selectedEvaluation, setSelectedEvaluation] = useQueryParam( "selectedEvaluation", "auto_evaluation", @@ -60,15 +49,10 @@ const EvaluationsPage = () => { if (!appId) return setFetchingEvaluations(true) - Promise.all([ - fetchAllEvaluations(appId), - fetchSingleModelEvaluationResult(appId), - fetchAbTestingEvaluationResult(appId), - ]) - .then(([autoEvalResult, singleModelEvalResult, abTestingEvalResult]) => { + + fetchAllEvaluations(appId) + .then((autoEvalResult) => { setAutoEvaluationList(autoEvalResult) - setSingleModelEvalList(singleModelEvalResult as any) - setAbTestingEvalList(abTestingEvalResult) }) .catch(console.error) .finally(() => setFetchingEvaluations(false)) @@ -90,23 +74,13 @@ const EvaluationsPage = () => { key: "ab_testing_evaluation", label: "A/B Testing Evaluation", icon: , - children: ( - - ), + children: , }, { key: "single_model_evaluation", label: "Single Model Evaluation", icon: , - children: ( - - ), + children: , }, ] diff --git a/agenta-web/src/pages/apps/[app_id]/overview/index.tsx b/agenta-web/src/pages/apps/[app_id]/overview/index.tsx index 23434e9ed6..b4cb7a93f7 100644 --- a/agenta-web/src/pages/apps/[app_id]/overview/index.tsx +++ b/agenta-web/src/pages/apps/[app_id]/overview/index.tsx @@ -1,9 +1,9 @@ import DeleteAppModal from "@/components/AppSelector/modals/DeleteAppModal" import EditAppModal from "@/components/AppSelector/modals/EditAppModal" -import AbTestingEvalOverview from "@/components/pages/overview/abTestingEvaluation/AbTestingEvalOverview" +import AbTestingEvaluation from "@/components/HumanEvaluations/AbTestingEvaluation" import AutomaticEvalOverview from "@/components/pages/overview/automaticEvaluation/AutomaticEvalOverview" import DeploymentOverview from "@/components/pages/overview/deployments/DeploymentOverview" -import SingleModelEvalOverview from "@/components/pages/overview/singleModelEvaluation/SingleModelEvalOverview" +import SingleModelEvaluation from "@/components/HumanEvaluations/SingleModelEvaluation" import VariantsOverview from "@/components/pages/overview/variants/VariantsOverview" import {useAppsData} from "@/contexts/app.context" import {useAppId} from "@/hooks/useAppId" @@ -165,9 +165,9 @@ export default function Overview() { - + - + {currentApp && (