추론 진행 현황 수정
This commit is contained in:
@@ -272,14 +272,14 @@ public class InferenceResultApiController {
|
|||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = Page.class))),
|
schema = @Schema(implementation = InferenceStatusDetailDto.class))),
|
||||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/status/{uuid}")
|
@GetMapping("/status/{uuid}")
|
||||||
public ApiResponseDto<InferenceStatusDetailDto> getInferenceStatus(
|
public ApiResponseDto<InferenceStatusDetailDto> getInferenceStatus(
|
||||||
@io.swagger.v3.oas.annotations.parameters.RequestBody(
|
@io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
description = "추론진행현왕 요청 정보",
|
description = "추론 진행현황 정보",
|
||||||
required = true)
|
required = true)
|
||||||
@PathVariable
|
@PathVariable
|
||||||
UUID uuid) {
|
UUID uuid) {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import java.time.Duration;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -23,7 +22,9 @@ import org.springframework.data.domain.Pageable;
|
|||||||
|
|
||||||
public class InferenceResultDto {
|
public class InferenceResultDto {
|
||||||
|
|
||||||
/** 탐지 데이터 옵션 dto */
|
/**
|
||||||
|
* 탐지 데이터 옵션 dto
|
||||||
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum MapSheetScope implements EnumType {
|
public enum MapSheetScope implements EnumType {
|
||||||
@@ -52,7 +53,9 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 분석대상 도엽 enum */
|
/**
|
||||||
|
* 분석대상 도엽 enum
|
||||||
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum DetectOption implements EnumType {
|
public enum DetectOption implements EnumType {
|
||||||
@@ -129,7 +132,9 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 목록조회 dto */
|
/**
|
||||||
|
* 목록조회 dto
|
||||||
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@@ -141,11 +146,15 @@ public class InferenceResultDto {
|
|||||||
private String status;
|
private String status;
|
||||||
private String mapSheetCnt;
|
private String mapSheetCnt;
|
||||||
private Long detectingCnt;
|
private Long detectingCnt;
|
||||||
@JsonFormatDttm private ZonedDateTime startTime;
|
@JsonFormatDttm
|
||||||
@JsonFormatDttm private ZonedDateTime endTime;
|
private ZonedDateTime startTime;
|
||||||
@JsonFormatDttm private ZonedDateTime elapsedTime;
|
@JsonFormatDttm
|
||||||
|
private ZonedDateTime endTime;
|
||||||
|
@JsonFormatDttm
|
||||||
|
private ZonedDateTime elapsedTime;
|
||||||
private Boolean applyYn;
|
private Boolean applyYn;
|
||||||
@JsonFormatDttm private ZonedDateTime applyDttm;
|
@JsonFormatDttm
|
||||||
|
private ZonedDateTime applyDttm;
|
||||||
|
|
||||||
@JsonProperty("statusName")
|
@JsonProperty("statusName")
|
||||||
public String statusName() {
|
public String statusName() {
|
||||||
@@ -153,7 +162,9 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 목록조회 검색 조건 dto */
|
/**
|
||||||
|
* 목록조회 검색 조건 dto
|
||||||
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@@ -175,7 +186,9 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 변화탐지 실행 정보 저장 요청 정보 */
|
/**
|
||||||
|
* 변화탐지 실행 정보 저장 요청 정보
|
||||||
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@@ -234,142 +247,151 @@ public class InferenceResultDto {
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@Schema(name = "InferenceStatusDetailDto", description = "추론(변화탐지) 진행상태")
|
||||||
public static class InferenceStatusDetailDto {
|
public static class InferenceStatusDetailDto {
|
||||||
|
|
||||||
|
@Schema(description = "탐지대상 도엽수")
|
||||||
|
private Long detectingCnt;
|
||||||
|
@Schema(description = "모델1 분석 대기")
|
||||||
|
private Integer m1PendingJobs;
|
||||||
|
@Schema(description = "모델2 분석 대기")
|
||||||
|
private Integer m2PendingJobs;
|
||||||
|
@Schema(description = "모델3 분석 대기")
|
||||||
|
private Integer m3PendingJobs;
|
||||||
|
@Schema(description = "모델1 분석 완료")
|
||||||
|
private Integer m1CompletedJobs;
|
||||||
|
@Schema(description = "모델2 분석 완료")
|
||||||
|
private Integer m2CompletedJobs;
|
||||||
|
@Schema(description = "모델3 분석 완료")
|
||||||
|
private Integer m3CompletedJobs;
|
||||||
|
@Schema(description = "모델1 분석 실패")
|
||||||
|
private Integer m1FailedJobs;
|
||||||
|
@Schema(description = "모델2 분석 실패")
|
||||||
|
private Integer m2FailedJobs;
|
||||||
|
@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;
|
private String title;
|
||||||
|
@Schema(description = "비교년도")
|
||||||
private Integer compareYyyy;
|
private Integer compareYyyy;
|
||||||
|
@Schema(description = "기준년도")
|
||||||
private Integer targetYyyy;
|
private Integer targetYyyy;
|
||||||
|
@Schema(description = "회차")
|
||||||
|
private Integer stage;
|
||||||
|
@Schema(description = "변화탐지 시작")
|
||||||
|
@JsonFormatDttm
|
||||||
|
private ZonedDateTime inferStartDttm;
|
||||||
|
@Schema(description = "변화탐지 종료")
|
||||||
|
@JsonFormatDttm
|
||||||
|
private ZonedDateTime inferEndDttm;
|
||||||
|
@Schema(description = "변화탐지 옵션")
|
||||||
private String detectOption;
|
private String detectOption;
|
||||||
|
@Schema(description = "분석도엽")
|
||||||
private String mapSheetScope;
|
private String mapSheetScope;
|
||||||
@JsonFormatDttm private ZonedDateTime inferStartDttm;
|
@Schema(description = "모델1 버전")
|
||||||
@JsonFormatDttm private ZonedDateTime inferEndDttm;
|
private String modelVer1;
|
||||||
private Long detectingCnt = 0L;
|
@Schema(description = "모델2 버전")
|
||||||
private Long detectingEndCnt = 0L;
|
private String modelVer2;
|
||||||
|
@Schema(description = "모델3 버전")
|
||||||
@JsonFormatDttm private ZonedDateTime m1ModelStartDttm;
|
private String modelVer3;
|
||||||
@JsonFormatDttm private ZonedDateTime m1ModelEndDttm;
|
|
||||||
@JsonFormatDttm private ZonedDateTime m2ModelStartDttm;
|
|
||||||
@JsonFormatDttm private ZonedDateTime m2ModelEndDttm;
|
|
||||||
@JsonFormatDttm private ZonedDateTime m3ModelStartDttm;
|
|
||||||
@JsonFormatDttm private ZonedDateTime m3ModelEndDttm;
|
|
||||||
|
|
||||||
private String model1Ver;
|
|
||||||
private String model2Ver;
|
|
||||||
private String model3Ver;
|
|
||||||
private String usedServerName;
|
|
||||||
private String model1VerStatus = "PROCCESING";
|
|
||||||
private String model1VerStatusName = "진행중";
|
|
||||||
private String model2VerStatus = "PROCCESING";
|
|
||||||
private String model2VerStatusName = "진행중";
|
|
||||||
private String model3VerStatus = "PROCCESING";
|
|
||||||
private String model3VerStatusName = "진행중";
|
|
||||||
|
|
||||||
public InferenceStatusDetailDto(
|
public InferenceStatusDetailDto(
|
||||||
|
Long detectingCnt,
|
||||||
|
Integer m1PendingJobs,
|
||||||
|
Integer m2PendingJobs,
|
||||||
|
Integer m3PendingJobs,
|
||||||
|
Integer m1CompletedJobs,
|
||||||
|
Integer m2CompletedJobs,
|
||||||
|
Integer m3CompletedJobs,
|
||||||
|
Integer m1FailedJobs,
|
||||||
|
Integer m2FailedJobs,
|
||||||
|
Integer m3FailedJobs,
|
||||||
|
ZonedDateTime m1ModelStartDttm,
|
||||||
|
ZonedDateTime m2ModelStartDttm,
|
||||||
|
ZonedDateTime m3ModelStartDttm,
|
||||||
|
ZonedDateTime m1ModelEndDttm,
|
||||||
|
ZonedDateTime m2ModelEndDttm,
|
||||||
|
ZonedDateTime m3ModelEndDttm,
|
||||||
String title,
|
String title,
|
||||||
Integer compareYyyy,
|
Integer compareYyyy,
|
||||||
Integer targetYyyy,
|
Integer targetYyyy,
|
||||||
String detectOption,
|
Integer stage,
|
||||||
String mapSheetScope,
|
|
||||||
ZonedDateTime inferStartDttm,
|
ZonedDateTime inferStartDttm,
|
||||||
ZonedDateTime inferEndDttm,
|
ZonedDateTime inferEndDttm,
|
||||||
Long detectingCnt,
|
String detectOption,
|
||||||
Long detectingEndCnt,
|
String mapSheetScope,
|
||||||
ZonedDateTime m1ModelStartDttm,
|
String modelVer1,
|
||||||
ZonedDateTime m1ModelEndDttm,
|
String modelVer2,
|
||||||
ZonedDateTime m2ModelStartDttm,
|
String modelVer3
|
||||||
ZonedDateTime m2ModelEndDttm,
|
) {
|
||||||
ZonedDateTime m3ModelStartDttm,
|
this.detectingCnt = detectingCnt;
|
||||||
ZonedDateTime m3ModelEndDttm,
|
this.m1PendingJobs = m1PendingJobs;
|
||||||
String model1Ver,
|
this.m2PendingJobs = m2PendingJobs;
|
||||||
String model2Ver,
|
this.m3PendingJobs = m3PendingJobs;
|
||||||
String model3Ver) {
|
this.m1CompletedJobs = m1CompletedJobs;
|
||||||
|
this.m2CompletedJobs = m2CompletedJobs;
|
||||||
|
this.m3CompletedJobs = m3CompletedJobs;
|
||||||
|
this.m1FailedJobs = m1FailedJobs;
|
||||||
|
this.m2FailedJobs = m2FailedJobs;
|
||||||
|
this.m3FailedJobs = m3FailedJobs;
|
||||||
|
this.m1ModelStartDttm = m1ModelStartDttm;
|
||||||
|
this.m2ModelStartDttm = m2ModelStartDttm;
|
||||||
|
this.m3ModelStartDttm = m3ModelStartDttm;
|
||||||
|
this.m1ModelEndDttm = m1ModelEndDttm;
|
||||||
|
this.m2ModelEndDttm = m2ModelEndDttm;
|
||||||
|
this.m3ModelEndDttm = m3ModelEndDttm;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.compareYyyy = compareYyyy;
|
this.compareYyyy = compareYyyy;
|
||||||
this.targetYyyy = targetYyyy;
|
this.targetYyyy = targetYyyy;
|
||||||
this.detectOption = detectOption;
|
this.stage = stage;
|
||||||
this.mapSheetScope = mapSheetScope;
|
|
||||||
this.inferStartDttm = inferStartDttm;
|
this.inferStartDttm = inferStartDttm;
|
||||||
this.inferEndDttm = inferEndDttm;
|
this.inferEndDttm = inferEndDttm;
|
||||||
this.detectingCnt = detectingCnt;
|
this.detectOption = detectOption;
|
||||||
this.detectingEndCnt = detectingEndCnt;
|
this.mapSheetScope = mapSheetScope;
|
||||||
this.m1ModelStartDttm = m1ModelStartDttm;
|
this.modelVer1 = modelVer1;
|
||||||
this.m1ModelEndDttm = m1ModelEndDttm;
|
this.modelVer2 = modelVer2;
|
||||||
this.m2ModelStartDttm = m2ModelStartDttm;
|
this.modelVer3 = modelVer3;
|
||||||
this.m2ModelEndDttm = m2ModelEndDttm;
|
}
|
||||||
this.m3ModelStartDttm = m3ModelStartDttm;
|
|
||||||
this.m3ModelEndDttm = m3ModelEndDttm;
|
|
||||||
this.model1Ver = model1Ver;
|
|
||||||
this.model2Ver = model2Ver;
|
|
||||||
this.model3Ver = model3Ver;
|
|
||||||
|
|
||||||
if (this.detectingEndCnt == null) {
|
@JsonProperty("progress")
|
||||||
this.detectingEndCnt = 0L;
|
private int getProgress() {
|
||||||
|
long tiles = this.detectingCnt; // 도엽수
|
||||||
|
int models = 3; // 모델 개수
|
||||||
|
int completed = this.m1CompletedJobs + this.m2CompletedJobs + this.m3CompletedJobs + this.m1FailedJobs + this.m2FailedJobs + this.m3FailedJobs; // 완료수
|
||||||
|
|
||||||
|
long total = tiles * models; // 전체 작업량
|
||||||
|
return (int) ((completed * 100L) / total);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("detectOptionName")
|
||||||
|
private String getDetectOptionName() {
|
||||||
|
return DetectOption.getDescByCode(this.detectOption);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("mapSheetScopeName")
|
||||||
|
private String getMapSheetScope() {
|
||||||
|
return MapSheetScope.getDescByCode(this.mapSheetScope);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDetectOptionName() {
|
|
||||||
if (this.detectOption.equals("EXCL")) {
|
|
||||||
return "추론제외";
|
|
||||||
}
|
|
||||||
return "이전 년도 도엽 사용";
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMapSheetScopeName() {
|
|
||||||
if (this.mapSheetScope.equals("ALL")) {
|
|
||||||
return "전체";
|
|
||||||
}
|
|
||||||
return "부분";
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getDetectingRate() {
|
|
||||||
if (this.detectingCnt == null || this.detectingCnt == 0L) {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.detectingEndCnt == null) {
|
|
||||||
this.detectingEndCnt = 0L;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (double) (this.detectingEndCnt / this.detectingCnt) * 100.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getM1Duration() {
|
|
||||||
if (this.m1ModelStartDttm == null || this.m1ModelEndDttm == null) {
|
|
||||||
return "00:00:00";
|
|
||||||
}
|
|
||||||
Duration duration = Duration.between(m1ModelStartDttm, m1ModelEndDttm);
|
|
||||||
long hours = duration.toHours();
|
|
||||||
long minutes = duration.toMinutesPart();
|
|
||||||
long seconds = duration.toSecondsPart();
|
|
||||||
|
|
||||||
return String.format("%02d:%02d:%02d", hours, minutes, seconds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getM2Duration() {
|
|
||||||
if (this.m2ModelStartDttm == null || this.m2ModelEndDttm == null) {
|
|
||||||
return "00:00:00";
|
|
||||||
}
|
|
||||||
Duration duration = Duration.between(this.m2ModelStartDttm, this.m2ModelEndDttm);
|
|
||||||
long hours = duration.toHours();
|
|
||||||
long minutes = duration.toMinutesPart();
|
|
||||||
long seconds = duration.toSecondsPart();
|
|
||||||
|
|
||||||
return String.format("%02d:%02d:%02d", hours, minutes, seconds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getM3Duration() {
|
|
||||||
if (this.m3ModelStartDttm == null || this.m3ModelEndDttm == null) {
|
|
||||||
return "00:00:00";
|
|
||||||
}
|
|
||||||
Duration duration = Duration.between(this.m3ModelStartDttm, this.m3ModelEndDttm);
|
|
||||||
long hours = duration.toHours();
|
|
||||||
long minutes = duration.toMinutesPart();
|
|
||||||
long seconds = duration.toSecondsPart();
|
|
||||||
|
|
||||||
return String.format("%02d:%02d:%02d", hours, minutes, seconds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -378,9 +400,12 @@ public class InferenceResultDto {
|
|||||||
public static class InferenceServerStatusDto {
|
public static class InferenceServerStatusDto {
|
||||||
|
|
||||||
private String serverName;
|
private String serverName;
|
||||||
@JsonIgnore private float cpu_user;
|
@JsonIgnore
|
||||||
@JsonIgnore private float cpu_system;
|
private float cpu_user;
|
||||||
@JsonIgnore private float memused;
|
@JsonIgnore
|
||||||
|
private float cpu_system;
|
||||||
|
@JsonIgnore
|
||||||
|
private float memused;
|
||||||
private Long kbmemused;
|
private Long kbmemused;
|
||||||
private float gpuUtil;
|
private float gpuUtil;
|
||||||
|
|
||||||
@@ -453,6 +478,15 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class InferenceStatusDetailDto2 {
|
||||||
|
|
||||||
|
InferenceServerStatusDto serverStatus;
|
||||||
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
|||||||
@@ -305,7 +305,8 @@ public class InferenceResultService {
|
|||||||
// 4) 응답 파싱
|
// 4) 응답 파싱
|
||||||
try {
|
try {
|
||||||
List<Map<String, Object>> list =
|
List<Map<String, Object>> list =
|
||||||
objectMapper.readValue(result.body(), new TypeReference<>() {});
|
objectMapper.readValue(result.body(), new TypeReference<>() {
|
||||||
|
});
|
||||||
|
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
throw new IllegalStateException("Inference response is empty");
|
throw new IllegalStateException("Inference response is empty");
|
||||||
@@ -463,23 +464,14 @@ public class InferenceResultService {
|
|||||||
return inferenceResultCoreService.getInferenceServerStatusList();
|
return inferenceResultCoreService.getInferenceServerStatusList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 추론 진행 현황 상세
|
||||||
|
*
|
||||||
|
* @param uuid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public InferenceStatusDetailDto getInferenceStatus(UUID uuid) {
|
public InferenceStatusDetailDto getInferenceStatus(UUID uuid) {
|
||||||
|
|
||||||
List<InferenceServerStatusDto> servers =
|
|
||||||
inferenceResultCoreService.getInferenceServerStatusList();
|
|
||||||
|
|
||||||
String serverNames = "";
|
|
||||||
for (InferenceServerStatusDto server : servers) {
|
|
||||||
if (serverNames.equals("")) {
|
|
||||||
serverNames = server.getServerName();
|
|
||||||
} else {
|
|
||||||
serverNames = serverNames + "," + server.getServerName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
InferenceStatusDetailDto dto = inferenceResultCoreService.getInferenceStatus(uuid);
|
InferenceStatusDetailDto dto = inferenceResultCoreService.getInferenceStatus(uuid);
|
||||||
dto.setUsedServerName(serverNames);
|
|
||||||
|
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -268,8 +268,7 @@ public class InferenceResultCoreService {
|
|||||||
|
|
||||||
private void applyModelUpdate(MapSheetLearnEntity entity, SaveInferenceAiDto request) {
|
private void applyModelUpdate(MapSheetLearnEntity entity, SaveInferenceAiDto request) {
|
||||||
switch (request.getType()) {
|
switch (request.getType()) {
|
||||||
case "M1" ->
|
case "M1" -> applyModelFields(
|
||||||
applyModelFields(
|
|
||||||
request,
|
request,
|
||||||
entity::setM1ModelBatchId,
|
entity::setM1ModelBatchId,
|
||||||
entity::setM1ModelStartDttm,
|
entity::setM1ModelStartDttm,
|
||||||
@@ -278,8 +277,7 @@ public class InferenceResultCoreService {
|
|||||||
entity::setM1RunningJobs,
|
entity::setM1RunningJobs,
|
||||||
entity::setM1CompletedJobs,
|
entity::setM1CompletedJobs,
|
||||||
entity::setM1FailedJobs);
|
entity::setM1FailedJobs);
|
||||||
case "M2" ->
|
case "M2" -> applyModelFields(
|
||||||
applyModelFields(
|
|
||||||
request,
|
request,
|
||||||
entity::setM2ModelBatchId,
|
entity::setM2ModelBatchId,
|
||||||
entity::setM2ModelStartDttm,
|
entity::setM2ModelStartDttm,
|
||||||
@@ -288,8 +286,7 @@ public class InferenceResultCoreService {
|
|||||||
entity::setM2RunningJobs,
|
entity::setM2RunningJobs,
|
||||||
entity::setM2CompletedJobs,
|
entity::setM2CompletedJobs,
|
||||||
entity::setM2FailedJobs);
|
entity::setM2FailedJobs);
|
||||||
case "M3" ->
|
case "M3" -> applyModelFields(
|
||||||
applyModelFields(
|
|
||||||
request,
|
request,
|
||||||
entity::setM3ModelBatchId,
|
entity::setM3ModelBatchId,
|
||||||
entity::setM3ModelStartDttm,
|
entity::setM3ModelStartDttm,
|
||||||
@@ -326,6 +323,11 @@ public class InferenceResultCoreService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 서버 정보 조회
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public List<InferenceServerStatusDto> getInferenceServerStatusList() {
|
public List<InferenceServerStatusDto> getInferenceServerStatusList() {
|
||||||
return mapSheetLearnRepository.getInferenceServerStatusList();
|
return mapSheetLearnRepository.getInferenceServerStatusList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,6 +150,12 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 추론 실행 진행 현황
|
||||||
|
*
|
||||||
|
* @param uuid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public InferenceStatusDetailDto getInferenceStatus(UUID uuid) {
|
public InferenceStatusDetailDto getInferenceStatus(UUID uuid) {
|
||||||
|
|
||||||
@@ -164,21 +170,30 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
InferenceStatusDetailDto.class,
|
InferenceStatusDetailDto.class,
|
||||||
|
mapSheetLearnEntity.detectingCnt,
|
||||||
|
mapSheetLearnEntity.m1PendingJobs,
|
||||||
|
mapSheetLearnEntity.m2PendingJobs,
|
||||||
|
mapSheetLearnEntity.m3PendingJobs,
|
||||||
|
mapSheetLearnEntity.m1CompletedJobs,
|
||||||
|
mapSheetLearnEntity.m2CompletedJobs,
|
||||||
|
mapSheetLearnEntity.m3CompletedJobs,
|
||||||
|
mapSheetLearnEntity.m1FailedJobs,
|
||||||
|
mapSheetLearnEntity.m2FailedJobs,
|
||||||
|
mapSheetLearnEntity.m3FailedJobs,
|
||||||
|
mapSheetLearnEntity.m1ModelStartDttm,
|
||||||
|
mapSheetLearnEntity.m2ModelStartDttm,
|
||||||
|
mapSheetLearnEntity.m3ModelStartDttm,
|
||||||
|
mapSheetLearnEntity.m1ModelEndDttm,
|
||||||
|
mapSheetLearnEntity.m2ModelEndDttm,
|
||||||
|
mapSheetLearnEntity.m3ModelEndDttm,
|
||||||
mapSheetLearnEntity.title,
|
mapSheetLearnEntity.title,
|
||||||
mapSheetLearnEntity.compareYyyy,
|
mapSheetLearnEntity.compareYyyy,
|
||||||
mapSheetLearnEntity.targetYyyy,
|
mapSheetLearnEntity.targetYyyy,
|
||||||
mapSheetLearnEntity.detectOption,
|
mapSheetLearnEntity.stage,
|
||||||
mapSheetLearnEntity.mapSheetScope,
|
|
||||||
mapSheetLearnEntity.inferStartDttm,
|
mapSheetLearnEntity.inferStartDttm,
|
||||||
mapSheetLearnEntity.inferEndDttm,
|
mapSheetLearnEntity.inferEndDttm,
|
||||||
mapSheetLearnEntity.detectingCnt,
|
mapSheetLearnEntity.detectOption,
|
||||||
mapSheetLearnEntity.detectEndCnt,
|
mapSheetLearnEntity.mapSheetScope,
|
||||||
mapSheetLearnEntity.m1ModelStartDttm,
|
|
||||||
mapSheetLearnEntity.m1ModelEndDttm,
|
|
||||||
mapSheetLearnEntity.m2ModelStartDttm,
|
|
||||||
mapSheetLearnEntity.m2ModelEndDttm,
|
|
||||||
mapSheetLearnEntity.m3ModelStartDttm,
|
|
||||||
mapSheetLearnEntity.m3ModelEndDttm,
|
|
||||||
m1Model.modelVer.as("model1Ver"),
|
m1Model.modelVer.as("model1Ver"),
|
||||||
m2Model.modelVer.as("model2Ver"),
|
m2Model.modelVer.as("model2Ver"),
|
||||||
m3Model.modelVer.as("model3Ver")))
|
m3Model.modelVer.as("model3Ver")))
|
||||||
|
|||||||
Reference in New Issue
Block a user