Compare commits
12 Commits
479ad710e0
...
feat/rebui
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cc9b54ba9 | ||
|
|
50ad05b53b | ||
|
|
822dbb252f | ||
|
|
5e04df73af | ||
| 650b1695f0 | |||
| 960e4215e0 | |||
| 08a220db4d | |||
| a9b49faa6c | |||
| b760e9874c | |||
| 8698bf61d1 | |||
| 680e137284 | |||
| f4a81a34d6 |
@@ -125,6 +125,7 @@ public class CommonCodeService {
|
|||||||
return commonCodeCoreService.getCode(parentCodeCd, childCodeCd);
|
return commonCodeCoreService.getCode(parentCodeCd, childCodeCd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 공통코드 이름 조회
|
* 공통코드 이름 조회
|
||||||
*
|
*
|
||||||
@@ -136,6 +137,8 @@ public class CommonCodeService {
|
|||||||
return commonCodeCoreService.getCode(parentCodeCd, childCodeCd);
|
return commonCodeCoreService.getCode(parentCodeCd, childCodeCd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
public List<CodeDto> getTypeCode(String type) {
|
public List<CodeDto> getTypeCode(String type) {
|
||||||
return Enums.getCodes(type);
|
return Enums.getCodes(type);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.common.download;
|
package com.kamco.cd.training.common.download;
|
||||||
|
|
||||||
import com.kamco.cd.training.common.download.dto.DownloadSpec;
|
import com.kamco.cd.training.common.download.dto.DownloadSpec;
|
||||||
@@ -46,3 +47,4 @@ public class DownloadExecutor {
|
|||||||
.body(body);
|
.body(body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.common.download;
|
package com.kamco.cd.training.common.download;
|
||||||
|
|
||||||
import org.springframework.util.AntPathMatcher;
|
import org.springframework.util.AntPathMatcher;
|
||||||
@@ -17,3 +18,4 @@ public final class DownloadPaths {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.common.enums;
|
package com.kamco.cd.training.common.enums;
|
||||||
|
|
||||||
import com.kamco.cd.training.common.utils.enums.CodeExpose;
|
import com.kamco.cd.training.common.utils.enums.CodeExpose;
|
||||||
@@ -17,3 +18,4 @@ public enum DeployTargetType implements EnumType {
|
|||||||
private final String id;
|
private final String id;
|
||||||
private final String text;
|
private final String text;
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.common.enums;
|
package com.kamco.cd.training.common.enums;
|
||||||
|
|
||||||
import com.kamco.cd.training.common.utils.enums.CodeExpose;
|
import com.kamco.cd.training.common.utils.enums.CodeExpose;
|
||||||
@@ -25,3 +26,4 @@ public enum ModelMngStatusType implements EnumType {
|
|||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.common.enums;
|
package com.kamco.cd.training.common.enums;
|
||||||
|
|
||||||
import com.kamco.cd.training.common.utils.enums.CodeExpose;
|
import com.kamco.cd.training.common.utils.enums.CodeExpose;
|
||||||
@@ -18,3 +19,4 @@ public enum ProcessStepType implements EnumType {
|
|||||||
private final String id;
|
private final String id;
|
||||||
private final String text;
|
private final String text;
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class StartupLogger {
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
╔════════════════════════════════════════════════════════════════════════════════╗
|
╔════════════════════════════════════════════════════════════════════════════════╗
|
||||||
║ 🚀 APPLICATION STARTUP INFORMATION 2 ║
|
║ 🚀 APPLICATION STARTUP INFORMATION 3 ║
|
||||||
╠════════════════════════════════════════════════════════════════════════════════╣
|
╠════════════════════════════════════════════════════════════════════════════════╣
|
||||||
║ PROFILE CONFIGURATION ║
|
║ PROFILE CONFIGURATION ║
|
||||||
╠────────────────────────────────────────────────────────────────────────────────╣
|
╠────────────────────────────────────────────────────────────────────────────────╣
|
||||||
|
|||||||
@@ -288,6 +288,12 @@ public class DatasetApiController {
|
|||||||
})
|
})
|
||||||
@PostMapping("/deliveries")
|
@PostMapping("/deliveries")
|
||||||
public ApiResponseDto<String> insertDeliveriesDataset(@RequestBody AddDeliveriesReq req) {
|
public ApiResponseDto<String> insertDeliveriesDataset(@RequestBody AddDeliveriesReq req) {
|
||||||
|
|
||||||
|
// 폴더 구조 검증
|
||||||
|
DatasetService.validateTrainValTestDirs(req.getFilePath());
|
||||||
|
// 파일 개수 검증
|
||||||
|
DatasetService.validateDirFileCount(req.getFilePath());
|
||||||
|
|
||||||
datasetAsyncService.insertDeliveriesDatasetAsync(req);
|
datasetAsyncService.insertDeliveriesDatasetAsync(req);
|
||||||
return ApiResponseDto.createOK("ok");
|
return ApiResponseDto.createOK("ok");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ public class DatasetDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Schema(name = "DatasetDetailReq", description = "데이터셋 상세 조회 요청")
|
@Schema(name = "DatasetDetailReq", description = "데이터셋 상세 조회 요청")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -157,6 +158,8 @@ public class DatasetDto {
|
|||||||
private Long datasetId;
|
private Long datasetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Schema(name = "DatasetRegisterReq", description = "데이터셋 등록 요청")
|
@Schema(name = "DatasetRegisterReq", description = "데이터셋 등록 요청")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.dataset.dto;
|
package com.kamco.cd.training.dataset.dto;
|
||||||
|
|
||||||
import com.kamco.cd.training.common.utils.interfaces.JsonFormatDttm;
|
import com.kamco.cd.training.common.utils.interfaces.JsonFormatDttm;
|
||||||
@@ -72,6 +73,7 @@ public class MapSheetDto {
|
|||||||
private List<Long> itemIds;
|
private List<Long> itemIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Schema(name = "MapSheetCheckReq", description = "도엽 번호 유효성 검증 요청")
|
@Schema(name = "MapSheetCheckReq", description = "도엽 번호 유효성 검증 요청")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -101,3 +103,4 @@ public class MapSheetDto {
|
|||||||
private boolean duplicate;
|
private boolean duplicate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -44,21 +44,11 @@ public class DatasetAsyncService {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// ===== 1. 폴더/파일 검증 =====
|
// ===== 1. UID 생성 =====
|
||||||
long validateStart = System.currentTimeMillis();
|
|
||||||
|
|
||||||
// 폴더 구조 검증
|
|
||||||
DatasetService.validateTrainValTestDirs(req.getFilePath());
|
|
||||||
// 파일 개수 검증
|
|
||||||
DatasetService.validateDirFileCount(req.getFilePath());
|
|
||||||
|
|
||||||
log.info("{} 데이터셋 검증 완료. ({} ms)", LOG_PREFIX, System.currentTimeMillis() - validateStart);
|
|
||||||
|
|
||||||
// ===== 2. UID 생성 =====
|
|
||||||
String uid = UUID.randomUUID().toString().replace("-", "").toUpperCase();
|
String uid = UUID.randomUUID().toString().replace("-", "").toUpperCase();
|
||||||
log.info("{} 생성된 UID: {}", LOG_PREFIX, uid);
|
log.info("{} 생성된 UID: {}", LOG_PREFIX, uid);
|
||||||
|
|
||||||
// ===== 3. 마스터 데이터 생성 =====
|
// ===== 2. 마스터 데이터 생성 =====
|
||||||
String title = req.getTitle();
|
String title = req.getTitle();
|
||||||
|
|
||||||
if (title == null || title.isBlank()) {
|
if (title == null || title.isBlank()) {
|
||||||
@@ -87,11 +77,11 @@ public class DatasetAsyncService {
|
|||||||
|
|
||||||
log.info("{} 마스터 저장 완료. datasetUid={}", LOG_PREFIX, datasetUid);
|
log.info("{} 마스터 저장 완료. datasetUid={}", LOG_PREFIX, datasetUid);
|
||||||
|
|
||||||
// ===== 4. 상태 변경 (업로드중) =====
|
// ===== 3. 상태 변경 (업로드중) =====
|
||||||
datasetCoreService.updateDatasetUploadStatus(datasetUid, LearnDataRegister.UPLOADING);
|
datasetCoreService.updateDatasetUploadStatus(datasetUid, LearnDataRegister.UPLOADING);
|
||||||
log.info("{} 상태 변경 → UPLOADING. datasetUid={}", LOG_PREFIX, datasetUid);
|
log.info("{} 상태 변경 → UPLOADING. datasetUid={}", LOG_PREFIX, datasetUid);
|
||||||
|
|
||||||
// ===== 5. 데이터 등록 =====
|
// ===== 4. 데이터 등록 =====
|
||||||
long insertStart = System.currentTimeMillis();
|
long insertStart = System.currentTimeMillis();
|
||||||
|
|
||||||
// 납품 데이터 obj 등록
|
// 납품 데이터 obj 등록
|
||||||
@@ -103,7 +93,7 @@ public class DatasetAsyncService {
|
|||||||
datasetUid,
|
datasetUid,
|
||||||
System.currentTimeMillis() - insertStart);
|
System.currentTimeMillis() - insertStart);
|
||||||
|
|
||||||
// ===== 6. 상태 변경 (완료) =====
|
// ===== 5. 상태 변경 (완료) =====
|
||||||
datasetCoreService.updateDatasetUploadStatus(datasetUid, LearnDataRegister.COMPLETED);
|
datasetCoreService.updateDatasetUploadStatus(datasetUid, LearnDataRegister.COMPLETED);
|
||||||
log.info("{} 상태 변경 → COMPLETED. datasetUid={}", LOG_PREFIX, datasetUid);
|
log.info("{} 상태 변경 → COMPLETED. datasetUid={}", LOG_PREFIX, datasetUid);
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,12 @@ public class DatasetBatchService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public void saveBatch(List<Map<String, Object>> batch, Long datasetUid, String type) {
|
public void saveBatch(List<Map<String, Object>> batch, Long datasetUid, String type) {
|
||||||
for (Map<String, Object> map : batch) {
|
for (Map<String, Object> map : batch) {
|
||||||
insertTrainTestData(map, datasetUid, type);
|
try {
|
||||||
|
insertTrainTestData(map, datasetUid, type);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("파일 단위 실패. skip. file={}", batch, e);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,6 +57,10 @@ public class DatasetBatchService {
|
|||||||
JsonNode json;
|
JsonNode json;
|
||||||
try {
|
try {
|
||||||
json = parseJson(labelJson);
|
json = parseJson(labelJson);
|
||||||
|
if (json == null) {
|
||||||
|
log.warn("json null. skip. file={}", labelJson);
|
||||||
|
return;
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 실패하면 skip, 다음 진행
|
// 실패하면 skip, 다음 진행
|
||||||
log.error("GeoJSON 파싱 실패. skip. file={}", geojsonPath, e);
|
log.error("GeoJSON 파싱 실패. skip. file={}", geojsonPath, e);
|
||||||
@@ -83,6 +92,12 @@ public class DatasetBatchService {
|
|||||||
// JSON 유효성 체크
|
// JSON 유효성 체크
|
||||||
JsonNode featuresNode = json.path("features");
|
JsonNode featuresNode = json.path("features");
|
||||||
|
|
||||||
|
// 2. 비어있는지 확인
|
||||||
|
if (featuresNode.isEmpty()) {
|
||||||
|
log.warn("features empty. skip. file={}", geojsonPath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!featuresNode.isArray()) {
|
if (!featuresNode.isArray()) {
|
||||||
log.warn("features array 아님. skip. file={}", geojsonPath);
|
log.warn("features array 아님. skip. file={}", geojsonPath);
|
||||||
return; // skip
|
return; // skip
|
||||||
@@ -164,7 +179,7 @@ public class DatasetBatchService {
|
|||||||
return mapper.readTree(labelJson.toString());
|
return mapper.readTree(labelJson.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("label_json parse error: {}", labelJson, e);
|
log.error("label_json parse error: {}", labelJson, e);
|
||||||
throw new RuntimeException("label_json parse error", e);
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ public class DatasetService {
|
|||||||
return datasetCoreService.getOneByUuid(id);
|
return datasetCoreService.getOneByUuid(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 데이터셋 등록
|
* 데이터셋 등록
|
||||||
*
|
*
|
||||||
@@ -101,6 +102,7 @@ public class DatasetService {
|
|||||||
return saved.getId();
|
return saved.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
/**
|
/**
|
||||||
* 데이터셋 수정
|
* 데이터셋 수정
|
||||||
*
|
*
|
||||||
@@ -665,7 +667,6 @@ public class DatasetService {
|
|||||||
i + batch.size(),
|
i + batch.size(),
|
||||||
datasetUid,
|
datasetUid,
|
||||||
e);
|
e);
|
||||||
throw e;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.dataset.service;
|
package com.kamco.cd.training.dataset.service;
|
||||||
|
|
||||||
import com.kamco.cd.training.dataset.dto.MapSheetDto;
|
import com.kamco.cd.training.dataset.dto.MapSheetDto;
|
||||||
@@ -39,3 +40,4 @@ public class MapSheetService {
|
|||||||
log.info("도엽 삭제 완료 - 개수: {}", deleteReq.getItemIds().size());
|
log.info("도엽 삭제 완료 - 개수: {}", deleteReq.getItemIds().size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import com.kamco.cd.training.model.dto.ModelTrainMngDto.Basic;
|
|||||||
import com.kamco.cd.training.model.dto.ModelTrainMngDto.CleanupResult;
|
import com.kamco.cd.training.model.dto.ModelTrainMngDto.CleanupResult;
|
||||||
import com.kamco.cd.training.model.dto.ModelTrainMngDto.ModelProgressStepDto;
|
import com.kamco.cd.training.model.dto.ModelTrainMngDto.ModelProgressStepDto;
|
||||||
import com.kamco.cd.training.model.service.ModelTrainDetailService;
|
import com.kamco.cd.training.model.service.ModelTrainDetailService;
|
||||||
import com.kamco.cd.training.model.service.ModelTrainMngService;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||||
@@ -47,10 +46,9 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RequestMapping("/api/models")
|
@RequestMapping("/api/models")
|
||||||
public class ModelTrainDetailApiController {
|
public class ModelTrainDetailApiController {
|
||||||
private final ModelTrainDetailService modelTrainDetailService;
|
private final ModelTrainDetailService modelTrainDetailService;
|
||||||
private final ModelTrainMngService modelTrainMngService;
|
|
||||||
private final RangeDownloadResponder rangeDownloadResponder;
|
private final RangeDownloadResponder rangeDownloadResponder;
|
||||||
|
|
||||||
@Value("${train.docker.responseDir}")
|
@Value("${train.docker.response_dir}")
|
||||||
private String responseDir;
|
private String responseDir;
|
||||||
|
|
||||||
@Operation(summary = "모델학습관리> 모델관리 > 상세정보탭 > 학습 진행정보", description = "학습 진행정보, 모델학습 정보 API")
|
@Operation(summary = "모델학습관리> 모델관리 > 상세정보탭 > 학습 진행정보", description = "학습 진행정보, 모델학습 정보 API")
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public class FileDto {
|
|||||||
private Integer endPos;
|
private Integer endPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@@ -89,6 +90,8 @@ public class FileDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Schema(name = "FoldersDto", description = "폴더목록 정보")
|
@Schema(name = "FoldersDto", description = "폴더목록 정보")
|
||||||
@Getter
|
@Getter
|
||||||
public static class FoldersDto {
|
public static class FoldersDto {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class ModelTrainDetailService {
|
|||||||
private final ModelTrainDetailCoreService modelTrainDetailCoreService;
|
private final ModelTrainDetailCoreService modelTrainDetailCoreService;
|
||||||
private final ModelTrainMngCoreService mngCoreService;
|
private final ModelTrainMngCoreService mngCoreService;
|
||||||
|
|
||||||
@Value("${train.docker.responseDir}")
|
@Value("${train.docker.response_dir}")
|
||||||
private String responseDir;
|
private String responseDir;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -84,6 +84,7 @@ public class ModelTrainDetailService {
|
|||||||
return modelTrainDetailCoreService.findByModelByUUID(uuid);
|
return modelTrainDetailCoreService.findByModelByUUID(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 전이학습 모델선택 정보
|
* 전이학습 모델선택 정보
|
||||||
*
|
*
|
||||||
@@ -150,6 +151,8 @@ public class ModelTrainDetailService {
|
|||||||
return transferDetailDto;
|
return transferDetailDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
public List<ModelTrainMetrics> getModelTrainMetricResult(UUID uuid) {
|
public List<ModelTrainMetrics> getModelTrainMetricResult(UUID uuid) {
|
||||||
return modelTrainDetailCoreService.getModelTrainMetricResult(uuid);
|
return modelTrainDetailCoreService.getModelTrainMetricResult(uuid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,11 +46,14 @@ public class ModelTrainMngService {
|
|||||||
private final TrainJobService trainJobService;
|
private final TrainJobService trainJobService;
|
||||||
private final ModelTrainDetailService modelTrainDetailService;
|
private final ModelTrainDetailService modelTrainDetailService;
|
||||||
|
|
||||||
@Value("${train.docker.basePath}")
|
@Value("${train.docker.base_path}")
|
||||||
private String basePath;
|
private String basePath;
|
||||||
|
|
||||||
@Value("${train.docker.responseDir}")
|
@Value("${train.docker.response_dir}")
|
||||||
private String responseDir;
|
private String responseDir;
|
||||||
|
@Value("${train.docker.symbolic_link_dir}")
|
||||||
|
private String symbolicDir;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 모델학습 조회
|
* 모델학습 조회
|
||||||
@@ -80,7 +83,7 @@ public class ModelTrainMngService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ===== 2. 경로 생성 =====
|
// ===== 2. 경로 생성 =====
|
||||||
Path tmpBase = Path.of(basePath, "tmp").toAbsolutePath().normalize();
|
Path tmpBase = Path.of(symbolicDir).toAbsolutePath().normalize();
|
||||||
Path tmp = tmpBase.resolve(model.getRequestPath()).normalize();
|
Path tmp = tmpBase.resolve(model.getRequestPath()).normalize();
|
||||||
|
|
||||||
Path responseBase = Paths.get(responseDir).toAbsolutePath().normalize();
|
Path responseBase = Paths.get(responseDir).toAbsolutePath().normalize();
|
||||||
@@ -232,12 +235,7 @@ public class ModelTrainMngService {
|
|||||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
|
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
if (!Files.isSymbolicLink(file)) {
|
// 파일은 전부 허용 (일반 + symlink)
|
||||||
log.error("tmp 내부에 일반 파일 존재: {}", file);
|
|
||||||
throw new CustomApiException(
|
|
||||||
"BAD_REQUEST", HttpStatus.BAD_REQUEST, "tmp 내부는 symlink만 허용");
|
|
||||||
}
|
|
||||||
|
|
||||||
return FileVisitResult.CONTINUE;
|
return FileVisitResult.CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,10 +243,11 @@ public class ModelTrainMngService {
|
|||||||
public FileVisitResult preVisitDirectory(Path directory, BasicFileAttributes attrs)
|
public FileVisitResult preVisitDirectory(Path directory, BasicFileAttributes attrs)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
|
// 루트 제외 + symlink 디렉토리 금지
|
||||||
if (!directory.equals(dir) && Files.isSymbolicLink(directory)) {
|
if (!directory.equals(dir) && Files.isSymbolicLink(directory)) {
|
||||||
log.error("tmp 내부에 symlink 디렉토리 존재: {}", directory);
|
log.error("tmp 내부에 symlink 디렉토리 존재: {}", directory);
|
||||||
throw new CustomApiException(
|
throw new CustomApiException(
|
||||||
"BAD_REQUEST", HttpStatus.BAD_REQUEST, "tmp 내부에 symlink 디렉토리 금지");
|
"BAD_REQUEST", HttpStatus.BAD_REQUEST, "tmp 내부에 symlink 디렉토리는 허용되지 않습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return FileVisitResult.CONTINUE;
|
return FileVisitResult.CONTINUE;
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ public class DatasetCoreService
|
|||||||
return search(searchReq);
|
return search(searchReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 학습데이터 등록
|
* 학습데이터 등록
|
||||||
*
|
*
|
||||||
@@ -129,6 +130,7 @@ public class DatasetCoreService
|
|||||||
return savedEntity.toDto();
|
return savedEntity.toDto();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
/**
|
/**
|
||||||
* 학습 데이터 수정
|
* 학습 데이터 수정
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.postgres.core;
|
package com.kamco.cd.training.postgres.core;
|
||||||
|
|
||||||
import com.kamco.cd.training.common.exception.NotFoundException;
|
import com.kamco.cd.training.common.exception.NotFoundException;
|
||||||
@@ -70,3 +71,4 @@ public class MapSheetCoreService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -67,10 +67,13 @@ public class ModelTrainDetailCoreService {
|
|||||||
return modelDetailRepository.getByModelHyperParamSummary(uuid);
|
return modelDetailRepository.getByModelHyperParamSummary(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
public TransferHyperSummary getTransferHyperSummary(UUID uuid) {
|
public TransferHyperSummary getTransferHyperSummary(UUID uuid) {
|
||||||
return modelDetailRepository.getByModelTransferHyperParamSummary(uuid);
|
return modelDetailRepository.getByModelTransferHyperParamSummary(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
public List<MappingDataset> getByModelMappingDataset(UUID uuid) {
|
public List<MappingDataset> getByModelMappingDataset(UUID uuid) {
|
||||||
return modelDetailRepository.getByModelMappingDataset(uuid);
|
return modelDetailRepository.getByModelMappingDataset(uuid);
|
||||||
}
|
}
|
||||||
@@ -80,6 +83,7 @@ public class ModelTrainDetailCoreService {
|
|||||||
return entity.toDto();
|
return entity.toDto();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 모델 학습별 config 정보 조회
|
* 모델 학습별 config 정보 조회
|
||||||
*
|
*
|
||||||
@@ -90,6 +94,7 @@ public class ModelTrainDetailCoreService {
|
|||||||
return modelConfigRepository.findModelConfigByModelId(modelId).orElse(null);
|
return modelConfigRepository.findModelConfigByModelId(modelId).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
public List<ModelTrainMetrics> getModelTrainMetricResult(UUID uuid) {
|
public List<ModelTrainMetrics> getModelTrainMetricResult(UUID uuid) {
|
||||||
return modelDetailRepository.getModelTrainMetricResult(uuid);
|
return modelDetailRepository.getModelTrainMetricResult(uuid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,6 +219,7 @@ public class ModelTrainMngCoreService {
|
|||||||
modelConfigRepository.save(entity);
|
modelConfigRepository.save(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 데이터셋 매핑 생성
|
* 데이터셋 매핑 생성
|
||||||
*
|
*
|
||||||
@@ -235,6 +236,8 @@ public class ModelTrainMngCoreService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UUID로 모델 조회
|
* UUID로 모델 조회
|
||||||
*
|
*
|
||||||
@@ -278,6 +281,7 @@ public class ModelTrainMngCoreService {
|
|||||||
.orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND));
|
.orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
public ModelConfigDto.TransferBasic findModelTransferConfigByModelId(UUID uuid) {
|
public ModelConfigDto.TransferBasic findModelTransferConfigByModelId(UUID uuid) {
|
||||||
ModelMasterEntity modelEntity = findByUuid(uuid);
|
ModelMasterEntity modelEntity = findByUuid(uuid);
|
||||||
return modelConfigRepository
|
return modelConfigRepository
|
||||||
@@ -285,6 +289,8 @@ public class ModelTrainMngCoreService {
|
|||||||
.orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND));
|
.orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 데이터셋 G1 목록
|
* 데이터셋 G1 목록
|
||||||
*
|
*
|
||||||
@@ -295,6 +301,7 @@ public class ModelTrainMngCoreService {
|
|||||||
return datasetRepository.getDatasetSelectG1List(req);
|
return datasetRepository.getDatasetSelectG1List(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 전이학습 데이터셋 G1 목록
|
* 전이학습 데이터셋 G1 목록
|
||||||
*
|
*
|
||||||
@@ -305,6 +312,8 @@ public class ModelTrainMngCoreService {
|
|||||||
return datasetRepository.getDatasetTransferSelectG1List(modelId);
|
return datasetRepository.getDatasetTransferSelectG1List(modelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 데이터셋 G2, G3 목록
|
* 데이터셋 G2, G3 목록
|
||||||
*
|
*
|
||||||
@@ -315,6 +324,7 @@ public class ModelTrainMngCoreService {
|
|||||||
return datasetRepository.getDatasetSelectG2G3List(req);
|
return datasetRepository.getDatasetSelectG2G3List(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 전이학습 데이터셋 G2, G3 목록
|
* 전이학습 데이터셋 G2, G3 목록
|
||||||
*
|
*
|
||||||
@@ -327,6 +337,8 @@ public class ModelTrainMngCoreService {
|
|||||||
return datasetRepository.getDatasetTransferSelectG2G3List(modelId, modelNo);
|
return datasetRepository.getDatasetTransferSelectG2G3List(modelId, modelNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 모델관리 조회
|
* 모델관리 조회
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.postgres.core;
|
package com.kamco.cd.training.postgres.core;
|
||||||
|
|
||||||
import com.kamco.cd.training.postgres.entity.SystemMetricsEntity;
|
import com.kamco.cd.training.postgres.entity.SystemMetricsEntity;
|
||||||
@@ -64,3 +65,4 @@ public class SystemMetricsCoreService {
|
|||||||
return isAvailable;
|
return isAvailable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -117,10 +117,12 @@ public class DatasetEntity {
|
|||||||
@Column(name = "dataset_path", length = 1000)
|
@Column(name = "dataset_path", length = 1000)
|
||||||
private String datasetPath;
|
private String datasetPath;
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Column(name = "class_counts")
|
@Column(name = "class_counts")
|
||||||
@JdbcTypeCode(SqlTypes.JSON)
|
@JdbcTypeCode(SqlTypes.JSON)
|
||||||
private Map<String, Integer> classCounts;
|
private Map<String, Integer> classCounts;
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
@Size(max = 32)
|
@Size(max = 32)
|
||||||
@Column(name = "uid")
|
@Column(name = "uid")
|
||||||
private String uid;
|
private String uid;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.postgres.entity;
|
package com.kamco.cd.training.postgres.entity;
|
||||||
|
|
||||||
import com.kamco.cd.training.dataset.dto.MapSheetDto;
|
import com.kamco.cd.training.dataset.dto.MapSheetDto;
|
||||||
@@ -103,3 +104,4 @@ public class MapSheetEntity {
|
|||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -32,10 +32,13 @@ public class ModelDatasetMappEntity {
|
|||||||
@Column(name = "dataset_uid", nullable = false)
|
@Column(name = "dataset_uid", nullable = false)
|
||||||
private Long datasetUid;
|
private Long datasetUid;
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Size(max = 20)
|
@Size(max = 20)
|
||||||
@Column(name = "dataset_type", length = 20)
|
@Column(name = "dataset_type", length = 20)
|
||||||
private String datasetType;
|
private String datasetType;
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.postgres.entity;
|
package com.kamco.cd.training.postgres.entity;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
@@ -92,3 +93,4 @@ public class ModelMngEntity {
|
|||||||
return this.uuid != null ? this.uuid.toString() : null;
|
return this.uuid != null ? this.uuid.toString() : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.postgres.entity;
|
package com.kamco.cd.training.postgres.entity;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
@@ -53,3 +54,4 @@ public class SystemMetricsEntity {
|
|||||||
@Column(name = "memused")
|
@Column(name = "memused")
|
||||||
private Float memused;
|
private Float memused;
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.postgres.repository;
|
package com.kamco.cd.training.postgres.repository;
|
||||||
|
|
||||||
import com.kamco.cd.training.postgres.entity.SystemMetricsEntity;
|
import com.kamco.cd.training.postgres.entity.SystemMetricsEntity;
|
||||||
@@ -17,3 +18,4 @@ public interface SystemMetricsRepository extends JpaRepository<SystemMetricsEnti
|
|||||||
@Query("SELECT s FROM SystemMetricsEntity s ORDER BY s.timestamp DESC LIMIT 1")
|
@Query("SELECT s FROM SystemMetricsEntity s ORDER BY s.timestamp DESC LIMIT 1")
|
||||||
Optional<SystemMetricsEntity> findLatestMetrics();
|
Optional<SystemMetricsEntity> findLatestMetrics();
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
|||||||
|
|
||||||
public interface DatasetRepository
|
public interface DatasetRepository
|
||||||
extends JpaRepository<DatasetEntity, Long>, DatasetRepositoryCustom {
|
extends JpaRepository<DatasetEntity, Long>, DatasetRepositoryCustom {
|
||||||
|
// TODO 미사용시작
|
||||||
List<DatasetEntity> findByDeletedOrderByCreatedDttmDesc(Boolean deleted);
|
List<DatasetEntity> findByDeletedOrderByCreatedDttmDesc(Boolean deleted);
|
||||||
|
// TODO 미사용 끝
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,10 +18,13 @@ public interface DatasetRepositoryCustom {
|
|||||||
|
|
||||||
List<SelectDataSet> getDatasetSelectG1List(DatasetReq req);
|
List<SelectDataSet> getDatasetSelectG1List(DatasetReq req);
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
public List<SelectTransferDataSet> getDatasetTransferSelectG1List(Long modelId);
|
public List<SelectTransferDataSet> getDatasetTransferSelectG1List(Long modelId);
|
||||||
|
|
||||||
public List<SelectTransferDataSet> getDatasetTransferSelectG2G3List(Long modelId, String modelNo);
|
public List<SelectTransferDataSet> getDatasetTransferSelectG2G3List(Long modelId, String modelNo);
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
List<SelectDataSet> getDatasetSelectG2G3List(DatasetReq req);
|
List<SelectDataSet> getDatasetSelectG2G3List(DatasetReq req);
|
||||||
|
|
||||||
Long getDatasetMaxStage(int compareYyyy, int targetYyyy);
|
Long getDatasetMaxStage(int compareYyyy, int targetYyyy);
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
|
|||||||
.fetch();
|
.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Override
|
@Override
|
||||||
public List<SelectTransferDataSet> getDatasetTransferSelectG1List(Long modelId) {
|
public List<SelectTransferDataSet> getDatasetTransferSelectG1List(Long modelId) {
|
||||||
|
|
||||||
@@ -247,6 +248,7 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
|
|||||||
.fetch();
|
.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
@Override
|
@Override
|
||||||
public List<SelectDataSet> getDatasetSelectG2G3List(DatasetReq req) {
|
public List<SelectDataSet> getDatasetSelectG2G3List(DatasetReq req) {
|
||||||
|
|
||||||
@@ -311,6 +313,7 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
|
|||||||
.fetch();
|
.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Override
|
@Override
|
||||||
public List<SelectTransferDataSet> getDatasetTransferSelectG2G3List(
|
public List<SelectTransferDataSet> getDatasetTransferSelectG2G3List(
|
||||||
Long modelId, String modelNo) {
|
Long modelId, String modelNo) {
|
||||||
@@ -421,6 +424,8 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
|
|||||||
.fetch();
|
.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long getDatasetMaxStage(int compareYyyy, int targetYyyy) {
|
public Long getDatasetMaxStage(int compareYyyy, int targetYyyy) {
|
||||||
return queryFactory
|
return queryFactory
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.postgres.repository.dataset;
|
package com.kamco.cd.training.postgres.repository.dataset;
|
||||||
|
|
||||||
import com.kamco.cd.training.postgres.entity.MapSheetEntity;
|
import com.kamco.cd.training.postgres.entity.MapSheetEntity;
|
||||||
@@ -11,3 +12,4 @@ public interface MapSheetRepository
|
|||||||
|
|
||||||
long countByDatasetIdAndDeletedFalse(Long datasetId);
|
long countByDatasetIdAndDeletedFalse(Long datasetId);
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.postgres.repository.dataset;
|
package com.kamco.cd.training.postgres.repository.dataset;
|
||||||
|
|
||||||
import com.kamco.cd.training.dataset.dto.MapSheetDto;
|
import com.kamco.cd.training.dataset.dto.MapSheetDto;
|
||||||
@@ -7,3 +8,4 @@ import org.springframework.data.domain.Page;
|
|||||||
public interface MapSheetRepositoryCustom {
|
public interface MapSheetRepositoryCustom {
|
||||||
Page<MapSheetEntity> findMapSheetList(MapSheetDto.SearchReq searchReq);
|
Page<MapSheetEntity> findMapSheetList(MapSheetDto.SearchReq searchReq);
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// TODO 미사용시작
|
||||||
package com.kamco.cd.training.postgres.repository.dataset;
|
package com.kamco.cd.training.postgres.repository.dataset;
|
||||||
|
|
||||||
import com.kamco.cd.training.dataset.dto.MapSheetDto;
|
import com.kamco.cd.training.dataset.dto.MapSheetDto;
|
||||||
@@ -52,3 +53,4 @@ public class MapSheetRepositoryImpl implements MapSheetRepositoryCustom {
|
|||||||
return new PageImpl<>(content, pageable, total);
|
return new PageImpl<>(content, pageable, total);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|||||||
@@ -8,5 +8,7 @@ import org.springframework.stereotype.Repository;
|
|||||||
@Repository
|
@Repository
|
||||||
public interface HyperParamRepository
|
public interface HyperParamRepository
|
||||||
extends JpaRepository<ModelHyperParamEntity, Long>, HyperParamRepositoryCustom {
|
extends JpaRepository<ModelHyperParamEntity, Long>, HyperParamRepositoryCustom {
|
||||||
|
// TODO 미사용시작
|
||||||
Optional<ModelHyperParamEntity> findByHyperVer(String hyperVer);
|
Optional<ModelHyperParamEntity> findByHyperVer(String hyperVer);
|
||||||
|
// TODO 미사용 끝
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import org.springframework.data.domain.Page;
|
|||||||
|
|
||||||
public interface HyperParamRepositoryCustom {
|
public interface HyperParamRepositoryCustom {
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 마지막 버전 조회
|
* 마지막 버전 조회
|
||||||
*
|
*
|
||||||
@@ -19,6 +20,8 @@ public interface HyperParamRepositoryCustom {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
Optional<ModelHyperParamEntity> findHyperParamVer();
|
Optional<ModelHyperParamEntity> findHyperParamVer();
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 모델 타입별 마지막 버전 조회
|
* 모델 타입별 마지막 버전 조회
|
||||||
*
|
*
|
||||||
@@ -27,8 +30,11 @@ public interface HyperParamRepositoryCustom {
|
|||||||
*/
|
*/
|
||||||
Optional<ModelHyperParamEntity> findHyperParamVerByModelType(ModelType modelType);
|
Optional<ModelHyperParamEntity> findHyperParamVerByModelType(ModelType modelType);
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
Optional<ModelHyperParamEntity> findHyperParamByHyperVer(String hyperVer);
|
Optional<ModelHyperParamEntity> findHyperParamByHyperVer(String hyperVer);
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 하이퍼 파라미터 상세조회
|
* 하이퍼 파라미터 상세조회
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public class HyperParamRepositoryImpl implements HyperParamRepositoryCustom {
|
|||||||
|
|
||||||
private final JPAQueryFactory queryFactory;
|
private final JPAQueryFactory queryFactory;
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Override
|
@Override
|
||||||
public Optional<ModelHyperParamEntity> findHyperParamVer() {
|
public Optional<ModelHyperParamEntity> findHyperParamVer() {
|
||||||
|
|
||||||
@@ -42,6 +43,8 @@ public class HyperParamRepositoryImpl implements HyperParamRepositoryCustom {
|
|||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<ModelHyperParamEntity> findHyperParamVerByModelType(ModelType modelType) {
|
public Optional<ModelHyperParamEntity> findHyperParamVerByModelType(ModelType modelType) {
|
||||||
|
|
||||||
@@ -59,6 +62,7 @@ public class HyperParamRepositoryImpl implements HyperParamRepositoryCustom {
|
|||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Override
|
@Override
|
||||||
public Optional<ModelHyperParamEntity> findHyperParamByHyperVer(String hyperVer) {
|
public Optional<ModelHyperParamEntity> findHyperParamByHyperVer(String hyperVer) {
|
||||||
|
|
||||||
@@ -75,6 +79,8 @@ public class HyperParamRepositoryImpl implements HyperParamRepositoryCustom {
|
|||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<ModelHyperParamEntity> findHyperParamByUuid(UUID uuid) {
|
public Optional<ModelHyperParamEntity> findHyperParamByUuid(UUID uuid) {
|
||||||
return Optional.ofNullable(
|
return Optional.ofNullable(
|
||||||
|
|||||||
@@ -7,14 +7,18 @@ import java.util.UUID;
|
|||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
|
|
||||||
public interface MembersRepositoryCustom {
|
public interface MembersRepositoryCustom {
|
||||||
|
// TODO 미사용시작
|
||||||
boolean existsByUserId(String userId);
|
boolean existsByUserId(String userId);
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
boolean existsByEmployeeNo(String employeeNo);
|
boolean existsByEmployeeNo(String employeeNo);
|
||||||
|
|
||||||
Optional<MemberEntity> findByEmployeeNo(String employeeNo);
|
Optional<MemberEntity> findByEmployeeNo(String employeeNo);
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
Optional<MemberEntity> findByUserId(String userId);
|
Optional<MemberEntity> findByUserId(String userId);
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
Optional<MemberEntity> findByUUID(UUID uuid);
|
Optional<MemberEntity> findByUUID(UUID uuid);
|
||||||
|
|
||||||
Page<MemberEntity> findByMembers(MembersDto.SearchReq searchReq);
|
Page<MemberEntity> findByMembers(MembersDto.SearchReq searchReq);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public class MembersRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
this.queryFactory = queryFactory;
|
this.queryFactory = queryFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 사용자 ID 조회
|
* 사용자 ID 조회
|
||||||
*
|
*
|
||||||
@@ -43,6 +44,8 @@ public class MembersRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
!= null;
|
!= null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 사번 조회
|
* 사용자 사번 조회
|
||||||
*
|
*
|
||||||
@@ -59,6 +62,7 @@ public class MembersRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
!= null;
|
!= null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* 사용자 조회 user id
|
* 사용자 조회 user id
|
||||||
*
|
*
|
||||||
@@ -71,6 +75,8 @@ public class MembersRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
queryFactory.selectFrom(memberEntity).where(memberEntity.userId.eq(userId)).fetchOne());
|
queryFactory.selectFrom(memberEntity).where(memberEntity.userId.eq(userId)).fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 조회 employeed no
|
* 사용자 조회 employeed no
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -6,5 +6,7 @@ import java.util.Optional;
|
|||||||
public interface ModelConfigRepositoryCustom {
|
public interface ModelConfigRepositoryCustom {
|
||||||
Optional<ModelConfigDto.Basic> findModelConfigByModelId(Long modelId);
|
Optional<ModelConfigDto.Basic> findModelConfigByModelId(Long modelId);
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
Optional<ModelConfigDto.TransferBasic> findModelTransferConfigByModelId(Long modelId);
|
Optional<ModelConfigDto.TransferBasic> findModelTransferConfigByModelId(Long modelId);
|
||||||
|
// TODO 미사용 끝
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public class ModelConfigRepositoryImpl implements ModelConfigRepositoryCustom {
|
|||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Override
|
@Override
|
||||||
public Optional<TransferBasic> findModelTransferConfigByModelId(Long modelId) {
|
public Optional<TransferBasic> findModelTransferConfigByModelId(Long modelId) {
|
||||||
QModelConfigEntity beforeConfig = new QModelConfigEntity("beforeConfig");
|
QModelConfigEntity beforeConfig = new QModelConfigEntity("beforeConfig");
|
||||||
@@ -78,4 +79,5 @@ public class ModelConfigRepositoryImpl implements ModelConfigRepositoryCustom {
|
|||||||
.where(modelMasterEntity.id.eq(modelId))
|
.where(modelMasterEntity.id.eq(modelId))
|
||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,11 @@ public interface ModelDetailRepositoryCustom {
|
|||||||
|
|
||||||
HyperSummary getByModelHyperParamSummary(UUID uuid);
|
HyperSummary getByModelHyperParamSummary(UUID uuid);
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
TransferHyperSummary getByModelTransferHyperParamSummary(UUID uuid);
|
TransferHyperSummary getByModelTransferHyperParamSummary(UUID uuid);
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
List<MappingDataset> getByModelMappingDataset(UUID uuid);
|
List<MappingDataset> getByModelMappingDataset(UUID uuid);
|
||||||
|
|
||||||
ModelMasterEntity findByModelByUUID(UUID uuid);
|
ModelMasterEntity findByModelByUUID(UUID uuid);
|
||||||
|
|||||||
@@ -20,8 +20,11 @@ public interface ModelMngRepositoryCustom {
|
|||||||
|
|
||||||
Optional<ModelMasterEntity> findByUuid(UUID uuid);
|
Optional<ModelMasterEntity> findByUuid(UUID uuid);
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
Optional<ModelMasterEntity> findFirstByStatusCdAndDelYn(String statusCd, Boolean delYn);
|
Optional<ModelMasterEntity> findFirstByStatusCdAndDelYn(String statusCd, Boolean delYn);
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
TrainRunRequest findTrainRunRequest(Long modelId);
|
TrainRunRequest findTrainRunRequest(Long modelId);
|
||||||
|
|
||||||
Long findModelStep1InProgressCnt();
|
Long findModelStep1InProgressCnt();
|
||||||
|
|||||||
@@ -133,11 +133,14 @@ public class ModelMngRepositoryImpl implements ModelMngRepositoryCustom {
|
|||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Override
|
@Override
|
||||||
public Optional<ModelMasterEntity> findFirstByStatusCdAndDelYn(String statusCd, Boolean delYn) {
|
public Optional<ModelMasterEntity> findFirstByStatusCdAndDelYn(String statusCd, Boolean delYn) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TrainRunRequest findTrainRunRequest(Long modelId) {
|
public TrainRunRequest findTrainRunRequest(Long modelId) {
|
||||||
return queryFactory
|
return queryFactory
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ import org.springframework.stereotype.Service;
|
|||||||
public class DataSetCountersService {
|
public class DataSetCountersService {
|
||||||
private final ModelTrainMngCoreService modelTrainMngCoreService;
|
private final ModelTrainMngCoreService modelTrainMngCoreService;
|
||||||
|
|
||||||
@Value("${train.docker.requestDir}")
|
@Value("${train.docker.request_dir}")
|
||||||
private String requestDir;
|
private String requestDir;
|
||||||
|
|
||||||
@Value("${train.docker.basePath}")
|
@Value("${train.docker.symbolic_link_dir}")
|
||||||
private String trainBaseDir;
|
private String symbolicDir;
|
||||||
|
|
||||||
public String getCount(Long modelId) {
|
public String getCount(Long modelId) {
|
||||||
ModelTrainMngDto.Basic basic = modelTrainMngCoreService.findModelById(modelId);
|
ModelTrainMngDto.Basic basic = modelTrainMngCoreService.findModelById(modelId);
|
||||||
@@ -45,7 +45,7 @@ public class DataSetCountersService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// tmp
|
// tmp
|
||||||
Path tmpPath = Path.of(trainBaseDir, "tmp", basic.getRequestPath());
|
Path tmpPath = Path.of(symbolicDir, basic.getRequestPath());
|
||||||
|
|
||||||
// 차이나는거
|
// 차이나는거
|
||||||
diffMergedRequestsVsTmp(uids, tmpPath);
|
diffMergedRequestsVsTmp(uids, tmpPath);
|
||||||
|
|||||||
@@ -31,27 +31,26 @@ public class DockerTrainService {
|
|||||||
private String image;
|
private String image;
|
||||||
|
|
||||||
// 학습 요청 데이터가 위치한 호스트 디렉토리
|
// 학습 요청 데이터가 위치한 호스트 디렉토리
|
||||||
@Value("${train.docker.requestDir}")
|
@Value("${train.docker.request_dir}")
|
||||||
private String requestDir;
|
private String requestDir;
|
||||||
|
|
||||||
// 학습 결과가 저장될 호스트 디렉토리
|
// 학습 결과가 저장될 호스트 디렉토리
|
||||||
@Value("${train.docker.responseDir}")
|
@Value("${train.docker.response_dir}")
|
||||||
private String responseDir;
|
private String responseDir;
|
||||||
|
|
||||||
// 컨테이너 이름 prefix
|
|
||||||
@Value("${train.docker.containerPrefix}")
|
|
||||||
private String containerPrefix;
|
|
||||||
|
|
||||||
// 공유메모리 사이즈 설정 (대용량 학습시 필요)
|
// 공유메모리 사이즈 설정 (대용량 학습시 필요)
|
||||||
@Value("${train.docker.shmSize:16g}")
|
@Value("${train.docker.shm_size:16g}")
|
||||||
private String shmSize;
|
private String shmSize;
|
||||||
|
|
||||||
// data 경로 request,response 상위 폴더
|
// data 경로 request,response 상위 폴더
|
||||||
@Value("${train.docker.basePath}")
|
@Value("${train.docker.base_path}")
|
||||||
private String basePath;
|
private String basePath;
|
||||||
|
|
||||||
|
@Value("${train.docker.symbolic_link_dir}")
|
||||||
|
private String symbolicDir;
|
||||||
|
|
||||||
// IPC host 사용 여부
|
// IPC host 사용 여부
|
||||||
@Value("${train.docker.ipcHost:true}")
|
@Value("${train.docker.ipc_host:true}")
|
||||||
private boolean ipcHost;
|
private boolean ipcHost;
|
||||||
|
|
||||||
@Value("${spring.profiles.active}")
|
@Value("${spring.profiles.active}")
|
||||||
@@ -263,9 +262,9 @@ public class DockerTrainService {
|
|||||||
c.add("-v");
|
c.add("-v");
|
||||||
c.add(basePath + ":" + basePath); // 심볼릭 링크와 연결되는 실제 파일 경로도 마운트를 해줘야 함
|
c.add(basePath + ":" + basePath); // 심볼릭 링크와 연결되는 실제 파일 경로도 마운트를 해줘야 함
|
||||||
c.add("-v");
|
c.add("-v");
|
||||||
c.add(basePath + "/tmp:/data");
|
c.add(symbolicDir + ":/data"); //요청할경로
|
||||||
c.add("-v");
|
c.add("-v");
|
||||||
c.add(responseDir + ":/checkpoints");
|
c.add(responseDir + ":/checkpoints"); //저장될경로
|
||||||
|
|
||||||
// 표준입력 유지 (-it 대신 -i만 사용)
|
// 표준입력 유지 (-it 대신 -i만 사용)
|
||||||
c.add("-i");
|
c.add("-i");
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class JobRecoveryOnStartupService {
|
|||||||
*
|
*
|
||||||
* <p>컨테이너가 --rm 으로 삭제된 경우에도 이 경로에 val.csv / *.pth 등이 남아있으면 정상 종료 여부를 "파일 기반"으로 판정합니다.
|
* <p>컨테이너가 --rm 으로 삭제된 경우에도 이 경로에 val.csv / *.pth 등이 남아있으면 정상 종료 여부를 "파일 기반"으로 판정합니다.
|
||||||
*/
|
*/
|
||||||
@Value("${train.docker.responseDir}")
|
@Value("${train.docker.response_dir}")
|
||||||
private String responseDir;
|
private String responseDir;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class ModelTestMetricsJobService {
|
|||||||
private String profile;
|
private String profile;
|
||||||
|
|
||||||
// 학습 결과가 저장될 호스트 디렉토리
|
// 학습 결과가 저장될 호스트 디렉토리
|
||||||
@Value("${train.docker.responseDir}")
|
@Value("${train.docker.response_dir}")
|
||||||
private String responseDir;
|
private String responseDir;
|
||||||
|
|
||||||
@Value("${file.pt-path}")
|
@Value("${file.pt-path}")
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class ModelTrainMetricsJobService {
|
|||||||
private String profile;
|
private String profile;
|
||||||
|
|
||||||
// 학습 결과가 저장될 호스트 디렉토리
|
// 학습 결과가 저장될 호스트 디렉토리
|
||||||
@Value("${train.docker.responseDir}")
|
@Value("${train.docker.response_dir}")
|
||||||
private String responseDir;
|
private String responseDir;
|
||||||
|
|
||||||
/** 결과 csv 파일 정보 등록 */
|
/** 결과 csv 파일 정보 등록 */
|
||||||
|
|||||||
@@ -14,12 +14,11 @@ import org.springframework.stereotype.Service;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class TmpDatasetService {
|
public class TmpDatasetService {
|
||||||
|
|
||||||
@Value("${train.docker.requestDir}")
|
@Value("${train.docker.request_dir}")
|
||||||
private String requestDir;
|
private String requestDir;
|
||||||
|
|
||||||
@Value("${train.docker.basePath}")
|
@Value("${train.docker.symbolic_link_dir}")
|
||||||
private String trainBaseDir;
|
private String symbolicDir;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* train, val, test 폴더별로 link
|
* train, val, test 폴더별로 link
|
||||||
*
|
*
|
||||||
@@ -36,7 +35,7 @@ public class TmpDatasetService {
|
|||||||
throw new IOException("links is empty");
|
throw new IOException("links is empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
Path tmp = Path.of(trainBaseDir, "tmp", uid);
|
Path tmp = Path.of(symbolicDir, uid);
|
||||||
|
|
||||||
long linksMade = 0;
|
long linksMade = 0;
|
||||||
|
|
||||||
@@ -98,6 +97,7 @@ public class TmpDatasetService {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
/**
|
/**
|
||||||
* request 전체 폴더 link
|
* request 전체 폴더 link
|
||||||
*
|
*
|
||||||
@@ -114,7 +114,7 @@ public class TmpDatasetService {
|
|||||||
log.info("requestDir(raw)={}", requestDir);
|
log.info("requestDir(raw)={}", requestDir);
|
||||||
|
|
||||||
Path BASE = toPath(requestDir);
|
Path BASE = toPath(requestDir);
|
||||||
Path tmp = Path.of(trainBaseDir, "tmp", uid);
|
Path tmp = Path.of(symbolicDir, uid);
|
||||||
|
|
||||||
log.info("BASE={}", BASE);
|
log.info("BASE={}", BASE);
|
||||||
log.info("BASE exists? {}", Files.isDirectory(BASE));
|
log.info("BASE exists? {}", Files.isDirectory(BASE));
|
||||||
@@ -210,4 +210,5 @@ public class TmpDatasetService {
|
|||||||
}
|
}
|
||||||
return Paths.get(p).toAbsolutePath().normalize();
|
return Paths.get(p).toAbsolutePath().normalize();
|
||||||
}
|
}
|
||||||
|
// TODO 미사용 끝
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class TrainJobService {
|
|||||||
private final DataSetCountersService dataSetCounters;
|
private final DataSetCountersService dataSetCounters;
|
||||||
|
|
||||||
// 학습 결과가 저장될 호스트 디렉토리
|
// 학습 결과가 저장될 호스트 디렉토리
|
||||||
@Value("${train.docker.responseDir}")
|
@Value("${train.docker.response_dir}")
|
||||||
private String responseDir;
|
private String responseDir;
|
||||||
|
|
||||||
public Long getModelIdByUuid(UUID uuid) {
|
public Long getModelIdByUuid(UUID uuid) {
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ public class UploadDto {
|
|||||||
private UUID uuid;
|
private UUID uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Schema(name = "UploadCompleteReq", description = "업로드 완료 요청")
|
@Schema(name = "UploadCompleteReq", description = "업로드 완료 요청")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -126,12 +127,15 @@ public class UploadDto {
|
|||||||
@Schema(description = "상태", example = "UPLOADING")
|
@Schema(description = "상태", example = "UPLOADING")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Schema(description = "총 청크 수", example = "100")
|
@Schema(description = "총 청크 수", example = "100")
|
||||||
private Integer totalChunks;
|
private Integer totalChunks;
|
||||||
|
|
||||||
@Schema(description = "업로드된 청크 수", example = "50")
|
@Schema(description = "업로드된 청크 수", example = "50")
|
||||||
private Integer uploadedChunks;
|
private Integer uploadedChunks;
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Schema(description = "진행률 (%)", example = "50.0")
|
@Schema(description = "진행률 (%)", example = "50.0")
|
||||||
private Double progress;
|
private Double progress;
|
||||||
|
|
||||||
@@ -139,6 +143,8 @@ public class UploadDto {
|
|||||||
private String errorMessage;
|
private String errorMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Schema(name = "UploadAddReq", description = "업로드 요청")
|
@Schema(name = "UploadAddReq", description = "업로드 요청")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|||||||
@@ -26,27 +26,21 @@ public class UploadService {
|
|||||||
|
|
||||||
private final UploadSessionCoreService uploadSessionCoreService;
|
private final UploadSessionCoreService uploadSessionCoreService;
|
||||||
|
|
||||||
@Value("${file.sync-root-dir}")
|
|
||||||
private String syncRootDir;
|
|
||||||
|
|
||||||
@Value("${file.sync-tmp-dir}")
|
|
||||||
private String syncTmpDir;
|
|
||||||
|
|
||||||
@Value("${file.sync-file-extention}")
|
|
||||||
private String syncFileExtention;
|
|
||||||
|
|
||||||
@Value("${file.dataset-dir}")
|
@Value("${file.dataset-dir}")
|
||||||
private String datasetDir;
|
private String datasetDir;
|
||||||
|
|
||||||
@Value("${file.dataset-tmp-dir}")
|
@Value("${file.dataset-tmp-dir}")
|
||||||
private String datasetTmpDir;
|
private String datasetTmpDir;
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Transactional
|
@Transactional
|
||||||
public DmlReturn initUpload(UploadDto.InitReq initReq) {
|
public DmlReturn initUpload(UploadDto.InitReq initReq) {
|
||||||
|
|
||||||
return new DmlReturn("success", "UPLOAD CHUNK INIT");
|
return new DmlReturn("success", "UPLOAD CHUNK INIT");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public UploadDto.UploadRes uploadChunk(UploadDto.UploadAddReq upAddReqDto, MultipartFile file) {
|
public UploadDto.UploadRes uploadChunk(UploadDto.UploadAddReq upAddReqDto, MultipartFile file) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,72 +1,49 @@
|
|||||||
spring:
|
spring:
|
||||||
config:
|
config:
|
||||||
activate:
|
activate:
|
||||||
on-profile: dev
|
on-profile: dev
|
||||||
|
|
||||||
jpa:
|
jpa:
|
||||||
show-sql: true
|
show-sql: true
|
||||||
hibernate:
|
properties:
|
||||||
ddl-auto: validate
|
hibernate:
|
||||||
properties:
|
use_sql_comments: true # ⚠️ 선택 - SQL에 주석 추가 (디버깅용)
|
||||||
hibernate:
|
format_sql: true # ⚠️ 선택 - SQL 포맷팅 (가독성)
|
||||||
default_batch_fetch_size: 100 # ✅ 성능 - N+1 쿼리 방지
|
|
||||||
order_updates: true # ✅ 성능 - 업데이트 순서 정렬로 데드락 방지
|
datasource:
|
||||||
use_sql_comments: true # ⚠️ 선택 - SQL에 주석 추가 (디버깅용)
|
url: jdbc:postgresql://192.168.2.127:15432/kamco_training_db
|
||||||
format_sql: true # ⚠️ 선택 - SQL 포맷팅 (가독성)
|
username: kamco_training_user
|
||||||
|
password: kamco_training_user_2025_!@#
|
||||||
datasource:
|
hikari:
|
||||||
url: jdbc:postgresql://192.168.2.127:15432/kamco_training_db
|
minimum-idle: 10
|
||||||
username: kamco_training_user
|
maximum-pool-size: 20
|
||||||
password: kamco_training_user_2025_!@#
|
|
||||||
hikari:
|
jwt:
|
||||||
minimum-idle: 10
|
secret: "kamco_token_dev_dfc6446d-68fc-4eba-a2ff-c80a14a0bf3a"
|
||||||
maximum-pool-size: 20
|
access-token-validity-in-ms: 86400000 # 1일
|
||||||
connection-timeout: 60000 # 60초 연결 타임아웃
|
refresh-token-validity-in-ms: 604800000 # 7일
|
||||||
idle-timeout: 300000 # 5분 유휴 타임아웃
|
|
||||||
max-lifetime: 1800000 # 30분 최대 수명
|
token:
|
||||||
leak-detection-threshold: 60000 # 연결 누수 감지
|
refresh-cookie-name: kamco-dev # 개발용 쿠키 이름
|
||||||
|
refresh-cookie-secure: false # 로컬 http 테스트면 false
|
||||||
transaction:
|
|
||||||
default-timeout: 300 # 5분 트랜잭션 타임아웃
|
swagger:
|
||||||
|
local-port: 8080
|
||||||
|
|
||||||
jwt:
|
file:
|
||||||
secret: "kamco_token_dev_dfc6446d-68fc-4eba-a2ff-c80a14a0bf3a"
|
dataset-dir: /home/kcomu/data/request/
|
||||||
access-token-validity-in-ms: 86400000 # 1일
|
dataset-tmp-dir: ${file.dataset-dir}tmp/
|
||||||
refresh-token-validity-in-ms: 604800000 # 7일
|
|
||||||
|
pt-path: /home/kcomu/data/response/v6-cls-checkpoints/
|
||||||
token:
|
pt-FileName: yolov8_6th-6m.pt
|
||||||
refresh-cookie-name: kamco-dev # 개발용 쿠키 이름
|
|
||||||
refresh-cookie-secure: false # 로컬 http 테스트면 false
|
train:
|
||||||
|
docker:
|
||||||
springdoc:
|
image: kamco-cd-train:latest
|
||||||
swagger-ui:
|
base_path: /home/kcomu/data
|
||||||
persist-authorization: true # 스웨거 새로고침해도 토큰 유지, 로컬스토리지에 저장
|
request_dir: ${train.docker.base_path}/request
|
||||||
|
response_dir: ${train.docker.base_path}/response
|
||||||
member:
|
symbolic_link_dir: ${train.docker.base_path}/tmp
|
||||||
init_password: kamco1234!
|
container_prefix: kamco-cd-train
|
||||||
|
shm_size: 16g
|
||||||
swagger:
|
ipc_host: true
|
||||||
local-port: 8080
|
|
||||||
|
|
||||||
file:
|
|
||||||
sync-root-dir: /app/original-images/
|
|
||||||
sync-tmp-dir: ${file.sync-root-dir}tmp/
|
|
||||||
sync-file-extention: tfw,tif
|
|
||||||
|
|
||||||
dataset-dir: /home/kcomu/data/request/
|
|
||||||
dataset-tmp-dir: ${file.dataset-dir}tmp/
|
|
||||||
|
|
||||||
pt-path: /home/kcomu/data/response/v6-cls-checkpoints/
|
|
||||||
pt-FileName: yolov8_6th-6m.pt
|
|
||||||
|
|
||||||
train:
|
|
||||||
docker:
|
|
||||||
image: kamco-cd-train:latest
|
|
||||||
requestDir: /home/kcomu/data/request
|
|
||||||
responseDir: /home/kcomu/data/response
|
|
||||||
basePath: /home/kcomu/data
|
|
||||||
containerPrefix: kamco-cd-train
|
|
||||||
shmSize: 16g
|
|
||||||
ipcHost: true
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,72 +1,43 @@
|
|||||||
spring:
|
spring:
|
||||||
config:
|
config:
|
||||||
activate:
|
activate:
|
||||||
on-profile: prod
|
on-profile: prod
|
||||||
|
|
||||||
jpa:
|
datasource:
|
||||||
show-sql: false # 운영 환경에서는 성능을 위해 비활성화
|
url: jdbc:postgresql://kamco-cd-train-db:5432/kamco_training_db
|
||||||
hibernate:
|
username: kamco_training_user
|
||||||
ddl-auto: validate
|
password: kamco_training_user_2025_!@#
|
||||||
properties:
|
hikari:
|
||||||
hibernate:
|
minimum-idle: 10
|
||||||
default_batch_fetch_size: 100 # N+1 쿼리 방지
|
maximum-pool-size: 20
|
||||||
order_updates: true # 업데이트 순서 정렬로 데드락 방지
|
|
||||||
|
jwt:
|
||||||
datasource:
|
# ⚠️ 운영 환경에서는 반드시 별도의 강력한 시크릿 키를 사용하세요
|
||||||
url: jdbc:postgresql://kamco-cd-train-db:5432/kamco_training_db
|
secret: "kamco_token_prod_CHANGE_THIS_TO_SECURE_SECRET_KEY"
|
||||||
username: kamco_training_user
|
access-token-validity-in-ms: 86400000 # 1일
|
||||||
password: kamco_training_user_2025_!@#
|
refresh-token-validity-in-ms: 604800000 # 7일
|
||||||
hikari:
|
|
||||||
minimum-idle: 10
|
token:
|
||||||
maximum-pool-size: 20
|
refresh-cookie-name: kamco
|
||||||
connection-timeout: 60000 # 60초 연결 타임아웃
|
refresh-cookie-secure: true # HTTPS 환경에서 필수
|
||||||
idle-timeout: 300000 # 5분 유휴 타임아웃
|
|
||||||
max-lifetime: 1800000 # 30분 최대 수명
|
swagger:
|
||||||
leak-detection-threshold: 60000 # 연결 누수 감지
|
local-port: 9080
|
||||||
|
|
||||||
transaction:
|
file:
|
||||||
default-timeout: 300 # 5분 트랜잭션 타임아웃
|
dataset-dir: /data/training/request/
|
||||||
|
dataset-tmp-dir: ${file.dataset-dir}tmp/
|
||||||
jwt:
|
|
||||||
# ⚠️ 운영 환경에서는 반드시 별도의 강력한 시크릿 키를 사용하세요
|
pt-path: /data/training/response/v6-cls-checkpoints/
|
||||||
secret: "kamco_token_prod_CHANGE_THIS_TO_SECURE_SECRET_KEY"
|
pt-FileName: yolov8_6th-6m.pt
|
||||||
access-token-validity-in-ms: 86400000 # 1일
|
|
||||||
refresh-token-validity-in-ms: 604800000 # 7일
|
train:
|
||||||
|
docker:
|
||||||
token:
|
image: kamco-cd-train:latest
|
||||||
refresh-cookie-name: kamco
|
base_path: /data/training
|
||||||
refresh-cookie-secure: true # HTTPS 환경에서 필수
|
request_dir: ${train.docker.base_path}/request
|
||||||
|
response_dir: ${train.docker.base_path}/response
|
||||||
springdoc:
|
symbolic_link_dir: ${train.docker.base_path}/tmp
|
||||||
swagger-ui:
|
container_prefix: kamco-cd-train
|
||||||
persist-authorization: true # 스웨거 새로고침해도 토큰 유지, 로컬스토리지에 저장
|
shm_size: 16g
|
||||||
|
ipc_host: true
|
||||||
member:
|
|
||||||
init_password: kamco1234!
|
|
||||||
|
|
||||||
swagger:
|
|
||||||
local-port: 9080
|
|
||||||
|
|
||||||
file:
|
|
||||||
sync-root-dir: /app/original-images/
|
|
||||||
sync-tmp-dir: ${file.sync-root-dir}tmp/
|
|
||||||
sync-file-extention: tfw,tif
|
|
||||||
|
|
||||||
dataset-dir: /home/kcomu/data/request/
|
|
||||||
dataset-tmp-dir: ${file.dataset-dir}tmp/
|
|
||||||
|
|
||||||
pt-path: /home/kcomu/data/response/v6-cls-checkpoints/
|
|
||||||
pt-FileName: yolov8_6th-6m.pt
|
|
||||||
|
|
||||||
train:
|
|
||||||
docker:
|
|
||||||
image: kamco-cd-train:latest
|
|
||||||
requestDir: /home/kcomu/data/request
|
|
||||||
responseDir: /home/kcomu/data/response
|
|
||||||
basePath: /home/kcomu/data
|
|
||||||
containerPrefix: kamco-cd-train
|
|
||||||
shmSize: 16g
|
|
||||||
ipcHost: true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,71 +1,80 @@
|
|||||||
server:
|
server:
|
||||||
port: 8080
|
port: 8080
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: kamco-training-api
|
name: kamco-training-api
|
||||||
profiles:
|
profiles:
|
||||||
active: dev # 사용할 프로파일 지정 (ex. dev, prod, test)
|
active: dev # 사용할 프로파일 지정 (ex. dev, prod, test)
|
||||||
|
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: org.postgresql.Driver
|
driver-class-name: org.postgresql.Driver
|
||||||
hikari:
|
hikari:
|
||||||
minimum-idle: 2
|
connection-timeout: 60000 # 60초 연결 타임아웃
|
||||||
maximum-pool-size: 2
|
idle-timeout: 300000 # 5분 유휴 타임아웃
|
||||||
connection-timeout: 20000
|
max-lifetime: 1800000 # 30분 최대 수명
|
||||||
idle-timeout: 300000
|
leak-detection-threshold: 60000 # 연결 누수 감지
|
||||||
max-lifetime: 1800000
|
# minimum-idle, maximum-pool-size 는 프로파일별 설정
|
||||||
leak-detection-threshold: 60000
|
|
||||||
|
jpa:
|
||||||
jpa:
|
hibernate:
|
||||||
hibernate:
|
ddl-auto: validate
|
||||||
ddl-auto: update # 스키마 자동 관리 활성화
|
properties:
|
||||||
properties:
|
hibernate:
|
||||||
hibernate:
|
jakarta:
|
||||||
javax:
|
persistence:
|
||||||
persistence:
|
validation:
|
||||||
validation:
|
mode: none
|
||||||
mode: none
|
jdbc:
|
||||||
jdbc:
|
batch_size: 50
|
||||||
batch_size: 50
|
default_batch_fetch_size: 100
|
||||||
default_batch_fetch_size: 100
|
order_updates: true
|
||||||
show-sql: false
|
show-sql: false
|
||||||
|
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
enabled: true
|
enabled: true
|
||||||
max-file-size: 10GB
|
max-file-size: 10GB
|
||||||
max-request-size: 10GB
|
max-request-size: 10GB
|
||||||
logging:
|
|
||||||
level:
|
transaction:
|
||||||
org:
|
default-timeout: 300 # 5분 트랜잭션 타임아웃
|
||||||
springframework:
|
|
||||||
web: INFO
|
logging:
|
||||||
security: INFO
|
level:
|
||||||
root: INFO
|
org:
|
||||||
|
springframework:
|
||||||
|
web: INFO
|
||||||
|
security: INFO
|
||||||
# actuator
|
root: INFO
|
||||||
management:
|
|
||||||
health:
|
springdoc:
|
||||||
readinessstate:
|
swagger-ui:
|
||||||
enabled: true
|
persist-authorization: true # 스웨거 새로고침해도 토큰 유지
|
||||||
livenessstate:
|
|
||||||
enabled: true
|
member:
|
||||||
diskspace:
|
init_password: kamco1234!
|
||||||
enabled: true
|
|
||||||
endpoint:
|
# actuator
|
||||||
health:
|
management:
|
||||||
probes:
|
health:
|
||||||
enabled: true
|
readinessstate:
|
||||||
show-details: when-authorized
|
enabled: true
|
||||||
endpoints:
|
livenessstate:
|
||||||
jmx:
|
enabled: true
|
||||||
exposure:
|
diskspace:
|
||||||
exclude: "*"
|
enabled: true
|
||||||
web:
|
endpoint:
|
||||||
base-path: /monitor
|
health:
|
||||||
exposure:
|
probes:
|
||||||
include:
|
enabled: true
|
||||||
- "health"
|
show-details: when-authorized
|
||||||
|
endpoints:
|
||||||
|
jmx:
|
||||||
|
exposure:
|
||||||
|
exclude: "*"
|
||||||
|
web:
|
||||||
|
base-path: /monitor
|
||||||
|
exposure:
|
||||||
|
include:
|
||||||
|
- "health"
|
||||||
|
|||||||
@@ -1,77 +1,74 @@
|
|||||||
server:
|
server:
|
||||||
port: 8080
|
port: 8080
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: kamco-training-api
|
name: kamco-training-api
|
||||||
|
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: org.postgresql.Driver
|
driver-class-name: org.postgresql.Driver
|
||||||
url: jdbc:postgresql://localhost:15432/kamco_training_db
|
url: jdbc:postgresql://localhost:15432/kamco_training_db
|
||||||
username: kamco_cds
|
username: kamco_cds
|
||||||
password: kamco_cds_Q!W@E#R$
|
password: kamco_cds_Q!W@E#R$
|
||||||
hikari:
|
hikari:
|
||||||
minimum-idle: 2
|
minimum-idle: 2
|
||||||
maximum-pool-size: 2
|
maximum-pool-size: 2
|
||||||
connection-timeout: 20000
|
connection-timeout: 20000
|
||||||
idle-timeout: 300000
|
idle-timeout: 300000
|
||||||
max-lifetime: 1800000
|
max-lifetime: 1800000
|
||||||
leak-detection-threshold: 60000
|
leak-detection-threshold: 60000
|
||||||
|
|
||||||
jpa:
|
jpa:
|
||||||
hibernate:
|
hibernate:
|
||||||
ddl-auto: none # 테스트 환경에서는 DDL 자동 생성/수정 비활성화
|
ddl-auto: none # 테스트 환경에서는 DDL 자동 생성/수정 비활성화
|
||||||
properties:
|
properties:
|
||||||
hibernate:
|
hibernate:
|
||||||
hbm2ddl:
|
jakarta:
|
||||||
auto: none
|
persistence:
|
||||||
javax:
|
validation:
|
||||||
persistence:
|
mode: none
|
||||||
validation:
|
jdbc:
|
||||||
mode: none
|
batch_size: 50
|
||||||
jdbc:
|
default_batch_fetch_size: 100
|
||||||
batch_size: 50
|
show-sql: false
|
||||||
default_batch_fetch_size: 100
|
|
||||||
show-sql: false
|
logging:
|
||||||
|
level:
|
||||||
logging:
|
org:
|
||||||
level:
|
springframework:
|
||||||
org:
|
web: DEBUG
|
||||||
springframework:
|
security: DEBUG
|
||||||
web: DEBUG
|
root: INFO
|
||||||
security: DEBUG
|
|
||||||
root: INFO
|
management:
|
||||||
|
health:
|
||||||
management:
|
readinessstate:
|
||||||
health:
|
enabled: true
|
||||||
readinessstate:
|
livenessstate:
|
||||||
enabled: true
|
enabled: true
|
||||||
livenessstate:
|
endpoint:
|
||||||
enabled: true
|
health:
|
||||||
endpoint:
|
probes:
|
||||||
health:
|
enabled: true
|
||||||
probes:
|
show-details: always
|
||||||
enabled: true
|
endpoints:
|
||||||
show-details: always
|
jmx:
|
||||||
endpoints:
|
exposure:
|
||||||
jmx:
|
exclude: "*"
|
||||||
exposure:
|
web:
|
||||||
exclude: "*"
|
base-path: /monitor
|
||||||
web:
|
exposure:
|
||||||
base-path: /monitor
|
include:
|
||||||
exposure:
|
- "health"
|
||||||
include:
|
|
||||||
- "health"
|
jwt:
|
||||||
|
secret: "test_secret_key_for_testing_purposes_only"
|
||||||
jwt:
|
access-token-validity-in-ms: 86400000
|
||||||
secret: "test_secret_key_for_testing_purposes_only"
|
refresh-token-validity-in-ms: 604800000
|
||||||
access-token-validity-in-ms: 86400000
|
|
||||||
refresh-token-validity-in-ms: 604800000
|
token:
|
||||||
|
refresh-cookie-name: kamco-test
|
||||||
token:
|
refresh-cookie-secure: false
|
||||||
refresh-cookie-name: kamco-test
|
|
||||||
refresh-cookie-secure: false
|
member:
|
||||||
|
init_password: test1234!
|
||||||
member:
|
|
||||||
init_password: test1234!
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user