| @@ -87,6 +87,9 @@ function CreateAutoML() { | |||||
| // 编辑,复制 | // 编辑,复制 | ||||
| if (id && !Number.isNaN(id)) { | if (id && !Number.isNaN(id)) { | ||||
| getAutoMLInfo(id); | getAutoMLInfo(id); | ||||
| } else { | |||||
| // 新建,不设置 form 的 type 初始值,是为了编辑和复制的时候,form 跳动 | |||||
| form.setFieldValue('type', AutoMLType.Table); | |||||
| } | } | ||||
| }, [id, form, isCopy]); | }, [id, form, isCopy]); | ||||
| @@ -183,7 +186,6 @@ function CreateAutoML() { | |||||
| autoComplete="off" | autoComplete="off" | ||||
| scrollToFirstError | scrollToFirstError | ||||
| initialValues={{ | initialValues={{ | ||||
| type: AutoMLType.Table, | |||||
| task_type: AutoMLTaskType.Classification, | task_type: AutoMLTaskType.Classification, | ||||
| shuffle: false, | shuffle: false, | ||||
| ensemble_class: AutoMLEnsembleClass.Default, | ensemble_class: AutoMLEnsembleClass.Default, | ||||
| @@ -48,13 +48,14 @@ function AutoMLInstance() { | |||||
| const [res] = await to(getExperimentInsReq(instanceId)); | const [res] = await to(getExperimentInsReq(instanceId)); | ||||
| if (res && res.data) { | if (res && res.data) { | ||||
| const info = res.data as AutoMLInstanceData; | 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); | const paramJson = parseJsonText(param); | ||||
| if (paramJson) { | if (paramJson) { | ||||
| setAutoMLInfo({ | setAutoMLInfo({ | ||||
| ...paramJson, | |||||
| ...paramJson.data, | |||||
| create_time, | create_time, | ||||
| type, | |||||
| }); | }); | ||||
| } | } | ||||
| @@ -66,7 +66,7 @@ export const experimentListConfig: Record<ExperimentListType, ExperimentListInfo | |||||
| pathPrefix: 'automl', | pathPrefix: 'automl', | ||||
| nameProperty: 'name', | nameProperty: 'name', | ||||
| descProperty: 'description', | descProperty: 'description', | ||||
| idProperty: 'autoMlId', | |||||
| idProperty: 'machineLearnId', | |||||
| }, | }, | ||||
| [ExperimentListType.HyperParameter]: { | [ExperimentListType.HyperParameter]: { | ||||
| getListReq: getRayListReq, | getListReq: getRayListReq, | ||||
| @@ -89,4 +89,5 @@ export type AutoMLInstanceData = { | |||||
| update_time: string; | update_time: string; | ||||
| finish_time: string; | finish_time: string; | ||||
| nodeStatus?: NodeStatus; | nodeStatus?: NodeStatus; | ||||
| type: string; | |||||
| }; | }; | ||||
| @@ -8,9 +8,13 @@ | |||||
| color: white; | color: white; | ||||
| white-space: pre-wrap; | white-space: pre-wrap; | ||||
| background-color: rgba(0, 0, 0, 0.85); | background-color: rgba(0, 0, 0, 0.85); | ||||
| font-family: 'Roboto Mono', 'Menlo', 'Consolas', 'Monaco', monospace; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| align-items: center; | |||||
| &__more { | &__more { | ||||
| padding: 10px 0; | |||||
| padding: 20px 0; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||