모델 M1,M2,M3를 G1,G2,G3 으로 변경(추론실행 포함) #79

Merged
gina merged 1 commits from feat/infer_dev_260211 into develop 2026-02-19 16:08:33 +09:00
9 changed files with 73 additions and 72 deletions

View File

@@ -195,7 +195,7 @@ public class InferenceResultApiController {
LocalDate endDttm,
@Parameter(description = "키워드 (모델버전)", example = "M1.H1.E28") @RequestParam(required = false)
String searchVal,
@Parameter(description = "타입", example = "M1") @RequestParam(required = false)
@Parameter(description = "타입", example = "G1") @RequestParam(required = false)
String modelType,
@RequestParam(defaultValue = "0") int page,
@RequestParam(defaultValue = "20") int size) {

View File

@@ -246,15 +246,15 @@ public class InferenceResultDto {
@NotBlank
private String title;
@Schema(description = "M1", example = "b40e0f68-c1d8-49fc-93f9-a36270093861")
@Schema(description = "G1", example = "b40e0f68-c1d8-49fc-93f9-a36270093861")
@NotNull
private UUID model1Uuid;
@Schema(description = "M2", example = "ec92b7d2-b5a3-4915-9bdf-35fb3ca8ad27")
@Schema(description = "G2", example = "ec92b7d2-b5a3-4915-9bdf-35fb3ca8ad27")
@NotNull
private UUID model2Uuid;
@Schema(description = "M3", example = "37f45782-8ccf-4cf6-911c-a055a1510d39")
@Schema(description = "G3", example = "37f45782-8ccf-4cf6-911c-a055a1510d39")
@NotNull
private UUID model3Uuid;
@@ -297,6 +297,30 @@ public class InferenceResultDto {
@Schema(name = "InferenceStatusDetailDto", description = "추론(변화탐지) 진행상태")
public static class InferenceStatusDetailDto {
@Schema(description = "모델1 사용시간 시작일시")
@JsonFormatDttm
ZonedDateTime m1ModelStartDttm;
@Schema(description = "모델2 사용시간 시작일시")
@JsonFormatDttm
ZonedDateTime m2ModelStartDttm;
@Schema(description = "모델3 사용시간 시작일시")
@JsonFormatDttm
ZonedDateTime m3ModelStartDttm;
@Schema(description = "모델1 사용시간 종료일시")
@JsonFormatDttm
ZonedDateTime m1ModelEndDttm;
@Schema(description = "모델2 사용시간 종료일시")
@JsonFormatDttm
ZonedDateTime m2ModelEndDttm;
@Schema(description = "모델3 사용시간 종료일시")
@JsonFormatDttm
ZonedDateTime m3ModelEndDttm;
@Schema(description = "탐지대상 도엽수")
private Long detectingCnt;
@@ -336,30 +360,6 @@ public class InferenceResultDto {
@Schema(description = "모델3 분석 실패")
private Integer m3FailedJobs;
@Schema(description = "모델1 사용시간 시작일시")
@JsonFormatDttm
ZonedDateTime m1ModelStartDttm;
@Schema(description = "모델2 사용시간 시작일시")
@JsonFormatDttm
ZonedDateTime m2ModelStartDttm;
@Schema(description = "모델3 사용시간 시작일시")
@JsonFormatDttm
ZonedDateTime m3ModelStartDttm;
@Schema(description = "모델1 사용시간 종료일시")
@JsonFormatDttm
ZonedDateTime m1ModelEndDttm;
@Schema(description = "모델2 사용시간 종료일시")
@JsonFormatDttm
ZonedDateTime m2ModelEndDttm;
@Schema(description = "모델3 사용시간 종료일시")
@JsonFormatDttm
ZonedDateTime m3ModelEndDttm;
@Schema(description = "변화탐지 제목")
private String title;
@@ -496,19 +496,19 @@ public class InferenceResultDto {
return MapSheetScope.getDescByCode(this.mapSheetScope);
}
@Schema(description = "M1 사용시간")
@Schema(description = "G1 사용시간")
@JsonProperty("m1ElapsedTim")
public String getM1ElapsedTime() {
return formatElapsedTime(this.m1ModelStartDttm, this.m1ModelEndDttm);
}
@Schema(description = "M2 사용시간")
@Schema(description = "G2 사용시간")
@JsonProperty("m2ElapsedTim")
public String getM2ElapsedTime() {
return formatElapsedTime(this.m2ModelStartDttm, this.m2ModelEndDttm);
}
@Schema(description = "M3 사용시간")
@Schema(description = "G3 사용시간")
@JsonProperty("m3ElapsedTim")
public String getM3ElapsedTime() {
return formatElapsedTime(this.m3ModelStartDttm, this.m3ModelEndDttm);

View File

@@ -248,7 +248,7 @@ public class InferenceResultService {
saveInferenceAiDto.setUuid(uuid);
saveInferenceAiDto.setBatchId(batchId);
saveInferenceAiDto.setStatus(Status.IN_PROGRESS.getId());
saveInferenceAiDto.setType("M1");
saveInferenceAiDto.setType("G1");
saveInferenceAiDto.setInferStartDttm(ZonedDateTime.now());
saveInferenceAiDto.setModelComparePath(modelComparePath.getFilePath());
saveInferenceAiDto.setModelTargetPath(modelTargetPath.getFilePath());
@@ -414,9 +414,9 @@ public class InferenceResultService {
String modelType = "";
if (modelInfo.getModelType().equals(ModelType.M1.getId())) {
if (modelInfo.getModelType().equals(ModelType.G1.getId())) {
modelType = "G1";
} else if (modelInfo.getModelType().equals(ModelType.M2.getId())) {
} else if (modelInfo.getModelType().equals(ModelType.G2.getId())) {
modelType = "G2";
} else {
modelType = "G3";

View File

@@ -21,9 +21,9 @@ public class ModelMngDto {
@Getter
@AllArgsConstructor
public enum ModelType implements EnumType {
M1("M1"),
M2("M2"),
M3("M3");
G1("G1"),
G2("G2"),
G3("G3");
private final String desc;

View File

@@ -110,7 +110,7 @@ public class InferenceResultCoreService {
MapSheetLearnEntity mapSheetLearnEntity = new MapSheetLearnEntity();
mapSheetLearnEntity.setTitle(req.getTitle());
mapSheetLearnEntity.setRunningModelType("M1");
mapSheetLearnEntity.setRunningModelType("G1");
mapSheetLearnEntity.setM1ModelUuid(req.getModel1Uuid());
mapSheetLearnEntity.setM2ModelUuid(req.getModel2Uuid());
mapSheetLearnEntity.setM3ModelUuid(req.getModel3Uuid());
@@ -301,7 +301,7 @@ public class InferenceResultCoreService {
private void applyModelUpdate(MapSheetLearnEntity entity, SaveInferenceAiDto request) {
switch (request.getType()) {
case "M1" ->
case "G1" ->
applyModelFields(
request,
entity::setM1ModelBatchId,
@@ -311,7 +311,7 @@ public class InferenceResultCoreService {
entity::setM1RunningJobs,
entity::setM1CompletedJobs,
entity::setM1FailedJobs);
case "M2" ->
case "G2" ->
applyModelFields(
request,
entity::setM2ModelBatchId,
@@ -321,7 +321,7 @@ public class InferenceResultCoreService {
entity::setM2RunningJobs,
entity::setM2CompletedJobs,
entity::setM2FailedJobs);
case "M3" ->
case "G3" ->
applyModelFields(
request,
entity::setM3ModelBatchId,

View File

@@ -35,17 +35,17 @@ public class MapSheetLearn5kRepositoryImpl implements MapSheetLearn5kRepositoryC
final StringPath errorMsgPath;
switch (type) {
case "M1" -> {
case "G1" -> {
failPath = mapSheetLearn5kEntity.isM1Fail;
jobIdPath = mapSheetLearn5kEntity.m1JobId;
errorMsgPath = mapSheetLearn5kEntity.m1ErrorMessage;
}
case "M2" -> {
case "G2" -> {
failPath = mapSheetLearn5kEntity.isM2Fail;
jobIdPath = mapSheetLearn5kEntity.m2JobId;
errorMsgPath = mapSheetLearn5kEntity.m2ErrorMessage;
}
case "M3" -> {
case "G3" -> {
failPath = mapSheetLearn5kEntity.isM3Fail;
jobIdPath = mapSheetLearn5kEntity.m3JobId;
errorMsgPath = mapSheetLearn5kEntity.m3ErrorMessage;
@@ -85,15 +85,15 @@ public class MapSheetLearn5kRepositoryImpl implements MapSheetLearn5kRepositoryC
final StringPath errorMsgPath;
switch (type) {
case "M1" -> {
case "G1" -> {
failPath = mapSheetLearn5kEntity.isM1Fail;
jobIdPath = mapSheetLearn5kEntity.m1JobId;
}
case "M2" -> {
case "G2" -> {
failPath = mapSheetLearn5kEntity.isM2Fail;
jobIdPath = mapSheetLearn5kEntity.m2JobId;
}
case "M3" -> {
case "G3" -> {
failPath = mapSheetLearn5kEntity.isM3Fail;
jobIdPath = mapSheetLearn5kEntity.m3JobId;
}
@@ -135,15 +135,15 @@ public class MapSheetLearn5kRepositoryImpl implements MapSheetLearn5kRepositoryC
BooleanPath failPath;
switch (type) {
case "M1" -> {
case "G1" -> {
jobIdPath = mapSheetLearn5kEntity.m1JobId;
failPath = mapSheetLearn5kEntity.isM1Fail;
}
case "M2" -> {
case "G2" -> {
jobIdPath = mapSheetLearn5kEntity.m2JobId;
failPath = mapSheetLearn5kEntity.isM2Fail;
}
case "M3" -> {
case "G3" -> {
jobIdPath = mapSheetLearn5kEntity.m3JobId;
failPath = mapSheetLearn5kEntity.isM3Fail;
}
@@ -180,13 +180,13 @@ public class MapSheetLearn5kRepositoryImpl implements MapSheetLearn5kRepositoryC
BooleanPath failPath;
switch (type) {
case "M1" -> {
case "G1" -> {
jobIdPath = mapSheetLearn5kEntity.m1JobId;
}
case "M2" -> {
case "G2" -> {
jobIdPath = mapSheetLearn5kEntity.m2JobId;
}
case "M3" -> {
case "G3" -> {
jobIdPath = mapSheetLearn5kEntity.m3JobId;
}
default -> {

View File

@@ -7,6 +7,7 @@ import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapShe
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.InspectState;
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelMngState;
import com.kamco.cd.kamcoback.model.dto.ModelMngDto.ModelType;
import com.kamco.cd.kamcoback.postgres.entity.LabelingAssignmentEntity;
import com.kamco.cd.kamcoback.scheduler.dto.TrainingDataReviewJobDto.AnalCntInfo;
import com.kamco.cd.kamcoback.scheduler.dto.TrainingDataReviewJobDto.AnalMapSheetList;
@@ -58,10 +59,10 @@ public class TrainingDataReviewJobRepositoryImpl extends QuerydslRepositorySuppo
Properties.class,
new CaseBuilder()
.when(mapSheetLearnDataGeomEntity.classAfterCd.in("building", "container"))
.then("M1")
.then(ModelType.G1.getId())
.when(mapSheetLearnDataGeomEntity.classAfterCd.eq("waste"))
.then("M2")
.otherwise("M3"),
.then(ModelType.G2.getId())
.otherwise(ModelType.G3.getId()),
mapSheetLearnDataGeomEntity.classBeforeCd,
mapSheetLearnDataGeomEntity.classAfterCd)))
.from(labelingAssignmentEntity)

View File

@@ -60,10 +60,10 @@ select msldge1_0.geo_uid,
st_asgeojson(msldge1_0.geom),
case
when (msldge1_0.class_after_cd in ('building', 'container'))
then cast('M1' as varchar)
then cast('G1' as varchar)
when (msldge1_0.class_after_cd = 'waste')
then cast('M2' as varchar)
else 'M3'
then cast('G2' as varchar)
else 'G3'
end,
msldge1_0.class_before_cd,
msldge1_0.class_after_cd

View File

@@ -122,7 +122,7 @@ public class MapSheetInferenceJobService {
* @return
*/
private Long resolveBatchId(InferenceBatchSheet sheet) {
// M3 > M2 > M1
// G3 > G2 > G1
if (sheet.getM3BatchId() != null) {
return sheet.getM3BatchId();
}
@@ -216,12 +216,12 @@ public class MapSheetInferenceJobService {
updateProcessingEndTimeByModel(job, sheet.getUuid(), now, currentType);
// M3이면 전체 종료
if ("M3".equals(currentType)) {
if ("G3".equals(currentType)) {
endAll(sheet, now);
return;
}
// 다음 모델 실행 (M1->M2, M2->M3)
// 다음 모델 실행 (G1->G2, G2->G3)
String nextType = nextModelType(currentType);
UUID nextModelUuid = resolveModelUuid(sheet, nextType);
@@ -266,11 +266,11 @@ public class MapSheetInferenceJobService {
* @return
*/
private String nextModelType(String currentType) {
if ("M1".equals(currentType)) {
return "M2";
if ("G1".equals(currentType)) {
return "G2";
}
if ("M2".equals(currentType)) {
return "M3";
if ("G2".equals(currentType)) {
return "G3";
}
throw new IllegalArgumentException("Unknown runningModelType: " + currentType);
}
@@ -283,13 +283,13 @@ public class MapSheetInferenceJobService {
* @return
*/
private UUID resolveModelUuid(InferenceBatchSheet sheet, String type) {
if ("M1".equals(type)) {
if ("G1".equals(type)) {
return sheet.getM1ModelUuid();
}
if ("M2".equals(type)) {
if ("G2".equals(type)) {
return sheet.getM2ModelUuid();
}
if ("M3".equals(type)) {
if ("G3".equals(type)) {
return sheet.getM3ModelUuid();
}
throw new IllegalArgumentException("Unknown type: " + type);
@@ -379,13 +379,13 @@ public class MapSheetInferenceJobService {
* @return String
*/
private String modelToInferenceType(String type) {
if ("M1".equals(type)) {
if ("G1".equals(type)) {
return "G1";
}
if ("M2".equals(type)) {
if ("G2".equals(type)) {
return "G2";
}
if ("M3".equals(type)) {
if ("G3".equals(type)) {
return "G3";
}
throw new IllegalArgumentException("Unknown type: " + type);