|
|
|
@@ -423,7 +423,7 @@ the License. * ============================================================= */ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { isNil, isObjectLike } from 'lodash'; |
|
|
|
|
|
|
|
import { dictByName } from '@/api/dict.js'; |
|
|
|
import { |
|
|
|
validateNameWithHyphen, |
|
|
|
getQueueMessage, |
|
|
|
@@ -523,7 +523,6 @@ export default { |
|
|
|
delayCreateDelete: false, |
|
|
|
selectedAlgorithm: null, |
|
|
|
trainConfig, |
|
|
|
|
|
|
|
useModel: false, // 本地判断是否使用模型 |
|
|
|
teacherModelIds: [], |
|
|
|
studentModelIds: [], |
|
|
|
@@ -1065,11 +1064,29 @@ export default { |
|
|
|
this.form.valDataSourcePath = result.dataSourcePath; |
|
|
|
this.form.valAlgorithmUsage = result.algorithmUsage; |
|
|
|
}, |
|
|
|
getDic(val) { |
|
|
|
// 过滤数据集 1.重置list 2.清空绑定的value |
|
|
|
dictByName('dataset_type', { |
|
|
|
filter: `algorithmUsage:${val}`, |
|
|
|
}).then((res) => { |
|
|
|
if (res) { |
|
|
|
this.$refs.trainDataSourceSelector.initList(res.dictDetails); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
async onAlgorithmChange(id) { |
|
|
|
// 选用算法变更时,需要对自动填充的表单项进行验证 |
|
|
|
this.validateField('algorithmId'); |
|
|
|
let label; |
|
|
|
// 选用算法变更时,需要同步算法的模型类别、运行项目、运行镜像、运行命令、运行参数 |
|
|
|
const algorithm = this.algorithmIdList.find((i) => i.id === id); |
|
|
|
const algorithm = this.algorithmIdList.find((i) => { |
|
|
|
if (i.id === id) { |
|
|
|
label = i.algorithmUsage; |
|
|
|
} |
|
|
|
return i.id === id; |
|
|
|
}); |
|
|
|
// 关联数据集 过滤查询 |
|
|
|
this.getDic(label); |
|
|
|
this.selectedAlgorithm = algorithm; |
|
|
|
// this.form.algorithmUsage = algorithm?.algorithmUsage || null; // 同步算法用途 |
|
|
|
// this.form.valAlgorithmUsage = algorithm?.algorithmUsage || null; // 同步算法用途到验证数据集 |
|
|
|
|