추론상세 진행상태
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package com.kamco.cd.kamcoback.inference;
|
||||
|
||||
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceServerStatusDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceStatusDetailDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.ResultList;
|
||||
import com.kamco.cd.kamcoback.inference.service.InferenceResultService;
|
||||
import com.kamco.cd.kamcoback.mapsheet.service.MapSheetMngService;
|
||||
@@ -23,6 +25,7 @@ import java.util.UUID;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -237,4 +240,30 @@ public class InferenceResultApiController {
|
||||
|
||||
return ApiResponseDto.ok(inferenceResultService.getInferenceServerStatusList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "추론관리 진행현황 상세", description = "어드민 홈 > 추론관리 > 추론관리 > 진행현황 상세")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "검색 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = Page.class))),
|
||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/status/{uuid}")
|
||||
public ApiResponseDto<InferenceStatusDetailDto> getInferenceStatus(
|
||||
@io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||
description = "모델 삭제 요청 정보",
|
||||
required = true)
|
||||
@PathVariable
|
||||
UUID uuid) {
|
||||
|
||||
return ApiResponseDto.ok(inferenceResultService.getInferenceStatus(uuid));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,6 +198,72 @@ public class InferenceResultDto {
|
||||
private String mapSheetName;
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class InferenceStatusDetailDto {
|
||||
private String title;
|
||||
private Integer compareYyyy;
|
||||
private Integer targetYyyy;
|
||||
private String detectOption;
|
||||
private String mapSheetScope;
|
||||
@JsonFormatDttm private ZonedDateTime inferStartDttm;
|
||||
@JsonFormatDttm private ZonedDateTime inferEndDttm;
|
||||
private Long detectingCnt;
|
||||
|
||||
private String model1Ver;
|
||||
private String model2Ver;
|
||||
private String model3Ver;
|
||||
|
||||
public InferenceStatusDetailDto(
|
||||
String title,
|
||||
Integer compareYyyy,
|
||||
Integer targetYyyy,
|
||||
String detectOption,
|
||||
String mapSheetScope,
|
||||
ZonedDateTime inferStartDttm,
|
||||
ZonedDateTime inferEndDttm,
|
||||
Long detectingCnt,
|
||||
String model1Ver,
|
||||
String model2Ver,
|
||||
String model3Ver) {
|
||||
this.title = title;
|
||||
this.compareYyyy = compareYyyy;
|
||||
this.targetYyyy = targetYyyy;
|
||||
this.detectOption = detectOption;
|
||||
this.mapSheetScope = mapSheetScope;
|
||||
this.inferStartDttm = inferStartDttm;
|
||||
this.inferEndDttm = inferEndDttm;
|
||||
this.detectingCnt = detectingCnt;
|
||||
this.model1Ver = model1Ver;
|
||||
this.model2Ver = model2Ver;
|
||||
this.model3Ver = model3Ver;
|
||||
}
|
||||
|
||||
private String usedServerName;
|
||||
private Long detectingEndCnt = 7L;
|
||||
private String model1VerStatus = "PROCCESING";
|
||||
private String model1VerStatusName = "진행중";
|
||||
private String model2VerStatus = "PROCCESING";
|
||||
private String model2VerStatusName = "진행중";
|
||||
private String model3VerStatus = "PROCCESING";
|
||||
private String model4VerStatusName = "진행중";
|
||||
|
||||
public String getDetectOptionName()
|
||||
{
|
||||
if( this.detectOption.equals("EXCL") )return "추론제외";
|
||||
return "이전 년도 도엽 사용";
|
||||
}
|
||||
|
||||
public String getMapSheetScopeName()
|
||||
{
|
||||
if( this.detectOption.equals("ALL") )return "전체";
|
||||
return "부분";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@@ -211,12 +277,6 @@ public class InferenceResultDto {
|
||||
@JsonIgnore private float memused;
|
||||
private Long kbmemused;
|
||||
private float gpuUtil;
|
||||
//private String cpuStatusName;
|
||||
//private String memStatusName;
|
||||
//private String gpuStatusName;
|
||||
//private float cpu_use_rate;
|
||||
//private float gpu_use_rate;
|
||||
//private float mem_use_rate;
|
||||
|
||||
public float getCpuUseRate()
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.MapSheet;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.DetectOption;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceServerStatusDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceStatusDetailDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.MapSheetNumDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.MapSheetScope;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.ResultList;
|
||||
@@ -391,4 +392,21 @@ public class InferenceResultService {
|
||||
public List<InferenceServerStatusDto> getInferenceServerStatusList() {
|
||||
return inferenceResultCoreService.getInferenceServerStatusList();
|
||||
}
|
||||
|
||||
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);
|
||||
dto.setUsedServerName(serverNames);
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user