|
@@ -9,6 +9,7 @@ import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.mybatisflex.core.paginate.Page;
|
|
|
import com.mybatisflex.core.query.QueryWrapper;
|
|
|
+import com.taais.biz.constant.BizConstant;
|
|
|
import com.taais.biz.domain.AlgorithmConfigTrack;
|
|
|
import com.taais.biz.domain.vo.AlgorithmConfigTrackVo;
|
|
|
import com.taais.biz.mapper.AlgorithmConfigTrackMapper;
|
|
@@ -127,6 +128,14 @@ public class AlgorithmModelTrackServiceImpl extends BaseServiceImpl<AlgorithmMod
|
|
|
public PageResult<AlgorithmModelTrackVo> selectPage(AlgorithmModelTrackBo algorithmModelTrackBo) {
|
|
|
QueryWrapper queryWrapper = buildQueryWrapper(algorithmModelTrackBo);
|
|
|
Page<AlgorithmModelTrackVo> page = this.pageAs(PageQuery.build(), queryWrapper, AlgorithmModelTrackVo.class);
|
|
|
+ page.getRecords().forEach(model -> {
|
|
|
+ Long algorithmId = model.getAlgorithmId();
|
|
|
+
|
|
|
+ AlgorithmConfigTrackVo algorithmConfig = algorithmConfigTrackService.selectById(algorithmId);
|
|
|
+ model.setType(algorithmConfig.getType());
|
|
|
+ model.setSubsystem(algorithmConfig.getSubsystem());
|
|
|
+ });
|
|
|
+
|
|
|
return PageResult.build(page);
|
|
|
}
|
|
|
|
|
@@ -152,13 +161,21 @@ public class AlgorithmModelTrackServiceImpl extends BaseServiceImpl<AlgorithmMod
|
|
|
String filePath = inputOssEntity.getFileName();
|
|
|
String localPath = TaaisConfig.getProfile();
|
|
|
resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
|
|
|
+ algorithmModelTrack.setModelAddress(resourcePath);
|
|
|
} else {
|
|
|
- String localPath = TaaisConfig.getUploadPath();
|
|
|
- String path = DateUtils.datePath() + "/" + IdUtil.fastSimpleUUID();
|
|
|
- ;
|
|
|
- resourcePath = localPath + "/" + path + ".pt";
|
|
|
+ // String localPath = TaaisConfig.getUploadPath();
|
|
|
+ // String path = DateUtils.datePath() + "/" + IdUtil.fastSimpleUUID();
|
|
|
+ // resourcePath = localPath + "/" + path + ".pt";
|
|
|
+ // 本来这里是默认整一个虚拟模型地址,后面发现不合适便去掉了
|
|
|
}
|
|
|
- algorithmModelTrack.setModelAddress(resourcePath);
|
|
|
+ if (AlgorithmType.REASONING.equals(algorithmConfigTrackVo.getType()) || AlgorithmType.TEST.equals(algorithmConfigTrackVo.getType())) {
|
|
|
+ algorithmModelTrack.setModelStatus(BizConstant.ModelStatus.END);
|
|
|
+ } else if (AlgorithmType.TRAIN.equals(algorithmConfigTrackVo.getType())) {
|
|
|
+ algorithmModelTrack.setModelStatus(BizConstant.ModelStatus.NOT_START);
|
|
|
+ } else {
|
|
|
+ return CommonResult.fail("算法类型不正确");
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
algorithmModelTrack.setAlgorithmId(algorithmModelTrackBo.getAlgorithmId());
|
|
|
algorithmModelTrack.setAlgorithmType(algorithmConfigTrackVo.getAlgorithmName());
|