Merge branch 'develop' of https://kamco.git.gs.dabeeo.com/MVPTeam/kamco-cd-api into feat/infer_dev_260211
# Conflicts: # src/main/java/com/kamco/cd/kamcoback/gukyuin/service/GukYuinApiService.java
This commit is contained in:
@@ -16,9 +16,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@ToString
|
||||
public class InferenceSendDto {
|
||||
|
||||
private static final String DEV_PATH_PREFIX = "kamco-nfs";
|
||||
private static final String PROD_PATH_PREFIX = "data";
|
||||
|
||||
private pred_requests_areas pred_requests_areas;
|
||||
private String model_version;
|
||||
private String cd_model_path;
|
||||
@@ -28,23 +25,6 @@ public class InferenceSendDto {
|
||||
private String cd_model_type;
|
||||
private Double priority;
|
||||
|
||||
// 프로덕션은 경로가 바뀜
|
||||
public void changeValForProd() {
|
||||
if (pred_requests_areas != null) {
|
||||
pred_requests_areas.changeValForProd();
|
||||
log.info("[CHANGE]pred_requests_areas={}", pred_requests_areas);
|
||||
}
|
||||
if (this.cd_model_path != null) {
|
||||
this.cd_model_path = this.cd_model_path.replace(DEV_PATH_PREFIX, PROD_PATH_PREFIX);
|
||||
}
|
||||
if (this.cls_model_path != null) {
|
||||
this.cls_model_path = this.cls_model_path.replace(DEV_PATH_PREFIX, PROD_PATH_PREFIX);
|
||||
}
|
||||
if (this.cd_model_config != null) {
|
||||
this.cd_model_config = this.cd_model_config.replace(DEV_PATH_PREFIX, PROD_PATH_PREFIX);
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@@ -56,19 +36,5 @@ public class InferenceSendDto {
|
||||
private Integer input2_year;
|
||||
private String input1_scene_path;
|
||||
private String input2_scene_path;
|
||||
|
||||
public void changeValForProd() {
|
||||
// ai팀에서 kamco-nfs를 data로 세팅했음
|
||||
if (this.input1_scene_path != null) {
|
||||
this.input1_scene_path =
|
||||
this.input1_scene_path.replace(
|
||||
InferenceSendDto.DEV_PATH_PREFIX, InferenceSendDto.PROD_PATH_PREFIX);
|
||||
}
|
||||
if (this.input2_scene_path != null) {
|
||||
this.input2_scene_path =
|
||||
this.input2_scene_path.replace(
|
||||
InferenceSendDto.DEV_PATH_PREFIX, InferenceSendDto.PROD_PATH_PREFIX);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -605,7 +605,6 @@ public class InferenceResultService {
|
||||
log.info("[CHANGE INFERENCE] profile = {} Inforence req", profile);
|
||||
log.info("========================================================");
|
||||
log.info("");
|
||||
dto.changeValForProd();
|
||||
}
|
||||
|
||||
// 1) 요청 로그
|
||||
@@ -616,13 +615,15 @@ public class InferenceResultService {
|
||||
}
|
||||
|
||||
// 2) local 환경 임시 처리
|
||||
if ("local".equals(profile)) {
|
||||
if (dto.getPred_requests_areas() == null) {
|
||||
throw new IllegalStateException("pred_requests_areas is null");
|
||||
}
|
||||
dto.getPred_requests_areas().setInput1_scene_path("/kamco-nfs/requests/2023_local.geojson");
|
||||
dto.getPred_requests_areas().setInput2_scene_path("/kamco-nfs/requests/2024_local.geojson");
|
||||
}
|
||||
// if ("local".equals(profile)) {
|
||||
// if (dto.getPred_requests_areas() == null) {
|
||||
// throw new IllegalStateException("pred_requests_areas is null");
|
||||
// }
|
||||
//
|
||||
// dto.getPred_requests_areas().setInput1_scene_path("/kamco-nfs/requests/2023_local.geojson");
|
||||
//
|
||||
// dto.getPred_requests_areas().setInput2_scene_path("/kamco-nfs/requests/2024_local.geojson");
|
||||
// }
|
||||
|
||||
// 3) HTTP 호출
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
|
||||
Reference in New Issue
Block a user