修改训练bug
This commit is contained in:
parent
0c9e04ef8b
commit
26a8fb860e
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user