Browse Source

Merge branch 'dev' of https://gitlink.org.cn/ci4s/ci4sManagement-cloud into dev

dev-active_learn
somunslotus 1 year ago
parent
commit
4205938e9a
16 changed files with 99 additions and 82 deletions
  1. +39
    -38
      react-ui/config/routes.ts
  2. +1
    -1
      react-ui/src/app.tsx
  3. +2
    -1
      react-ui/src/pages/Dataset/config.tsx
  4. +0
    -6
      react-ui/src/pages/Experiment/Info/index.less
  5. +2
    -1
      react-ui/src/pages/Experiment/components/ExperimentDrawer/index.less
  6. +1
    -2
      react-ui/src/pages/Experiment/components/ExperimentDrawer/index.tsx
  7. +2
    -2
      react-ui/src/pages/HyperParameter/Create/index.tsx
  8. +14
    -1
      react-ui/src/pages/HyperParameter/components/CreateForm/ExecuteConfig.tsx
  9. +3
    -3
      react-ui/src/pages/HyperParameter/components/CreateForm/ParameterRange/index.tsx
  10. +1
    -0
      react-ui/src/pages/HyperParameter/components/CreateForm/index.less
  11. +20
    -20
      react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx
  12. +1
    -1
      react-ui/src/pages/HyperParameter/components/ParameterInfo/index.tsx
  13. +1
    -1
      react-ui/src/pages/ModelDeployment/CreateVersion/index.tsx
  14. +1
    -1
      react-ui/src/pages/Workspace/components/QuickStart/index.tsx
  15. +3
    -1
      react-ui/src/utils/format.ts
  16. +8
    -3
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/dataset/NewDatasetFromGitController.java

+ 39
- 38
react-ui/config/routes.ts View File

@@ -291,60 +291,61 @@ export default [
},
],
},
],
},
{
name: '模型部署',
path: '/modelDeployment',
routes: [
{
name: '模型部署',
path: '',
component: './ModelDeployment/List',
},
{
name: '创建推理服务',
path: 'createService',
component: './ModelDeployment/CreateService',
},
{
name: '编辑推理服务',
path: 'editService/:serviceId',
component: './ModelDeployment/CreateService',
},
{
name: '服务详情',
path: 'serviceInfo/:serviceId',
path: 'modelDeployment',
routes: [
{
name: '服务详情',
name: '模型部署',
path: '',
component: './ModelDeployment/ServiceInfo',
component: './ModelDeployment/List',
},
{
name: '新增服务版本',
path: 'createVersion',
component: './ModelDeployment/CreateVersion',
name: '创建推理服务',
path: 'createService',
component: './ModelDeployment/CreateService',
},
{
name: '更新服务版本',
path: 'updateVersion',
component: './ModelDeployment/CreateVersion',
name: '编辑推理服务',
path: 'editService/:serviceId',
component: './ModelDeployment/CreateService',
},
{
name: '重启服务版本',
path: 'restartVersion',
component: './ModelDeployment/CreateVersion',
},
{
name: '服务版本详情',
path: 'versionInfo/:id',
component: './ModelDeployment/VersionInfo',
name: '服务详情',
path: 'serviceInfo/:serviceId',
routes: [
{
name: '服务详情',
path: '',
component: './ModelDeployment/ServiceInfo',
},
{
name: '新增服务版本',
path: 'createVersion',
component: './ModelDeployment/CreateVersion',
},
{
name: '更新服务版本',
path: 'updateVersion',
component: './ModelDeployment/CreateVersion',
},
{
name: '重启服务版本',
path: 'restartVersion',
component: './ModelDeployment/CreateVersion',
},
{
name: '服务版本详情',
path: 'versionInfo/:id',
component: './ModelDeployment/VersionInfo',
},
],
},
],
},
],
},

{
name: '应用开发',
path: '/appsDeployment',


+ 1
- 1
react-ui/src/app.tsx View File

@@ -250,7 +250,7 @@ export const antd: RuntimeAntdConfig = (memo) => {
};

memo.theme.cssVar = true;
// memo.theme.hashed = false;
memo.theme.hashed = false;

memo.appConfig = {
message: {


+ 2
- 1
react-ui/src/pages/Dataset/config.tsx View File

@@ -25,9 +25,10 @@ export enum ResourceType {
}

export enum DataSource {
AtuoExport = 'auto_export', // 自动导出
AutoExport = 'auto_export', // 自动导出
HandExport = 'hand_export', // 手动导出
Create = 'add', // 新增
LabelStudioExport = 'label_studio_export', // LabelStudio 导出
}

type ResourceTypeInfo = {


+ 0
- 6
react-ui/src/pages/Experiment/Info/index.less View File

@@ -30,10 +30,4 @@
background-image: url(@/assets/img/pipeline-canvas-bg.png);
background-size: 100% 100%;
}

:global {
.ant-drawer-mask {
background: transparent !important;
}
}
}

+ 2
- 1
react-ui/src/pages/Experiment/components/ExperimentDrawer/index.less View File

@@ -1,4 +1,5 @@
.experiment-drawer {
line-height: var(--ant-line-height);
:global {
.ant-drawer-body {
overflow-y: hidden;
@@ -12,7 +13,7 @@
}

&__tabs {
height: calc(100% - 170px);
height: calc(100% - 169px);
:global {
.ant-tabs-nav {
padding-left: 24px;


+ 1
- 2
react-ui/src/pages/Experiment/components/ExperimentDrawer/index.tsx View File

@@ -95,10 +95,9 @@ const ExperimentDrawer = ({

return (
<Drawer
rootStyle={{ marginTop: '55px' }}
rootStyle={{ marginTop: '111px' }}
title="任务执行详情"
placement="right"
getContainer={false}
closeIcon={<CloseOutlined className={styles['experiment-drawer__close']} />}
onClose={onClose}
open={open}


+ 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']}>


+ 1
- 1
react-ui/src/pages/HyperParameter/components/ParameterInfo/index.tsx View File

@@ -34,7 +34,7 @@ function ParameterInfo({ info }: ParameterInfoProps) {
}
return info.points_to_evaluate.map((item, index) => ({
...item,
id: index,
id: index, // 作为 key,这个数组不会变化
}));
}, [info]);



+ 1
- 1
react-ui/src/pages/ModelDeployment/CreateVersion/index.tsx View File

@@ -168,7 +168,7 @@ function CreateServiceVersion() {
if (lastPage === CreateServiceVersionFrom.ServiceInfo) {
navigate(-1);
} else {
navigate(`/modelDeployment/serviceInfo/${serviceId}`, { replace: true });
navigate(`/dataset/modelDeployment/serviceInfo/${serviceId}`, { replace: true });
}
}
};


+ 1
- 1
react-ui/src/pages/Workspace/components/QuickStart/index.tsx View File

@@ -92,7 +92,7 @@ function QuickStart() {
buttonTop={20}
x={left + 4 * (192 + space) + 60 + space}
y={263}
onClick={() => navigate('/modelDeployment')}
onClick={() => navigate('/dataset/modelDeployment')}
/>
<div
className={styles['quick-start__content__canvas__model']}


+ 3
- 1
react-ui/src/utils/format.ts View File

@@ -98,8 +98,10 @@ export const formatSource = (source?: string) => {
return '用户上传';
} else if (source === DataSource.HandExport) {
return '手动导入';
} else if (source === DataSource.AtuoExport) {
} else if (source === DataSource.AutoExport) {
return '实验自动导入';
} else if (source === DataSource.LabelStudioExport) {
return '数据标注导入';
}
return source;
};


+ 8
- 3
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/dataset/NewDatasetFromGitController.java View File

@@ -13,9 +13,11 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Nullable;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Optional;

@RestController
@RequestMapping("newdataset")
@@ -70,12 +72,15 @@ public class NewDatasetFromGitController {

@GetMapping("/queryDatasets")
@ApiOperation("数据集广场公开数据集分页查询,根据data_type,data_tag筛选,true公开false私有")
public AjaxResult queryDatasets(@RequestParam("page") int page,
@RequestParam("size") int size,
@RequestParam(value = "is_public") Boolean isPublic,
public AjaxResult queryDatasets(@RequestParam(value = "page", required = false) @Nullable Integer page,
@RequestParam(value = "size", required = false) @Nullable Integer size,
@RequestParam(value = "is_public", required = false) @Nullable Boolean isPublic,
@RequestParam(value = "data_type", required = false) String dataType,
@RequestParam(value = "data_tag", required = false) String dataTag,
@RequestParam(value = "name", required = false) String name) throws Exception {
page = Optional.ofNullable(page).orElse(0); // 默认 page 为 0
size = Optional.ofNullable(size).orElse(10000); // 默认 size 为 10000
isPublic = Optional.ofNullable(isPublic).orElse(false);
PageRequest pageRequest = PageRequest.of(page, size);
Dataset dataset = new Dataset();
dataset.setDataTag(dataTag);


Loading…
Cancel
Save