修改模型训练
This commit is contained in:
parent
dec253c4e1
commit
9ed22058b6
@ -48,3 +48,14 @@ export function deleteBatchAlgorithms (queryParams:any){
|
||||
data: queryParams
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function algorithmsType(type:any){
|
||||
return request({
|
||||
url: '/algorithms/type/'+type ,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import { onMounted, ref, nextTick,reactive } from "vue";
|
||||
import { ElForm, ElMessage, ElMessageBox,FormRules } from "element-plus";
|
||||
import { addAlgorithms,deleteAlgorithms,trainAlgorithmsPage,trainPublish} from "@/api/algorithml";
|
||||
|
||||
import { searchAlgorithmsPage } from "@/api/business/algorithm";
|
||||
import { searchAlgorithmsPage,algorithmsType } from "@/api/business/algorithm";
|
||||
import { getDictItemById } from '@/api/dict';
|
||||
import Page from '@/components/Pagination/page.vue'
|
||||
const apiUrl = import.meta.env.VITE_APP_BASE_API; // 基础路径
|
||||
@ -75,6 +75,21 @@ function getAlgorithmList() { // 获取算法列表
|
||||
});
|
||||
}
|
||||
|
||||
function selectAlgorithmType(type:any) { // 选择算法类型
|
||||
debugger
|
||||
getAlgorithmType(type)
|
||||
}
|
||||
const algorithmsTypeData:any =ref([])
|
||||
function getAlgorithmType(type:any) { // 获取算法类型
|
||||
algorithmsTypeData.value = []
|
||||
algorithmsType(type).then((result:any) => {
|
||||
if(result !=null && result.defaultHyperParams !=null){
|
||||
algorithmsTypeData.value = JSON.parse(result.defaultHyperParams);
|
||||
}
|
||||
|
||||
}).catch((err:any) => {
|
||||
});
|
||||
}
|
||||
const menuData:any = ref([]);
|
||||
// 查询字典项
|
||||
function menuInit() { // 获取算法类型字典项
|
||||
@ -141,6 +156,7 @@ function addClick() {
|
||||
defaultHyperParams: "",
|
||||
};
|
||||
trainParamsData.value = []
|
||||
algorithmsTypeData.value = []
|
||||
fileList.value = []
|
||||
isSwitch.value = false;
|
||||
dialogVisibles.value = true;
|
||||
@ -163,13 +179,12 @@ function confirmClick(formEl: any) {
|
||||
|
||||
const data = new FormData()
|
||||
|
||||
if(trainParamsData.value.length != 0){
|
||||
if(algorithmsTypeData.value.length != 0){
|
||||
let template:any = {}
|
||||
trainParamsData.value.forEach((element:any) => {
|
||||
template[element.key] = element.value
|
||||
algorithmsTypeData.value.forEach((element:any) => {
|
||||
template[element.key] = element.default
|
||||
});
|
||||
info.value.trainParams = JSON.stringify(template)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -444,7 +459,7 @@ function confirmsClick(){
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="算法类型" prop="algorithmType" style="width: 100%;" >
|
||||
<el-select v-model="info.algorithmType" placeholder="请选择算法类型">
|
||||
<el-select v-model="info.algorithmType" placeholder="请选择算法类型" @change="selectAlgorithmType">
|
||||
<el-option v-for="item in algorithmData" :key="item.algorithmType" :label="item.name" :value="item.algorithmType" ></el-option>
|
||||
</el-select v-model="info.algorithmType">
|
||||
</el-form-item>
|
||||
@ -456,14 +471,34 @@ function confirmsClick(){
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数配置" style="width: 100%;" >
|
||||
<div >
|
||||
<el-table v-loading="loading" :data="algorithmsTypeData" style="width: 100%;" border
|
||||
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }">
|
||||
<el-table-column prop="name" label="参数名称" width="180" ></el-table-column>
|
||||
<el-table-column prop="key" label="参数标识" width="160" ></el-table-column>
|
||||
<el-table-column prop="description" label="参数说明" min-width="160" ></el-table-column>
|
||||
<el-table-column prop="status" label="默认值" width="120">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.default" style="width: 100%" placeholder="输入默认值"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="range" label="建议范围" width="140">
|
||||
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<!-- <div >
|
||||
<el-button type="primary" @click="addTrainParams" style="margin-bottom: 10px;">添加</el-button>
|
||||
<div style="display: flex;margin-bottom: 10px;" v-for="(item,index) in trainParamsData" :key="index">
|
||||
<el-input v-model="item.key" style="width: 300px;margin-left: 10px;" placeholder=""></el-input>
|
||||
<el-input v-model="item.value" style="width: 300px;margin: 0px 10px;" placeholder=""></el-input>
|
||||
<el-button type="primary" @click="dellTrainParams(index)" text="删除">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="特征映射快照" style="width: 100%;" >
|
||||
<el-input type="textarea" v-model="info.featureMapSnapshot" style="width: 100%" placeholder="输入特征映射快照"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
@ -507,12 +542,15 @@ function confirmsClick(){
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="特征映射快照" style="width: 100%;" >
|
||||
<el-input type="textarea" v-model="info.featureMapSnapshot" style="width: 100%" placeholder="输入特征映射快照" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" style="width: 100%;" >
|
||||
<el-input v-model="info.createdAt" style="width: 100%" :disabled="true" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" style="width: 100%;" >
|
||||
<!-- <el-form-item label="更新时间" style="width: 100%;" >
|
||||
<el-input v-model="info.updatedAt" style="width: 100%" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
|
||||
</el-form>
|
||||
<div v-else style="width: 100%; height: calc(100% - 50px);">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user