운영환경일때 ai팀경로수정
This commit is contained in:
@@ -5,8 +5,10 @@ import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/** AI API 추론 실행 DTO */
|
||||
@Slf4j
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@@ -30,6 +32,7 @@ public class InferenceSendDto {
|
||||
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);
|
||||
@@ -37,6 +40,9 @@ public class InferenceSendDto {
|
||||
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
|
||||
|
||||
@@ -452,6 +452,7 @@ public class InferenceResultService {
|
||||
log.warn("not InferenceSendDto dto");
|
||||
throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
dto.changeValForProd();
|
||||
|
||||
// 1) 요청 로그
|
||||
try {
|
||||
@@ -551,13 +552,6 @@ public class InferenceResultService {
|
||||
sendDto.setCls_model_version(modelInfo.getModelVer());
|
||||
sendDto.setCd_model_type(modelType);
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -218,12 +218,6 @@ public class InferenceRunService {
|
||||
sendDto.setCls_model_version(modelInfo.getModelVer());
|
||||
sendDto.setCd_model_type(modelType);
|
||||
sendDto.setPriority(5.0);
|
||||
// 운영환경일때 경로수정 dean 260226
|
||||
if (profile != null && profile.equals("prod")) {
|
||||
log.info("profile = {} change inforence req", profile);
|
||||
sendDto.changeValForProd();
|
||||
}
|
||||
|
||||
return sendDto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ public class MapSheetInferenceJobService {
|
||||
predRequestsAreas.setInput2_scene_path(
|
||||
progressDto.getPred_requests_areas().getInput2_scene_path());
|
||||
|
||||
InferenceSendDto m = new InferenceSendDto();
|
||||
InferenceSendDto m = new InferenceSendDto();
|
||||
m.setPred_requests_areas(predRequestsAreas);
|
||||
m.setModel_version(progressDto.getModelVersion());
|
||||
m.setCd_model_path(
|
||||
@@ -355,12 +355,7 @@ public class MapSheetInferenceJobService {
|
||||
m.setCls_model_version(progressDto.getClsModelVersion());
|
||||
m.setCd_model_type(type);
|
||||
m.setPriority(5d);
|
||||
// 운영환경일때 경로수정 dean 260226
|
||||
if (profile != null && profile.equals("prod")) {
|
||||
log.info("profile = {} [M]change inforence req", profile);
|
||||
m.changeValForProd();
|
||||
}
|
||||
log.info("[Inference]SendDto={}", m);
|
||||
log.info("[BEFORE INFERENCE] BEFORE SendDto={}", m);
|
||||
// 추론 실행 api 호출
|
||||
Long batchId = ensureAccepted(m);
|
||||
|
||||
@@ -385,9 +380,20 @@ public class MapSheetInferenceJobService {
|
||||
log.warn("not InferenceSendDto dto");
|
||||
throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
// 운영환경일때 경로수정 dean 260226
|
||||
if (profile != null && profile.equals("prod")) {
|
||||
log.info("========================================================");
|
||||
log.info("[CHANGE INFERENCE] profile = {} Inforence req", profile);
|
||||
log.info("========================================================");
|
||||
log.info("");
|
||||
dto.changeValForProd();
|
||||
}
|
||||
|
||||
// 1) 요청 로그
|
||||
log.info("Inference request dto={}", dto);
|
||||
log.info("========================================================");
|
||||
log.info("========================================================");
|
||||
log.info("[SEND INFERENCE] Inference request dto={}", dto);
|
||||
log.info("========================================================");
|
||||
|
||||
// 2) local 환경 임시 처리
|
||||
if ("local".equals(profile)) {
|
||||
|
||||
Reference in New Issue
Block a user