Skip to content

v1.18.0 #55

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

Merged
merged 10 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
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
Expand Up @@ -30,7 +30,7 @@ export default function RecordList(props: RecordListProps) {
<div className="px-4 py-5 sm:p-6">
{recordComments[record.id] && <div className="cursor-pointer absolute top-10 right-4"
onClick={() => dispatch(setModalStates(ModalEnum.RECORD_COMMENTS, { commentsData: recordComments[record.id], open: true }))}>
<Tooltip content={TOOLTIPS_DICT.DATA_BROWSER.RECORD_COMMENTS} color="invert" placement="left" className="cursor-auto">
<Tooltip content={TOOLTIPS_DICT.DATA_BROWSER.RECORD_COMMENTS} color="invert" placement="left">
<IconNotes className="h-4 w-4" />
</Tooltip>
</div>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -678,12 +678,12 @@ export default function SearchGroups() {
<div className="flex-grow min-w-0 mt-1">
<div className="flex flex-row items-center whitespace-nowrap">
<span className="text-sm mr-0.5 font-dmMono">CONFIDENCE BETWEEN</span>
<input disabled={fullSearchStore[group.key].groupElements['weakSupervisionLabels'].length == 0}
<input disabled={fullSearchStore[group.key].groupElements['weakSupervisionLabels'].length == 0} type="number"
onChange={(e) => changeConfidence(e, 'lower', group.key, 'weakSupervisionConfidence')}
value={fullSearchStore[group.key].groupElements['weakSupervisionConfidence'] ? fullSearchStore[group.key].groupElements['weakSupervisionConfidence']['lower'] : 0}
className="h-8 w-11 text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-2 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100 disabled:opacity-50 disabled:cursor-not-allowed" />
<span className="text-sm mx-0.5 font-dmMono">% AND</span>
<input disabled={fullSearchStore[group.key].groupElements['weakSupervisionLabels'].length == 0}
<input disabled={fullSearchStore[group.key].groupElements['weakSupervisionLabels'].length == 0} type="number"
onChange={(e) => changeConfidence(e, 'upper', group.key, 'weakSupervisionConfidence')}
value={fullSearchStore[group.key].groupElements['weakSupervisionConfidence'] ? fullSearchStore[group.key].groupElements['weakSupervisionConfidence']['upper'] : 100}
className="h-8 w-11 text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-2 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100 disabled:opacity-50 disabled:cursor-not-allowed" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useDispatch, useSelector } from "react-redux";
import HeuristicsLayout from "../shared/HeuristicsLayout";
import { useRouter } from "next/router";
import { selectProjectId } from "@/src/reduxStore/states/project";
import { Fragment, useCallback, useEffect, useState } from "react";
import { Fragment, useCallback, useEffect, useMemo, useState } from "react";
import { selectHeuristic, setActiveHeuristics, updateHeuristicsState } from "@/src/reduxStore/states/pages/heuristics";
import { getClassLine, postProcessCurrentHeuristic, postProcessLastTaskLogs } from "@/src/util/components/projects/projectId/heuristics/heuristicId/heuristics-details-helper";
import { TOOLTIPS_DICT } from "@/src/util/tooltip-constants";
Expand Down Expand Up @@ -204,6 +204,11 @@ export default function ActiveLearning() {
const orgId = useSelector(selectOrganizationId);
useWebsocket(orgId, Application.REFINERY, CurrentPage.ACTIVE_LEARNING, handleWebsocketNotification, projectId);

const bricksUrlExtension = useMemo(() => {
if (currentHeuristic?.labelingTaskType == 'INFORMATION_EXTRACTION') return 'extractors';
return "classifiers"
}, [currentHeuristic?.labelingTaskType]);

return (
<HeuristicsLayout updateSourceCode={(code) => updateSourceCodeToDisplay(code)}>

Expand Down Expand Up @@ -252,7 +257,7 @@ export default function ActiveLearning() {
)}
</div>
<div className="flex flex-row flex-nowrap items-center ml-auto">
<VisitBricksButton tooltipPlacement="left" size="small" />
<VisitBricksButton urlExtension={bricksUrlExtension} tooltipPlacement="left" size="small" />
</div>
</div>
<HeuristicsEditor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function PasteLookupListModal() {
<div className="grid justify-center items-center gap-x-2 gap-y-1 justify-items-start" style={{ gridTemplateColumns: 'max-content min-content' }}>
<span>Split On</span>
<input value={inputSplit} type="text" onInput={(e: any) => setInputSplit(e.target.value)}
className="h-8 w-10 text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-4 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100" />
className="h-8 w-12 text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-4 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100" />
</div>
<div className="mt-3" style={{ maxHeight: '80vh' }}>
<textarea value={inputArea} onInput={(e: any) => setInputArea(e.target.value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function RemoveLookupListModal() {
<div className="grid justify-center items-center gap-x-2 gap-y-1 justify-items-start" style={{ gridTemplateColumns: 'max-content min-content' }}>
<span>Split On</span>
<input value={inputSplit} type="text" onInput={(e: any) => setInputSplit(e.target.value)}
className="h-8 w-10 border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-4 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100" />
className="h-8 w-12 border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-4 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100" />
</div>
<div className="mt-3" style={{ maxHeight: '80vh' }}>
<textarea value={inputArea} onInput={(e: any) => setInputArea(e.target.value)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default function Sidebar() {
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.VERSION_OVERVIEW}>
<div onClick={requestVersionOverview} id="refineryVersion"
className="z-50 tooltip tooltip-right cursor-pointer select-none text-white flex items-center mr-1">
v1.17.0
v1.18.0
{hasUpdates && <Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.NEWER_VERSION_AVAILABLE} >
<IconAlertCircle className="h-5 w-5 text-yellow-700" />
</Tooltip>}
Expand Down
7 changes: 3 additions & 4 deletions src/reduxStore/StoreManagerComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,13 @@ export function GlobalStoreDataComponent(props: React.PropsWithChildren) {
getProjectByProjectId(projectId, (res) => {
dispatch(setActiveProject(res.data["projectByProjectId"]));
})
getRecommendedEncoders(null, (resEncoders) => {
dispatch(setCache(CacheEnum.MODELS_LIST, postProcessingEncoders(resEncoders.data['recommendedEncoders'])))
});
}
else {
dispatch(setActiveProject(null));
}

getRecommendedEncoders(null, (resEncoders) => {
dispatch(setCache(CacheEnum.MODELS_LIST, postProcessingEncoders(resEncoders.data['recommendedEncoders'])))
});
}, [router.query.projectId]);

useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions src/services/base/s3-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function downloadFile(credentialBlock: any, isStringData: boolean = true)

const s3Client = new S3Client({
endpoint: s3Endpoint,
forcePathStyle: true,
region: s3Region,
credentials: {
accessKeyId: credentials["AccessKeyId"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function getDefaultTaskOverviewLabelSettings(): LabelingSuiteTaskHeaderLa
}

export function prepareRLADataForRole(rlaData: any[], user: User, displayUserId: string, userDisplayRole: UserRole): any[] {
if (user.role != UserRole.ANNOTATOR && userDisplayRole != UserRole.ANNOTATOR) return rlaData;
if (user?.role != UserRole.ANNOTATOR && userDisplayRole != UserRole.ANNOTATOR) return rlaData;
const currentSourceId = SessionManager.getSourceId();
const allowedTask = SessionManager.getAllowedTask();
const rlaDataCopy = jsonCopy(rlaData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function filterRlaDataForUser(rlaData: any[], user: User, displayUserId:
}

export function filterRlaCondition(rla, user, displayUserId, userDisplayRole): boolean {
if (user.role != UserRole.ENGINEER || userDisplayRole != UserRole.ENGINEER) return rla.sourceType == LabelSource.MANUAL && rla.createdBy == displayUserId;
if (user?.role != UserRole.ENGINEER || userDisplayRole != UserRole.ENGINEER) return rla.sourceType == LabelSource.MANUAL && rla.createdBy == displayUserId;
if (rla.sourceType != LabelSource.MANUAL) return true;
if (displayUserId == ALL_USERS_USER_ID) return true;
if (!!rla.isGoldStar) return displayUserId == GOLD_STAR_USER_ID;
Expand Down