Browse Source

feat: 超参数新建时可以不设置手动运行参数

pull/178/head
cp3hnu 11 months ago
parent
commit
0421f4d2a0
5 changed files with 40 additions and 26 deletions
  1. +2
    -2
      react-ui/src/pages/HyperParameter/Create/index.tsx
  2. +14
    -1
      react-ui/src/pages/HyperParameter/components/CreateForm/ExecuteConfig.tsx
  3. +3
    -3
      react-ui/src/pages/HyperParameter/components/CreateForm/ParameterRange/index.tsx
  4. +1
    -0
      react-ui/src/pages/HyperParameter/components/CreateForm/index.less
  5. +20
    -20
      react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx

+ 2
- 2
react-ui/src/pages/HyperParameter/Create/index.tsx View File

@@ -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: [],
}}
>
<BasicConfig />


+ 14
- 1
react-ui/src/pages/HyperParameter/components/CreateForm/ExecuteConfig.tsx View File

@@ -513,7 +513,6 @@ function ExecuteConfig() {
marginRight: '3px',
}}
shape="circle"
disabled={fields.length === 1}
type="text"
size="middle"
icon={<MinusCircleOutlined />}
@@ -538,6 +537,20 @@ function ExecuteConfig() {
</div>
</Flex>
))}
{fields.length === 0 && (
<Form.Item className={styles['add-weight']}>
<Button
className={styles['add-weight__button']}
color="primary"
variant="dashed"
onClick={() => add()}
block
icon={<PlusCircleOutlined />}
>
添加手动运行参数
</Button>
</Form.Item>
)}
<Form.ErrorList errors={errors} className={styles['run-parameter__error']} />
</div>
</>


+ 3
- 3
react-ui/src/pages/HyperParameter/components/CreateForm/ParameterRange/index.tsx View File

@@ -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) {
<Flex align="start" style={{ width: '100%', marginBottom: '20px' }}>
{formOptions.map((item, index) => {
return (
<>
<React.Fragment key={item.name}>
<Form.Item
key={item.name}
name={item.name}
style={{ flex: 1, marginInlineEnd: 0 }}
rules={[
@@ -134,7 +134,7 @@ function ParameterRange({ type, value, onConfirm }: ParameterRangeProps) {
{index === 0 ? '-' : ' '}
</span>
)}
</>
</React.Fragment>
);
})}
</Flex>


+ 1
- 0
react-ui/src/pages/HyperParameter/components/CreateForm/index.less View File

@@ -11,6 +11,7 @@

// 增加样式权重
& &__button {
width: calc(100% - 126px);
border-color: .addAlpha(@primary-color, 0.5) [];
box-shadow: none !important;
&:hover {


+ 20
- 20
react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx View File

@@ -38,28 +38,28 @@ function ExperimentLog({ instanceInfo, nodes }: ExperimentLogProps) {
});

const tabItems = [
{
key: 'git-clone-framework',
label: '框架代码日志',
// icon: <KFIcon type="icon-rizhi1" />,
children: (
<div className={styles['experiment-log__tabs__log']}>
{frameworkCloneNodeStatus && (
<LogList
instanceName={instanceInfo.argo_ins_name}
instanceNamespace={instanceInfo.argo_ins_ns}
pipelineNodeId={frameworkCloneNodeStatus.displayName}
workflowId={frameworkCloneNodeStatus.id}
instanceNodeStartTime={frameworkCloneNodeStatus.startedAt}
instanceNodeStatus={frameworkCloneNodeStatus.phase as ExperimentStatus}
></LogList>
)}
</div>
),
},
// {
// key: 'git-clone-framework',
// label: '框架代码日志',
// // icon: <KFIcon type="icon-rizhi1" />,
// children: (
// <div className={styles['experiment-log__tabs__log']}>
// {frameworkCloneNodeStatus && (
// <LogList
// instanceName={instanceInfo.argo_ins_name}
// instanceNamespace={instanceInfo.argo_ins_ns}
// pipelineNodeId={frameworkCloneNodeStatus.displayName}
// workflowId={frameworkCloneNodeStatus.id}
// instanceNodeStartTime={frameworkCloneNodeStatus.startedAt}
// instanceNodeStatus={frameworkCloneNodeStatus.phase as ExperimentStatus}
// ></LogList>
// )}
// </div>
// ),
// },
{
key: 'git-clone-train',
label: '训练代码日志',
label: '系统日志',
// icon: <KFIcon type="icon-rizhi1" />,
children: (
<div className={styles['experiment-log__tabs__log']}>


Loading…
Cancel
Save