|
@@ -239,7 +239,7 @@ public class TargetIdentificationSubtaskServiceImpl extends BaseServiceImpl<Targ
|
|
|
log.info("train");
|
|
|
if (hasModelProperty) {
|
|
|
AlgorithmModelVo bo = algorithmModelService.selectById(Long.valueOf(_modelId));
|
|
|
- String path = bo.getModelAddress().replace("/profile", "/home/ObjectDetection_Web");
|
|
|
+ String path = bo.getModelAddress().replace("/profile", BizConstant.DOCKER_BASE_PATH);
|
|
|
algorithmRequestDto.getOtherParams().put("pretrained", true);
|
|
|
algorithmRequestDto.getOtherParams().put("pretrained_model", path);
|
|
|
}
|
|
@@ -266,19 +266,21 @@ public class TargetIdentificationSubtaskServiceImpl extends BaseServiceImpl<Targ
|
|
|
JSONObject jsonObject = JSON.parseObject(res);
|
|
|
if (jsonObject.getInteger("status") == 200) {
|
|
|
detail.setStatus(BizConstant.TASK_STATUS_SUCCEED);
|
|
|
+ detail.setRemarks("HTTP请求成功");
|
|
|
} else {
|
|
|
detail.setStatus(BizConstant.TASK_STATUS_FAILED);
|
|
|
detail.setEndTime(new Date());
|
|
|
detail.setCostSecond(detail.getEndTime().getTime() - detail.getStartTime().getTime());
|
|
|
+ detail.setRemarks("HTTP请求失败: " + (res.length() < 200 ? res : res.substring(0, 200)));
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error("http request error: {}", e.getMessage());
|
|
|
detail.setStatus(BizConstant.TASK_STATUS_FAILED);
|
|
|
+ detail.setRemarks("HTTP请求异常: " + (e.getMessage().length() < 200 ? e.getMessage() : e.getMessage().substring(0, 200)));
|
|
|
detail.setEndTime(new Date());
|
|
|
detail.setCostSecond(detail.getEndTime().getTime() - detail.getStartTime().getTime());
|
|
|
} finally {
|
|
|
- detail.setRemarks("REMARKS");
|
|
|
detailsService.update(detail);
|
|
|
}
|
|
|
}
|