From 98a86e412b851cbcd24573126692c5ffc5bfbe6e Mon Sep 17 00:00:00 2001 From: anmarhindi Date: Mon, 21 Oct 2024 11:26:49 +0200 Subject: [PATCH 1/5] Version change --- src/components/shared/sidebar/Sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/shared/sidebar/Sidebar.tsx b/src/components/shared/sidebar/Sidebar.tsx index 7308f6b3..6275c543 100644 --- a/src/components/shared/sidebar/Sidebar.tsx +++ b/src/components/shared/sidebar/Sidebar.tsx @@ -213,7 +213,7 @@ export default function Sidebar() {
- v1.16.0 + v1.17.0 {hasUpdates && } From a9066fc689494e268f2a890734a023e0e74ef66e Mon Sep 17 00:00:00 2001 From: JWittmeyer Date: Mon, 21 Oct 2024 16:17:45 +0200 Subject: [PATCH 2/5] Remove bricks icons --- .../shared/bricks-integrator/PageSearch.tsx | 30 +------------------ submodules/react-components | 2 +- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/components/shared/bricks-integrator/PageSearch.tsx b/src/components/shared/bricks-integrator/PageSearch.tsx index 79662928..69c5e821 100644 --- a/src/components/shared/bricks-integrator/PageSearch.tsx +++ b/src/components/shared/bricks-integrator/PageSearch.tsx @@ -1,14 +1,11 @@ import { selectBricksIntegrator, setBricksIntegrator } from "@/src/reduxStore/states/general"; import { IntegratorPage, PageSearchProps } from "@/src/types/shared/bricks-integrator"; -import { IconAlertCircle, IconBrandGithub, IconChevronsDown, IconLoader, IconSearch } from "@tabler/icons-react"; +import { IconAlertCircle, IconBrandGithub, IconChevronsDown, IconSearch } from "@tabler/icons-react"; import { useDispatch, useSelector } from "react-redux" import LoadingIcon from "../loading/LoadingIcon"; import { useState } from "react"; import style from '@/src/styles/shared/bricks-integrator.module.css'; import { jsonCopy } from "@/submodules/javascript-functions/general"; -import * as TablerIcons from '@tabler/icons-react'; -import { getIconName } from "@/src/util/shared/bricks-integrator-helper"; - export default function PageSearch(props: PageSearchProps) { const dispatch = useDispatch(); @@ -72,7 +69,6 @@ export default function PageSearch(props: PageSearchProps) { {config.search.results.map((result: any, i: number) => (
  • props.selectSearchResult(result.id)} className={`text-left group flex flex-row items-center cursor-pointer select-none rounded-xl p-3 hover:bg-gray-100 relative ${!result.searchVisible || !result.groupVisible ? 'hidden' : ''}`} id="option-1" role="option"> -

    {result.attributes.name}

    {result.attributes.description}

    @@ -83,27 +79,3 @@ export default function PageSearch(props: PageSearchProps) {
    } ) } - -function SVGIcon({ icon, size, strokeWidth, color }) { - const Icon = TablerIcons['Icon' + icon]; - if (Icon) { - return ( - - ) - } else { - const Icon = TablerIcons['Icon' + getIconName(icon)]; - if (Icon) { - return ( - - ) - } - } -} \ No newline at end of file diff --git a/submodules/react-components b/submodules/react-components index 42f1af8d..d6d15432 160000 --- a/submodules/react-components +++ b/submodules/react-components @@ -1 +1 @@ -Subproject commit 42f1af8d2534bd1c82094fce4cc70d193344cfb8 +Subproject commit d6d15432504c7718ec9ec730929ff53e2f607a03 From f716e5d19d299169957b35a04bdd2963fe0a72e1 Mon Sep 17 00:00:00 2001 From: Lina Date: Mon, 21 Oct 2024 16:25:25 +0200 Subject: [PATCH 3/5] Record Downlaod is not working - fix --- src/components/shared/export/ExportRecordsModal.tsx | 4 ++-- submodules/react-components | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/shared/export/ExportRecordsModal.tsx b/src/components/shared/export/ExportRecordsModal.tsx index 1260d7cc..f596c1ce 100644 --- a/src/components/shared/export/ExportRecordsModal.tsx +++ b/src/components/shared/export/ExportRecordsModal.tsx @@ -213,9 +213,9 @@ export default function ExportRecordsModal(props: ExportProps) { let keyToSend = key; if (!keyToSend) keyToSend = null; prepareRecordExport(projectId, { exportOptions: jsonString, key: keyToSend }, (res) => { - if (res.data['prepareRecordExport'] != "") { + if (!res.data) { ExportHelper.error.push("Something went wrong in the backend:"); - ExportHelper.error.push(res.data['prepareRecordExport']); + ExportHelper.error.push(res.error); setPrepareErrors(ExportHelper.error); } setDownloadState(DownloadState.DOWNLOAD); diff --git a/submodules/react-components b/submodules/react-components index 42f1af8d..1577856a 160000 --- a/submodules/react-components +++ b/submodules/react-components @@ -1 +1 @@ -Subproject commit 42f1af8d2534bd1c82094fce4cc70d193344cfb8 +Subproject commit 1577856a614772f50ec817075f7bd52e6f1a4204 From 04995d2a5e3360da9889753d065dacb96ce7aa4b Mon Sep 17 00:00:00 2001 From: Lina Date: Tue, 22 Oct 2024 16:15:14 +0200 Subject: [PATCH 4/5] Weak supervision running into error --- .../projectId/heuristics/HeuristicsHeader.tsx | 4 +-- .../heuristics/HeuristicsOverview.tsx | 25 +++++++++++++++++-- .../projectId/heuristics/heuristics.ts | 1 + submodules/react-components | 2 +- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/components/projects/projectId/heuristics/HeuristicsHeader.tsx b/src/components/projects/projectId/heuristics/HeuristicsHeader.tsx index 036a8cf6..c018f801 100644 --- a/src/components/projects/projectId/heuristics/HeuristicsHeader.tsx +++ b/src/components/projects/projectId/heuristics/HeuristicsHeader.tsx @@ -44,7 +44,6 @@ export default function HeuristicsHeader(props: HeuristicsHeaderProps) { const [currentWeakSupervisionRun, setCurrentWeakSupervisionRun] = useState(null); const [loadingIconWS, setLoadingIconWS] = useState(false); - useEffect(() => { if (!heuristics) return; setAreHeuristicsSelected(checkSelectedHeuristics(heuristics, false)); @@ -201,7 +200,8 @@ export default function HeuristicsHeader(props: HeuristicsHeaderProps) { {areValidHeuristicsSelected ? ( diff --git a/src/components/projects/projectId/heuristics/HeuristicsOverview.tsx b/src/components/projects/projectId/heuristics/HeuristicsOverview.tsx index d678e55e..60d9ffb2 100644 --- a/src/components/projects/projectId/heuristics/HeuristicsOverview.tsx +++ b/src/components/projects/projectId/heuristics/HeuristicsOverview.tsx @@ -20,9 +20,10 @@ import { useWebsocket } from "@/submodules/react-components/hooks/web-socket/use import { getAllComments } from "@/src/services/base/comment"; import { getAttributes } from "@/src/services/base/attribute"; import { getInformationSourcesOverviewData } from "@/src/services/base/heuristic"; -import { getLabelingTasksByProjectId } from "@/src/services/base/project"; +import { getLabelingTasksByProjectId, getProjectTokenization } from "@/src/services/base/project"; import { getEmbeddings } from "@/src/services/base/embedding"; import { Application, CurrentPage } from "@/submodules/react-components/hooks/web-socket/constants"; +import { timer } from "rxjs"; export function HeuristicsOverview() { const dispatch = useDispatch(); @@ -33,12 +34,15 @@ export function HeuristicsOverview() { const attributes = useSelector(selectUsableNonTextAttributes); const allUsers = useSelector(selectAllUsers); const [filteredList, setFilteredList] = useState([]); + const [tokenizationProgress, setTokenizationProgress] = useState(null); + useEffect(() => { if (!projectId || !embeddings || !attributes) return; refetchLabelingTasksAndProcess(); refetchHeuristicsAndProcess(); refetchEmbeddingsAndProcess(); + checkProjectTokenization(); if (attributes.length == 0) { getAttributes(projectId, ['ALL'], (res) => { dispatch(setAllAttributes(res.data['attributesByProjectId'])); @@ -91,6 +95,12 @@ export function HeuristicsOverview() { }); } + function checkProjectTokenization() { + getProjectTokenization(projectId, (res) => { + setTokenizationProgress(res.data['projectTokenization']?.progress); + }); + } + const handleWebsocketNotification = useCallback((msgParts: string[]) => { if (['labeling_task_updated', 'labeling_task_created'].includes(msgParts[1])) { refetchLabelingTasksAndProcess(); @@ -102,6 +112,17 @@ export function HeuristicsOverview() { } else if (msgParts[1] == 'embedding_deleted' || (msgParts[1] == 'embedding' && msgParts[3] == 'state')) { refetchEmbeddingsAndProcess(); } + + if (msgParts[1] == 'tokenization') { + if (msgParts[3] == 'progress') { + setTokenizationProgress(Number(msgParts[4])); + } else if (msgParts[3] == 'state') { + if (msgParts[4] == 'IN_PROGRESS') setTokenizationProgress(0); + else if (msgParts[4] == 'FINISHED') { + timer(5000).subscribe(() => checkProjectTokenization()); + } + } + } }, [projectId]); const orgId = useSelector(selectOrganizationId); @@ -109,7 +130,7 @@ export function HeuristicsOverview() { return (projectId &&
    - setFilteredList(labelingTask != null ? heuristics.filter((heuristic) => heuristic.labelingTaskId === labelingTask.id) : heuristics)} /> {heuristics && heuristics.length == 0 ? ( diff --git a/src/types/components/projects/projectId/heuristics/heuristics.ts b/src/types/components/projects/projectId/heuristics/heuristics.ts index 31889bff..acdb3e35 100644 --- a/src/types/components/projects/projectId/heuristics/heuristics.ts +++ b/src/types/components/projects/projectId/heuristics/heuristics.ts @@ -68,6 +68,7 @@ export type Color = { export type HeuristicsHeaderProps = { filterList: (labelingTask: LabelingTask) => void; refetch: () => void; + tokenizationProgress: number; } export type CurrentWeakSupervision = { diff --git a/submodules/react-components b/submodules/react-components index d6d15432..d23d4bf6 160000 --- a/submodules/react-components +++ b/submodules/react-components @@ -1 +1 @@ -Subproject commit d6d15432504c7718ec9ec730929ff53e2f607a03 +Subproject commit d23d4bf62f0f40e8a5b84c39227620f706241c5b From 7e530452bcea04e4430592c84ce5197918e08d8e Mon Sep 17 00:00:00 2001 From: JWittmeyer Date: Wed, 23 Oct 2024 15:25:03 +0200 Subject: [PATCH 5/5] Submodule merge --- submodules/react-components | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/react-components b/submodules/react-components index d23d4bf6..5c230212 160000 --- a/submodules/react-components +++ b/submodules/react-components @@ -1 +1 @@ -Subproject commit d23d4bf62f0f40e8a5b84c39227620f706241c5b +Subproject commit 5c230212f0a872dd03335e786512f824a4af61d3