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:
@@ -137,10 +137,10 @@ public class HyperParamCoreService {
|
||||
* @return
|
||||
*/
|
||||
public HyperParamDto.Basic getInitHyperParam() {
|
||||
ModelHyperParamEntity entity = new ModelHyperParamEntity();
|
||||
entity.setUuid(null);
|
||||
entity.setHyperVer(null);
|
||||
entity.setCreatedDttm(null);
|
||||
ModelHyperParamEntity entity =
|
||||
hyperParamRepository
|
||||
.findHyperParamByHyperVer("HPs_0001")
|
||||
.orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND));
|
||||
return entity.toDto();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ public interface HyperParamRepositoryCustom {
|
||||
*/
|
||||
Optional<ModelHyperParamEntity> findHyperParamVer();
|
||||
|
||||
Optional<ModelHyperParamEntity> findHyperParamByHyperVer(String hyperVer);
|
||||
|
||||
Optional<ModelHyperParamEntity> findHyperParamByUuid(UUID uuid);
|
||||
|
||||
Page<HyperParamDto.List> findByHyperVerList(HyperParamDto.SearchReq req);
|
||||
|
||||
@@ -41,6 +41,22 @@ public class HyperParamRepositoryImpl implements HyperParamRepositoryCustom {
|
||||
.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
|
||||
public Optional<ModelHyperParamEntity> findHyperParamByUuid(UUID uuid) {
|
||||
return Optional.ofNullable(
|
||||
|
||||
Reference in New Issue
Block a user