修改训练bug

This commit is contained in:
limengnan 2026-04-07 16:25:31 +08:00
parent 0c9e04ef8b
commit 26a8fb860e

View File

@ -130,18 +130,7 @@ const input = ref("");
//
const title = ref("");
const info: any = ref({
name: "",
description: "",
version: "",
principle: "",
status:1,
algorithmType: "",
inputParams: "",
outputParams: "",
inferBaseUrl: "",
trainBaseUrl: "",
supportedDeviceTypes: "",
defaultHyperParams: "",
version: ""
});
const dialogVisibles = ref(false);
@ -149,24 +138,12 @@ const modelVisible= ref(false);
function addClick() {
title.value = "新增训练任务";
info.value = {
name: "",
description: "",
version: "",
principle: "",
status:'',
algorithmType: "",
inputParams: "",
outputParams: "",
inferBaseUrl: "",
trainBaseUrl: "",
supportedDeviceTypes: "",
defaultHyperParams: "",
version: ""
};
input_cols.value = []
target_col.value = ""
fileFlow.value = null
input_cols.value = [] //
target_col.value = "" //
fileFlow.value = null //
trainParamsData.value = []
algorithmsTypeData.value = []
fileList.value = []
@ -213,16 +190,25 @@ function confirmClick(formEl: any) {
input_cols: input_cols.value,
target_col: target_col.value,
}
infoTemp.dataset_path = dataset_path.value
infoTemp.feature_map_config = JSON.stringify(feature_map_config)
data.append('task', JSON.stringify(feature_map_config))
data.append('task', JSON.stringify(infoTemp))
dialogVisibles.value = false
addAlgorithms(data).then((res: any) => {
dialogVisibles.value = false;
ElMessage({
message: "新增成功",
type: "success",
})
gettableData();
if(res.code == '0'){
ElMessage({
message: "新增成功",
type: "success",
})
gettableData();
}else{
ElMessage({
message: res.msg,
type: "error",
})
}
}).catch(() => {
dialogVisibles.value = false;
isSwitch.value = false;
@ -474,12 +460,14 @@ const objectSpanMethod = ({
}
}
const fileFlow:any = ref(null)
const dataset_path = ref('')
function handlePreview(file: any){
// loadingtext.value = ""
loading.value = true
fileFlow.value = file
input_cols.value = []
target_col.value = ""
target_col.value = ''
dataset_path.value = ''
}
const upload:any = ref(null)
@ -488,9 +476,11 @@ function handlesSuccess(file: any) {
columnsData.value = []
input_cols.value = []
target_col.value = ''
dataset_path.value = ''
loading.value = false
if(file !== false && file.code == '0'){
columnsData.value = file.data.columns
dataset_path.value = file.data.path
ElMessage({
message: "导入成功!",
type: "success",