修改训练bug
This commit is contained in:
parent
0c9e04ef8b
commit
26a8fb860e
@ -130,18 +130,7 @@ const input = ref("");
|
|||||||
//新建训练任务
|
//新建训练任务
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
const info: any = ref({
|
const info: any = ref({
|
||||||
name: "",
|
version: ""
|
||||||
description: "",
|
|
||||||
version: "",
|
|
||||||
principle: "",
|
|
||||||
status:1,
|
|
||||||
algorithmType: "",
|
|
||||||
inputParams: "",
|
|
||||||
outputParams: "",
|
|
||||||
inferBaseUrl: "",
|
|
||||||
trainBaseUrl: "",
|
|
||||||
supportedDeviceTypes: "",
|
|
||||||
defaultHyperParams: "",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const dialogVisibles = ref(false);
|
const dialogVisibles = ref(false);
|
||||||
@ -149,24 +138,12 @@ const modelVisible= ref(false);
|
|||||||
function addClick() {
|
function addClick() {
|
||||||
title.value = "新增训练任务";
|
title.value = "新增训练任务";
|
||||||
info.value = {
|
info.value = {
|
||||||
name: "",
|
version: ""
|
||||||
description: "",
|
|
||||||
version: "",
|
|
||||||
principle: "",
|
|
||||||
status:'',
|
|
||||||
algorithmType: "",
|
|
||||||
inputParams: "",
|
|
||||||
outputParams: "",
|
|
||||||
inferBaseUrl: "",
|
|
||||||
trainBaseUrl: "",
|
|
||||||
supportedDeviceTypes: "",
|
|
||||||
defaultHyperParams: "",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
input_cols.value = []
|
input_cols.value = [] // 特征列
|
||||||
target_col.value = ""
|
target_col.value = "" // 目标列
|
||||||
fileFlow.value = null
|
fileFlow.value = null // 数据集
|
||||||
|
|
||||||
trainParamsData.value = []
|
trainParamsData.value = []
|
||||||
algorithmsTypeData.value = []
|
algorithmsTypeData.value = []
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
@ -207,22 +184,31 @@ function confirmClick(formEl: any) {
|
|||||||
});
|
});
|
||||||
info.value.trainParams = JSON.stringify(template)
|
info.value.trainParams = JSON.stringify(template)
|
||||||
}
|
}
|
||||||
|
|
||||||
let infoTemp = JSON.parse(JSON.stringify(info.value))
|
let infoTemp = JSON.parse(JSON.stringify(info.value))
|
||||||
let feature_map_config = {
|
let feature_map_config = {
|
||||||
input_cols: input_cols.value,
|
input_cols: input_cols.value,
|
||||||
target_col: target_col.value,
|
target_col: target_col.value,
|
||||||
}
|
}
|
||||||
|
infoTemp.dataset_path = dataset_path.value
|
||||||
infoTemp.feature_map_config = JSON.stringify(feature_map_config)
|
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
|
dialogVisibles.value = false
|
||||||
addAlgorithms(data).then((res: any) => {
|
addAlgorithms(data).then((res: any) => {
|
||||||
dialogVisibles.value = false;
|
dialogVisibles.value = false;
|
||||||
ElMessage({
|
if(res.code == '0'){
|
||||||
message: "新增成功",
|
ElMessage({
|
||||||
type: "success",
|
message: "新增成功",
|
||||||
})
|
type: "success",
|
||||||
gettableData();
|
})
|
||||||
|
gettableData();
|
||||||
|
}else{
|
||||||
|
ElMessage({
|
||||||
|
message: res.msg,
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
dialogVisibles.value = false;
|
dialogVisibles.value = false;
|
||||||
isSwitch.value = false;
|
isSwitch.value = false;
|
||||||
@ -474,12 +460,14 @@ const objectSpanMethod = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const fileFlow:any = ref(null)
|
const fileFlow:any = ref(null)
|
||||||
|
const dataset_path = ref('')
|
||||||
function handlePreview(file: any){
|
function handlePreview(file: any){
|
||||||
// loadingtext.value = "正在导入数据,请耐心等待!"
|
// loadingtext.value = "正在导入数据,请耐心等待!"
|
||||||
loading.value = true
|
loading.value = true
|
||||||
fileFlow.value = file
|
fileFlow.value = file
|
||||||
input_cols.value = []
|
input_cols.value = []
|
||||||
target_col.value = ""
|
target_col.value = ''
|
||||||
|
dataset_path.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
const upload:any = ref(null)
|
const upload:any = ref(null)
|
||||||
@ -488,9 +476,11 @@ function handlesSuccess(file: any) {
|
|||||||
columnsData.value = []
|
columnsData.value = []
|
||||||
input_cols.value = []
|
input_cols.value = []
|
||||||
target_col.value = ''
|
target_col.value = ''
|
||||||
|
dataset_path.value = ''
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if(file !== false && file.code == '0'){
|
if(file !== false && file.code == '0'){
|
||||||
columnsData.value = file.data.columns
|
columnsData.value = file.data.columns
|
||||||
|
dataset_path.value = file.data.path
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: "导入成功!",
|
message: "导入成功!",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user