| @@ -1136,6 +1136,7 @@ public class ModelsServiceImpl implements ModelsService { | |||||
| } | } | ||||
| void getMetrics(ModelMetaVo modelMetaVo) throws Exception { | void getMetrics(ModelMetaVo modelMetaVo) throws Exception { | ||||
| HashMap<String, Object> result = new HashMap<>(); | |||||
| HashMap<String, Object> metrics = modelMetaVo.getMetrics(); | HashMap<String, Object> metrics = modelMetaVo.getMetrics(); | ||||
| JSONArray trainMetrics = (JSONArray) metrics.get("train"); | JSONArray trainMetrics = (JSONArray) metrics.get("train"); | ||||
| for (int i = 0; i < trainMetrics.size(); i++) { | for (int i = 0; i < trainMetrics.size(); i++) { | ||||
| @@ -1143,13 +1144,17 @@ public class ModelsServiceImpl implements ModelsService { | |||||
| String runId = jsonObject.getString("run_id"); | String runId = jsonObject.getString("run_id"); | ||||
| List<InsMetricInfoVo> expTrainInfos = aimsService.getExpTrainInfos(modelMetaVo.getTrainTask().getExperimentId(), runId); | List<InsMetricInfoVo> expTrainInfos = aimsService.getExpTrainInfos(modelMetaVo.getTrainTask().getExperimentId(), runId); | ||||
| System.out.print(expTrainInfos); | System.out.print(expTrainInfos); | ||||
| for (InsMetricInfoVo expTrainInfo :expTrainInfos) { | |||||
| Map metrics1 = expTrainInfo.getMetrics(); | |||||
| } | |||||
| } | } | ||||
| JSONArray testMetrics = (JSONArray) metrics.get("test"); | |||||
| JSONArray testMetrics = (JSONArray) metrics.get("evaluate"); | |||||
| for (int i = 0; i < testMetrics.size(); i++) { | for (int i = 0; i < testMetrics.size(); i++) { | ||||
| JSONObject jsonObject = testMetrics.getJSONObject(i); | JSONObject jsonObject = testMetrics.getJSONObject(i); | ||||
| String runId = jsonObject.getString("run_id"); | String runId = jsonObject.getString("run_id"); | ||||
| List<InsMetricInfoVo> expTestInfos = aimsService.getExpEvaluateInfos(modelMetaVo.getTrainTask().getExperimentId(), runId); | List<InsMetricInfoVo> expTestInfos = aimsService.getExpEvaluateInfos(modelMetaVo.getTrainTask().getExperimentId(), runId); | ||||
| System.out.print(expTestInfos); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||