From 0421f4d2a063281987b9007ce9483573c48bbadc Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Thu, 13 Mar 2025 11:01:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B6=85=E5=8F=82=E6=95=B0=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E5=8F=AF=E4=BB=A5=E4=B8=8D=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E8=BF=90=E8=A1=8C=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/HyperParameter/Create/index.tsx | 4 +- .../components/CreateForm/ExecuteConfig.tsx | 15 ++++++- .../CreateForm/ParameterRange/index.tsx | 6 +-- .../components/CreateForm/index.less | 1 + .../components/ExperimentLog/index.tsx | 40 +++++++++---------- 5 files changed, 40 insertions(+), 26 deletions(-) diff --git a/react-ui/src/pages/HyperParameter/Create/index.tsx b/react-ui/src/pages/HyperParameter/Create/index.tsx index bd7aedb9..4cddd4a7 100644 --- a/react-ui/src/pages/HyperParameter/Create/index.tsx +++ b/react-ui/src/pages/HyperParameter/Create/index.tsx @@ -51,7 +51,7 @@ function CreateHyperParameter() { ...rest, name, parameters, - points_to_evaluate: points_to_evaluate ?? [undefined], + points_to_evaluate: points_to_evaluate ?? [], }; form.setFieldsValue(formData); @@ -138,7 +138,7 @@ function CreateHyperParameter() { name: '', }, ], - points_to_evaluate: [undefined], + points_to_evaluate: [], }} > diff --git a/react-ui/src/pages/HyperParameter/components/CreateForm/ExecuteConfig.tsx b/react-ui/src/pages/HyperParameter/components/CreateForm/ExecuteConfig.tsx index 307bc5dd..976b6467 100644 --- a/react-ui/src/pages/HyperParameter/components/CreateForm/ExecuteConfig.tsx +++ b/react-ui/src/pages/HyperParameter/components/CreateForm/ExecuteConfig.tsx @@ -513,7 +513,6 @@ function ExecuteConfig() { marginRight: '3px', }} shape="circle" - disabled={fields.length === 1} type="text" size="middle" icon={} @@ -538,6 +537,20 @@ function ExecuteConfig() { ))} + {fields.length === 0 && ( + + + + )} diff --git a/react-ui/src/pages/HyperParameter/components/CreateForm/ParameterRange/index.tsx b/react-ui/src/pages/HyperParameter/components/CreateForm/ParameterRange/index.tsx index e4b700c9..43cd25f2 100644 --- a/react-ui/src/pages/HyperParameter/components/CreateForm/ParameterRange/index.tsx +++ b/react-ui/src/pages/HyperParameter/components/CreateForm/ParameterRange/index.tsx @@ -1,5 +1,6 @@ import { MinusCircleOutlined, PlusCircleOutlined } from '@ant-design/icons'; import { Button, Flex, Form, Input, InputNumber } from 'antd'; +import React from 'react'; import { ParameterType, getFormOptions, parameterTooltip } from '../utils'; import styles from './index.less'; @@ -115,9 +116,8 @@ function ParameterRange({ type, value, onConfirm }: ParameterRangeProps) { {formOptions.map((item, index) => { return ( - <> + )} - + ); })} diff --git a/react-ui/src/pages/HyperParameter/components/CreateForm/index.less b/react-ui/src/pages/HyperParameter/components/CreateForm/index.less index 06bbd5b7..bd264d3c 100644 --- a/react-ui/src/pages/HyperParameter/components/CreateForm/index.less +++ b/react-ui/src/pages/HyperParameter/components/CreateForm/index.less @@ -11,6 +11,7 @@ // 增加样式权重 & &__button { + width: calc(100% - 126px); border-color: .addAlpha(@primary-color, 0.5) []; box-shadow: none !important; &:hover { diff --git a/react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx b/react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx index b27c20fe..a9c598b8 100644 --- a/react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx +++ b/react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx @@ -38,28 +38,28 @@ function ExperimentLog({ instanceInfo, nodes }: ExperimentLogProps) { }); const tabItems = [ - { - key: 'git-clone-framework', - label: '框架代码日志', - // icon: , - children: ( -
- {frameworkCloneNodeStatus && ( - - )} -
- ), - }, + // { + // key: 'git-clone-framework', + // label: '框架代码日志', + // // icon: , + // children: ( + //
+ // {frameworkCloneNodeStatus && ( + // + // )} + //
+ // ), + // }, { key: 'git-clone-train', - label: '训练代码日志', + label: '系统日志', // icon: , children: (