Merge remote-tracking branch 'origin/feat/infer_dev_260107' into feat/infer_dev_260107
# Conflicts: # src/main/java/com/kamco/cd/kamcoback/postgres/entity/ModelMngEntity.java
This commit is contained in:
@@ -281,20 +281,19 @@ public class MapSheetMngApiController {
|
|||||||
return ApiResponseDto.createOK(mapSheetMngService.getFilesAll(srchDto));
|
return ApiResponseDto.createOK(mapSheetMngService.getFilesAll(srchDto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "영상 데이터 관리 완료 년도 목록 조회", description = "영상 데이터 관리 완료 년도 목록 조회")
|
@Operation(summary = "영상 데이터 관리 완료 년도 목록 조회", description = "영상 데이터 관리 완료 년도 목록 조회")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "200",
|
responseCode = "200",
|
||||||
description = "조회 성공",
|
description = "조회 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@PostMapping("/mng-done-yyyy-list")
|
@PostMapping("/mng-done-yyyy-list")
|
||||||
public ApiResponseDto<List<Integer>> findMapSheetMngDoneYyyyList() {
|
public ApiResponseDto<List<Integer>> findMapSheetMngDoneYyyyList() {
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import java.nio.file.Paths;
|
|||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -343,10 +342,11 @@ public class MapSheetMngService {
|
|||||||
public List<Integer> findMapSheetMngDoneYyyyList() {
|
public List<Integer> findMapSheetMngDoneYyyyList() {
|
||||||
|
|
||||||
List<MngDto> mngList = mapSheetMngCoreService.findMapSheetMngList();
|
List<MngDto> mngList = mapSheetMngCoreService.findMapSheetMngList();
|
||||||
List<Integer> yearList = mngList.stream()
|
List<Integer> yearList =
|
||||||
.filter(dto -> "DONE".equals(dto.getMngState()))
|
mngList.stream()
|
||||||
.map(dto -> dto.getMngYyyy()) // 날짜 객체에서 연도(int)만 추출
|
.filter(dto -> "DONE".equals(dto.getMngState()))
|
||||||
.toList();
|
.map(dto -> dto.getMngYyyy()) // 날짜 객체에서 연도(int)만 추출
|
||||||
|
.toList();
|
||||||
|
|
||||||
return yearList;
|
return yearList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,7 +176,6 @@ public class ModelMngDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Schema(name = "ModelMetricAddReq", description = "모델 등록 req")
|
@Schema(name = "ModelMetricAddReq", description = "모델 등록 req")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -191,5 +190,4 @@ public class ModelMngDto {
|
|||||||
private double loss;
|
private double loss;
|
||||||
private double iou;
|
private double iou;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class ModelMngService {
|
|||||||
addReq.setUuid(uuid);
|
addReq.setUuid(uuid);
|
||||||
Long modelUid = modelMngCoreService.insertModel(addReq);
|
Long modelUid = modelMngCoreService.insertModel(addReq);
|
||||||
|
|
||||||
ModelMetricAddReq modelMetricAddReq = new ModelMetricAddReq();
|
ModelMetricAddReq modelMetricAddReq = new ModelMetricAddReq();
|
||||||
modelMetricAddReq.setModelUid(modelUid);
|
modelMetricAddReq.setModelUid(modelUid);
|
||||||
modelMetricAddReq.setModelVerUid(modelUid);
|
modelMetricAddReq.setModelVerUid(modelUid);
|
||||||
modelMetricAddReq.setF1Score(0);
|
modelMetricAddReq.setF1Score(0);
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.core;
|
package com.kamco.cd.kamcoback.postgres.core;
|
||||||
|
|
||||||
import static com.kamco.cd.kamcoback.postgres.entity.QModelMngEntity.modelMngEntity;
|
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.model.dto.ModelMngDto;
|
import com.kamco.cd.kamcoback.model.dto.ModelMngDto;
|
||||||
import com.kamco.cd.kamcoback.model.dto.ModelMngDto.ModelMetricAddReq;
|
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.ModelMngEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.ModelMngEntity;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.ModelResultMetricEntity;
|
|
||||||
import com.kamco.cd.kamcoback.postgres.repository.model.ModelMngRepository;
|
import com.kamco.cd.kamcoback.postgres.repository.model.ModelMngRepository;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -44,7 +40,7 @@ public class ModelMngCoreService {
|
|||||||
|
|
||||||
public Long insertModel(ModelMngDto.AddReq addReq) {
|
public Long insertModel(ModelMngDto.AddReq addReq) {
|
||||||
|
|
||||||
ModelMngEntity addEntity = new ModelMngEntity();
|
ModelMngEntity addEntity = new ModelMngEntity();
|
||||||
addEntity.setModelVer(addReq.getModelVer());
|
addEntity.setModelVer(addReq.getModelVer());
|
||||||
addEntity.setModelType(addReq.getModelType());
|
addEntity.setModelType(addReq.getModelType());
|
||||||
addEntity.setFilePath(addReq.getFilePath());
|
addEntity.setFilePath(addReq.getFilePath());
|
||||||
@@ -60,7 +56,7 @@ public class ModelMngCoreService {
|
|||||||
addEntity.setClsModelFileName(addReq.getClsModelFileName());
|
addEntity.setClsModelFileName(addReq.getClsModelFileName());
|
||||||
addEntity.setDeleted(false);
|
addEntity.setDeleted(false);
|
||||||
|
|
||||||
//modelMngRepository.insertModel(addReq);
|
// modelMngRepository.insertModel(addReq);
|
||||||
ModelMngEntity entity = modelMngRepository.save(addEntity);
|
ModelMngEntity entity = modelMngRepository.save(addEntity);
|
||||||
return entity.getModelUid();
|
return entity.getModelUid();
|
||||||
}
|
}
|
||||||
@@ -78,11 +74,8 @@ public class ModelMngCoreService {
|
|||||||
addEntity.setIou(addReq.getIou());
|
addEntity.setIou(addReq.getIou());
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
modelMngRepository.insertModelResultMetric(addReq);
|
modelMngRepository.insertModelResultMetric(addReq);
|
||||||
//ModelMngEntity entity = modelMngRepository.save(addEntity);
|
// ModelMngEntity entity = modelMngRepository.save(addEntity);
|
||||||
//return entity.getMetricUid();
|
// return entity.getMetricUid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,15 +3,11 @@ package com.kamco.cd.kamcoback.postgres.entity;
|
|||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.hibernate.annotations.JdbcTypeCode;
|
import org.hibernate.annotations.JdbcTypeCode;
|
||||||
import org.hibernate.type.SqlTypes;
|
import org.hibernate.type.SqlTypes;
|
||||||
|
|
||||||
|
|
||||||
@Table(name = "tb_model_result_metric")
|
@Table(name = "tb_model_result_metric")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|||||||
@@ -25,6 +25,4 @@ public interface ModelMngRepositoryCustom {
|
|||||||
void deleteByModelUuid(UUID uuid);
|
void deleteByModelUuid(UUID uuid);
|
||||||
|
|
||||||
void insertModelResultMetric(ModelMngDto.ModelMetricAddReq addReq);
|
void insertModelResultMetric(ModelMngDto.ModelMetricAddReq addReq);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,30 +198,27 @@ public class ModelMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertModelResultMetric(@Valid ModelMngDto.ModelMetricAddReq addReq) {
|
public void insertModelResultMetric(@Valid ModelMngDto.ModelMetricAddReq addReq) {
|
||||||
long execCount =
|
long execCount =
|
||||||
queryFactory
|
queryFactory
|
||||||
.insert(modelResultMetricEntity)
|
.insert(modelResultMetricEntity)
|
||||||
.columns(
|
.columns(
|
||||||
modelResultMetricEntity.modelUid,
|
modelResultMetricEntity.modelUid,
|
||||||
modelResultMetricEntity.modelVerUid,
|
modelResultMetricEntity.modelVerUid,
|
||||||
modelResultMetricEntity.f1Score,
|
modelResultMetricEntity.f1Score,
|
||||||
modelResultMetricEntity.precision,
|
modelResultMetricEntity.precision,
|
||||||
modelResultMetricEntity.recall,
|
modelResultMetricEntity.recall,
|
||||||
modelResultMetricEntity.loss,
|
modelResultMetricEntity.loss,
|
||||||
modelResultMetricEntity.iou)
|
modelResultMetricEntity.iou)
|
||||||
.values(
|
.values(
|
||||||
addReq.getModelUid(),
|
addReq.getModelUid(),
|
||||||
addReq.getModelVerUid(),
|
addReq.getModelVerUid(),
|
||||||
addReq.getF1Score(),
|
addReq.getF1Score(),
|
||||||
addReq.getPrecision(),
|
addReq.getPrecision(),
|
||||||
addReq.getRecall(),
|
addReq.getRecall(),
|
||||||
addReq.getLoss(),
|
addReq.getLoss(),
|
||||||
addReq.getIou())
|
addReq.getIou())
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user