| @@ -291,60 +291,61 @@ export default [ | |||||
| }, | }, | ||||
| ], | ], | ||||
| }, | }, | ||||
| ], | |||||
| }, | |||||
| { | |||||
| name: '模型部署', | |||||
| path: '/modelDeployment', | |||||
| routes: [ | |||||
| { | { | ||||
| name: '模型部署', | 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: [ | routes: [ | ||||
| { | { | ||||
| name: '服务详情', | |||||
| name: '模型部署', | |||||
| path: '', | 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: '应用开发', | name: '应用开发', | ||||
| path: '/appsDeployment', | path: '/appsDeployment', | ||||
| @@ -250,7 +250,7 @@ export const antd: RuntimeAntdConfig = (memo) => { | |||||
| }; | }; | ||||
| memo.theme.cssVar = true; | memo.theme.cssVar = true; | ||||
| // memo.theme.hashed = false; | |||||
| memo.theme.hashed = false; | |||||
| memo.appConfig = { | memo.appConfig = { | ||||
| message: { | message: { | ||||
| @@ -25,9 +25,10 @@ export enum ResourceType { | |||||
| } | } | ||||
| export enum DataSource { | export enum DataSource { | ||||
| AtuoExport = 'auto_export', // 自动导出 | |||||
| AutoExport = 'auto_export', // 自动导出 | |||||
| HandExport = 'hand_export', // 手动导出 | HandExport = 'hand_export', // 手动导出 | ||||
| Create = 'add', // 新增 | Create = 'add', // 新增 | ||||
| LabelStudioExport = 'label_studio_export', // LabelStudio 导出 | |||||
| } | } | ||||
| type ResourceTypeInfo = { | type ResourceTypeInfo = { | ||||
| @@ -30,10 +30,4 @@ | |||||
| background-image: url(@/assets/img/pipeline-canvas-bg.png); | background-image: url(@/assets/img/pipeline-canvas-bg.png); | ||||
| background-size: 100% 100%; | background-size: 100% 100%; | ||||
| } | } | ||||
| :global { | |||||
| .ant-drawer-mask { | |||||
| background: transparent !important; | |||||
| } | |||||
| } | |||||
| } | } | ||||
| @@ -1,4 +1,5 @@ | |||||
| .experiment-drawer { | .experiment-drawer { | ||||
| line-height: var(--ant-line-height); | |||||
| :global { | :global { | ||||
| .ant-drawer-body { | .ant-drawer-body { | ||||
| overflow-y: hidden; | overflow-y: hidden; | ||||
| @@ -12,7 +13,7 @@ | |||||
| } | } | ||||
| &__tabs { | &__tabs { | ||||
| height: calc(100% - 170px); | |||||
| height: calc(100% - 169px); | |||||
| :global { | :global { | ||||
| .ant-tabs-nav { | .ant-tabs-nav { | ||||
| padding-left: 24px; | padding-left: 24px; | ||||
| @@ -95,10 +95,9 @@ const ExperimentDrawer = ({ | |||||
| return ( | return ( | ||||
| <Drawer | <Drawer | ||||
| rootStyle={{ marginTop: '55px' }} | |||||
| rootStyle={{ marginTop: '111px' }} | |||||
| title="任务执行详情" | title="任务执行详情" | ||||
| placement="right" | placement="right" | ||||
| getContainer={false} | |||||
| closeIcon={<CloseOutlined className={styles['experiment-drawer__close']} />} | closeIcon={<CloseOutlined className={styles['experiment-drawer__close']} />} | ||||
| onClose={onClose} | onClose={onClose} | ||||
| open={open} | open={open} | ||||
| @@ -51,7 +51,7 @@ function CreateHyperParameter() { | |||||
| ...rest, | ...rest, | ||||
| name, | name, | ||||
| parameters, | parameters, | ||||
| points_to_evaluate: points_to_evaluate ?? [undefined], | |||||
| points_to_evaluate: points_to_evaluate ?? [], | |||||
| }; | }; | ||||
| form.setFieldsValue(formData); | form.setFieldsValue(formData); | ||||
| @@ -138,7 +138,7 @@ function CreateHyperParameter() { | |||||
| name: '', | name: '', | ||||
| }, | }, | ||||
| ], | ], | ||||
| points_to_evaluate: [undefined], | |||||
| points_to_evaluate: [], | |||||
| }} | }} | ||||
| > | > | ||||
| <BasicConfig /> | <BasicConfig /> | ||||
| @@ -513,7 +513,6 @@ function ExecuteConfig() { | |||||
| marginRight: '3px', | marginRight: '3px', | ||||
| }} | }} | ||||
| shape="circle" | shape="circle" | ||||
| disabled={fields.length === 1} | |||||
| type="text" | type="text" | ||||
| size="middle" | size="middle" | ||||
| icon={<MinusCircleOutlined />} | icon={<MinusCircleOutlined />} | ||||
| @@ -538,6 +537,20 @@ function ExecuteConfig() { | |||||
| </div> | </div> | ||||
| </Flex> | </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']} /> | <Form.ErrorList errors={errors} className={styles['run-parameter__error']} /> | ||||
| </div> | </div> | ||||
| </> | </> | ||||
| @@ -1,5 +1,6 @@ | |||||
| import { MinusCircleOutlined, PlusCircleOutlined } from '@ant-design/icons'; | import { MinusCircleOutlined, PlusCircleOutlined } from '@ant-design/icons'; | ||||
| import { Button, Flex, Form, Input, InputNumber } from 'antd'; | import { Button, Flex, Form, Input, InputNumber } from 'antd'; | ||||
| import React from 'react'; | |||||
| import { ParameterType, getFormOptions, parameterTooltip } from '../utils'; | import { ParameterType, getFormOptions, parameterTooltip } from '../utils'; | ||||
| import styles from './index.less'; | import styles from './index.less'; | ||||
| @@ -115,9 +116,8 @@ function ParameterRange({ type, value, onConfirm }: ParameterRangeProps) { | |||||
| <Flex align="start" style={{ width: '100%', marginBottom: '20px' }}> | <Flex align="start" style={{ width: '100%', marginBottom: '20px' }}> | ||||
| {formOptions.map((item, index) => { | {formOptions.map((item, index) => { | ||||
| return ( | return ( | ||||
| <> | |||||
| <React.Fragment key={item.name}> | |||||
| <Form.Item | <Form.Item | ||||
| key={item.name} | |||||
| name={item.name} | name={item.name} | ||||
| style={{ flex: 1, marginInlineEnd: 0 }} | style={{ flex: 1, marginInlineEnd: 0 }} | ||||
| rules={[ | rules={[ | ||||
| @@ -134,7 +134,7 @@ function ParameterRange({ type, value, onConfirm }: ParameterRangeProps) { | |||||
| {index === 0 ? '-' : ' '} | {index === 0 ? '-' : ' '} | ||||
| </span> | </span> | ||||
| )} | )} | ||||
| </> | |||||
| </React.Fragment> | |||||
| ); | ); | ||||
| })} | })} | ||||
| </Flex> | </Flex> | ||||
| @@ -11,6 +11,7 @@ | |||||
| // 增加样式权重 | // 增加样式权重 | ||||
| & &__button { | & &__button { | ||||
| width: calc(100% - 126px); | |||||
| border-color: .addAlpha(@primary-color, 0.5) []; | border-color: .addAlpha(@primary-color, 0.5) []; | ||||
| box-shadow: none !important; | box-shadow: none !important; | ||||
| &:hover { | &:hover { | ||||
| @@ -38,28 +38,28 @@ function ExperimentLog({ instanceInfo, nodes }: ExperimentLogProps) { | |||||
| }); | }); | ||||
| const tabItems = [ | 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', | key: 'git-clone-train', | ||||
| label: '训练代码日志', | |||||
| label: '系统日志', | |||||
| // icon: <KFIcon type="icon-rizhi1" />, | // icon: <KFIcon type="icon-rizhi1" />, | ||||
| children: ( | children: ( | ||||
| <div className={styles['experiment-log__tabs__log']}> | <div className={styles['experiment-log__tabs__log']}> | ||||
| @@ -34,7 +34,7 @@ function ParameterInfo({ info }: ParameterInfoProps) { | |||||
| } | } | ||||
| return info.points_to_evaluate.map((item, index) => ({ | return info.points_to_evaluate.map((item, index) => ({ | ||||
| ...item, | ...item, | ||||
| id: index, | |||||
| id: index, // 作为 key,这个数组不会变化 | |||||
| })); | })); | ||||
| }, [info]); | }, [info]); | ||||
| @@ -168,7 +168,7 @@ function CreateServiceVersion() { | |||||
| if (lastPage === CreateServiceVersionFrom.ServiceInfo) { | if (lastPage === CreateServiceVersionFrom.ServiceInfo) { | ||||
| navigate(-1); | navigate(-1); | ||||
| } else { | } else { | ||||
| navigate(`/modelDeployment/serviceInfo/${serviceId}`, { replace: true }); | |||||
| navigate(`/dataset/modelDeployment/serviceInfo/${serviceId}`, { replace: true }); | |||||
| } | } | ||||
| } | } | ||||
| }; | }; | ||||
| @@ -92,7 +92,7 @@ function QuickStart() { | |||||
| buttonTop={20} | buttonTop={20} | ||||
| x={left + 4 * (192 + space) + 60 + space} | x={left + 4 * (192 + space) + 60 + space} | ||||
| y={263} | y={263} | ||||
| onClick={() => navigate('/modelDeployment')} | |||||
| onClick={() => navigate('/dataset/modelDeployment')} | |||||
| /> | /> | ||||
| <div | <div | ||||
| className={styles['quick-start__content__canvas__model']} | className={styles['quick-start__content__canvas__model']} | ||||
| @@ -98,8 +98,10 @@ export const formatSource = (source?: string) => { | |||||
| return '用户上传'; | return '用户上传'; | ||||
| } else if (source === DataSource.HandExport) { | } else if (source === DataSource.HandExport) { | ||||
| return '手动导入'; | return '手动导入'; | ||||
| } else if (source === DataSource.AtuoExport) { | |||||
| } else if (source === DataSource.AutoExport) { | |||||
| return '实验自动导入'; | return '实验自动导入'; | ||||
| } else if (source === DataSource.LabelStudioExport) { | |||||
| return '数据标注导入'; | |||||
| } | } | ||||
| return source; | return source; | ||||
| }; | }; | ||||
| @@ -13,9 +13,11 @@ import org.springframework.http.ResponseEntity; | |||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import org.springframework.web.multipart.MultipartFile; | import org.springframework.web.multipart.MultipartFile; | ||||
| import javax.annotation.Nullable; | |||||
| import javax.annotation.Resource; | import javax.annotation.Resource; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| import java.util.Optional; | |||||
| @RestController | @RestController | ||||
| @RequestMapping("newdataset") | @RequestMapping("newdataset") | ||||
| @@ -70,12 +72,15 @@ public class NewDatasetFromGitController { | |||||
| @GetMapping("/queryDatasets") | @GetMapping("/queryDatasets") | ||||
| @ApiOperation("数据集广场公开数据集分页查询,根据data_type,data_tag筛选,true公开false私有") | @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_type", required = false) String dataType, | ||||
| @RequestParam(value = "data_tag", required = false) String dataTag, | @RequestParam(value = "data_tag", required = false) String dataTag, | ||||
| @RequestParam(value = "name", required = false) String name) throws Exception { | @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); | PageRequest pageRequest = PageRequest.of(page, size); | ||||
| Dataset dataset = new Dataset(); | Dataset dataset = new Dataset(); | ||||
| dataset.setDataTag(dataTag); | dataset.setDataTag(dataTag); | ||||