diff --git a/react-ui/src/pages/AutoML/Create/index.tsx b/react-ui/src/pages/AutoML/Create/index.tsx index 2ce59490..1489d999 100644 --- a/react-ui/src/pages/AutoML/Create/index.tsx +++ b/react-ui/src/pages/AutoML/Create/index.tsx @@ -87,6 +87,9 @@ function CreateAutoML() { // 编辑,复制 if (id && !Number.isNaN(id)) { getAutoMLInfo(id); + } else { + // 新建,不设置 form 的 type 初始值,是为了编辑和复制的时候,form 跳动 + form.setFieldValue('type', AutoMLType.Table); } }, [id, form, isCopy]); @@ -183,7 +186,6 @@ function CreateAutoML() { autoComplete="off" scrollToFirstError initialValues={{ - type: AutoMLType.Table, task_type: AutoMLTaskType.Classification, shuffle: false, ensemble_class: AutoMLEnsembleClass.Default, diff --git a/react-ui/src/pages/AutoML/Instance/index.tsx b/react-ui/src/pages/AutoML/Instance/index.tsx index 1bb5279a..9d97f1c2 100644 --- a/react-ui/src/pages/AutoML/Instance/index.tsx +++ b/react-ui/src/pages/AutoML/Instance/index.tsx @@ -48,13 +48,14 @@ function AutoMLInstance() { const [res] = await to(getExperimentInsReq(instanceId)); if (res && res.data) { const info = res.data as AutoMLInstanceData; - const { param, node_status, argo_ins_name, argo_ins_ns, status, create_time } = info; + const { param, node_status, argo_ins_name, argo_ins_ns, status, create_time, type } = info; // 解析配置参数 const paramJson = parseJsonText(param); if (paramJson) { setAutoMLInfo({ - ...paramJson, + ...paramJson.data, create_time, + type, }); } diff --git a/react-ui/src/pages/AutoML/components/ExperimentList/config.ts b/react-ui/src/pages/AutoML/components/ExperimentList/config.ts index 03521793..f793b958 100644 --- a/react-ui/src/pages/AutoML/components/ExperimentList/config.ts +++ b/react-ui/src/pages/AutoML/components/ExperimentList/config.ts @@ -66,7 +66,7 @@ export const experimentListConfig: Record