From a51da99e4955c0dc865503df592347350fdf147c Mon Sep 17 00:00:00 2001 From: Bruno Carlos <6951456+brnovasco@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:06:53 -0300 Subject: [PATCH] fix form rendering in success state on finetune node --- .../components/workboard/finetune-node.tsx | 91 +++++++------------ 1 file changed, 34 insertions(+), 57 deletions(-) diff --git a/apps/deepsirius-ui/src/components/workboard/finetune-node.tsx b/apps/deepsirius-ui/src/components/workboard/finetune-node.tsx index 092ae67..f9be23b 100644 --- a/apps/deepsirius-ui/src/components/workboard/finetune-node.tsx +++ b/apps/deepsirius-ui/src/components/workboard/finetune-node.tsx @@ -111,7 +111,10 @@ export function FinetuneNode(nodeProps: NodeProps) { }, }); updateNodeInternals(nodeProps.id); - } else if (jobData.jobStatus === 'FAILED' || jobData.jobStatus?.includes('CANCELLED')) { + } else if ( + jobData.jobStatus === 'FAILED' || + jobData.jobStatus?.includes('CANCELLED') + ) { const date = dayjs().format('YYYY-MM-DD HH:mm:ss'); toast.error('Job failed'); onUpdateNode({ @@ -312,64 +315,38 @@ export function FinetuneNode(nodeProps: NodeProps) { - handleSubmit(formData)} - /> - - - -

- Job Details -

-
- -
-
-

total iterations trained

-

- {nodeProps.data.finetuneData?.form.iterations ?? 0} -

-
- - {formData && - Object.entries(formData) - .filter( - ([_, value]) => - typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean', - ) - .map(([key, value], index) => { - const isEven = index % 2 === 0; - return ( -
-

- {key - .replace(/([a-z])([A-Z])/g, '$1 $2') - .toLowerCase()} -

-

- {value.toString()} -

-
- ); - })} -
-
-
-
+
+ {formData && + Object.entries(formData) + .filter( + ([_, value]) => + typeof value === 'string' || + typeof value === 'number' || + typeof value === 'boolean', + ) + .map(([key, value], index) => { + const isEven = index % 2 === 0; + return ( +
+

+ {key.replace(/([a-z])([A-Z])/g, '$1 $2').toLowerCase()} +

+

+ {value.toString()} +

+
+ ); + })} +
);