|
|
|
@@ -23,6 +23,7 @@ import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
import org.springframework.core.io.InputStreamResource; |
|
|
|
import org.springframework.data.domain.Page; |
|
|
|
import org.springframework.data.domain.PageImpl; |
|
|
|
@@ -78,6 +79,11 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
|
|
|
|
@Resource |
|
|
|
private AssetIconService assetIconService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
@Lazy |
|
|
|
private AimService aimsService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private NewHttpUtils httpUtils; |
|
|
|
@Resource |
|
|
|
@@ -711,7 +717,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
if (modelsVo.getModelVersionVos() != null && modelsVo.getModelVersionVos().size() != 0) { |
|
|
|
String sourcePath = modelsVo.getModelVersionVos().get(0).getUrl(); |
|
|
|
|
|
|
|
if (Constant.Source_Export.equals(modelsVo.getModelSource())) { |
|
|
|
if (Constant.Source_Hand_Export.equals(modelsVo.getModelSource())) { |
|
|
|
String bucketName = sourcePath.split("/")[0]; |
|
|
|
String root_path = sourcePath.split("/")[1]; |
|
|
|
minioUtil.downloadFiles(bucketName, root_path, modelPath); |
|
|
|
@@ -724,6 +730,8 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
ModelDependency1 buildingModel = modelDependency1Dao.getBuildingModel(modelsVo.getId(), modelsVo.getIdentifier(), modelsVo.getVersion()); |
|
|
|
if (buildingModel != null) { |
|
|
|
modelMetaVo = JSON.parseObject(buildingModel.getMeta(), ModelMetaVo.class); |
|
|
|
//获取指标 |
|
|
|
getMetrics(modelMetaVo); |
|
|
|
} |
|
|
|
|
|
|
|
//拼接生产的元数据后写入yaml文件 |
|
|
|
@@ -1124,4 +1132,11 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
userInfo.put("token", token); |
|
|
|
return userInfo; |
|
|
|
} |
|
|
|
|
|
|
|
void getMetrics(ModelMetaVo modelMetaVo) throws Exception { |
|
|
|
List<InsMetricInfoVo> expTrainInfos = aimsService.getExpTrainInfos(modelMetaVo.getTrainTask().getExperimentId()); |
|
|
|
for (InsMetricInfoVo expTrainInfo : expTrainInfos) { |
|
|
|
System.out.println(expTrainInfo.getMetrics()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |