Merge pull request '하이퍼 파라미터 최적값 조회 수정' (#20) from feat/training_260202 into develop

Reviewed-on: #20
This commit was merged in pull request #20.
This commit is contained in:
2026-02-05 15:22:56 +09:00
3 changed files with 22 additions and 4 deletions

View File

@@ -137,10 +137,10 @@ public class HyperParamCoreService {
* @return * @return
*/ */
public HyperParamDto.Basic getInitHyperParam() { public HyperParamDto.Basic getInitHyperParam() {
ModelHyperParamEntity entity = new ModelHyperParamEntity(); ModelHyperParamEntity entity =
entity.setUuid(null); hyperParamRepository
entity.setHyperVer(null); .findHyperParamByHyperVer("HPs_0001")
entity.setCreatedDttm(null); .orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND));
return entity.toDto(); return entity.toDto();
} }

View File

@@ -15,6 +15,8 @@ public interface HyperParamRepositoryCustom {
*/ */
Optional<ModelHyperParamEntity> findHyperParamVer(); Optional<ModelHyperParamEntity> findHyperParamVer();
Optional<ModelHyperParamEntity> findHyperParamByHyperVer(String hyperVer);
Optional<ModelHyperParamEntity> findHyperParamByUuid(UUID uuid); Optional<ModelHyperParamEntity> findHyperParamByUuid(UUID uuid);
Page<HyperParamDto.List> findByHyperVerList(HyperParamDto.SearchReq req); Page<HyperParamDto.List> findByHyperVerList(HyperParamDto.SearchReq req);

View File

@@ -41,6 +41,22 @@ public class HyperParamRepositoryImpl implements HyperParamRepositoryCustom {
.fetchOne()); .fetchOne());
} }
@Override
public Optional<ModelHyperParamEntity> findHyperParamByHyperVer(String hyperVer) {
return Optional.ofNullable(
queryFactory
.select(modelHyperParamEntity)
.from(modelHyperParamEntity)
.where(
modelHyperParamEntity
.delYn
.isFalse()
.and(modelHyperParamEntity.hyperVer.eq(hyperVer)))
.limit(1)
.fetchOne());
}
@Override @Override
public Optional<ModelHyperParamEntity> findHyperParamByUuid(UUID uuid) { public Optional<ModelHyperParamEntity> findHyperParamByUuid(UUID uuid) {
return Optional.ofNullable( return Optional.ofNullable(