운영환경일때 ai팀경로수정

This commit is contained in:
2026-02-26 08:33:53 +09:00
parent 48b46035fd
commit 8ac0a00311
3 changed files with 40 additions and 15 deletions

View File

@@ -14,6 +14,9 @@ import lombok.ToString;
@ToString @ToString
public class InferenceSendDto { 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 pred_requests_areas pred_requests_areas;
private String model_version; private String model_version;
private String cd_model_path; private String cd_model_path;
@@ -23,12 +26,17 @@ public class InferenceSendDto {
private String cd_model_type; private String cd_model_type;
private Double priority; private Double priority;
public String getCd_model_path() { // 프로덕션은 경로가 바뀜
return cd_model_path==null?null:cd_model_path.replace("kamcd-nfs", "data"); public void changeValForProd() {
} if (pred_requests_areas != null) {
pred_requests_areas.changeValForProd();
public String getCls_model_path() { }
return cls_model_path==null?null:cls_model_path.replace("kamcd-nfs", "data"); 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);
}
} }
@Getter @Getter
@@ -43,13 +51,18 @@ public class InferenceSendDto {
private String input1_scene_path; private String input1_scene_path;
private String input2_scene_path; private String input2_scene_path;
public String getInput1_scene_path() { public void changeValForProd() {
// ai팀에서 kamco-nfs를 data로 세팅했음
return input1_scene_path==null?null:input1_scene_path.replace("kamcd-nfs", "data"); if (this.input1_scene_path != null) {
} this.input1_scene_path =
this.input1_scene_path.replace(
public String getInput2_scene_path() { InferenceSendDto.DEV_PATH_PREFIX, InferenceSendDto.PROD_PATH_PREFIX);
return input2_scene_path==null?null:input2_scene_path.replace("kamcd-nfs", "data"); }
if (this.input2_scene_path != null) {
this.input2_scene_path =
this.input2_scene_path.replace(
InferenceSendDto.DEV_PATH_PREFIX, InferenceSendDto.PROD_PATH_PREFIX);
}
} }
} }
} }

View File

@@ -551,6 +551,14 @@ public class InferenceResultService {
sendDto.setCls_model_version(modelInfo.getModelVer()); sendDto.setCls_model_version(modelInfo.getModelVer());
sendDto.setCd_model_type(modelType); sendDto.setCd_model_type(modelType);
sendDto.setPriority(5d); sendDto.setPriority(5d);
//운영환경일때 경로수정 dean 260226
if (profile != null && profile.equals("prod")) {
log.info("profile = {} change inforence req", profile);
sendDto.changeValForProd();
}
log.info("[Inference Send]SendDto={}", sendDto);
return sendDto; return sendDto;
} }

View File

@@ -355,8 +355,12 @@ public class MapSheetInferenceJobService {
m.setCls_model_version(progressDto.getClsModelVersion()); m.setCls_model_version(progressDto.getClsModelVersion());
m.setCd_model_type(type); m.setCd_model_type(type);
m.setPriority(5d); m.setPriority(5d);
//운영환경일때 경로수정 dean 260226
// log.info("InferenceSendDto={}", m); if (profile != null && profile.equals("prod")) {
log.info("profile = {} [M]change inforence req", profile);
m.changeValForProd();
}
log.info("[Inference]SendDto={}", m);
// 추론 실행 api 호출 // 추론 실행 api 호출
Long batchId = ensureAccepted(m); Long batchId = ensureAccepted(m);