hyperparam_with_modeltype
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.kamco.cd.training.hyperparam;
|
||||
|
||||
import com.kamco.cd.training.common.dto.HyperParam;
|
||||
import com.kamco.cd.training.common.enums.ModelType;
|
||||
import com.kamco.cd.training.config.api.ApiResponseDto;
|
||||
import com.kamco.cd.training.hyperparam.dto.HyperParamDto;
|
||||
import com.kamco.cd.training.hyperparam.dto.HyperParamDto.List;
|
||||
@@ -65,7 +66,7 @@ public class HyperParamApiController {
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = String.class))),
|
||||
@ApiResponse(responseCode = "400", description = "잘못된 요청", content = @Content),
|
||||
@ApiResponse(responseCode = "422", description = "HPs_0001 수정 불가", content = @Content),
|
||||
@ApiResponse(responseCode = "422", description = "default는 삭제불가", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PutMapping("/{uuid}")
|
||||
@@ -87,8 +88,9 @@ public class HyperParamApiController {
|
||||
@ApiResponse(responseCode = "404", description = "하이퍼파라미터를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/list")
|
||||
@GetMapping("{model}/list")
|
||||
public ApiResponseDto<Page<List>> getHyperParam(
|
||||
@PathVariable ModelType model,
|
||||
@Parameter(
|
||||
description = "구분 CREATE_DATE(생성일), LAST_USED_DATE(최근사용일)",
|
||||
example = "CREATE_DATE")
|
||||
@@ -98,7 +100,7 @@ public class HyperParamApiController {
|
||||
LocalDate startDate,
|
||||
@Parameter(description = "종료일", example = "2026-02-28") @RequestParam(required = false)
|
||||
LocalDate endDate,
|
||||
@Parameter(description = "버전명", example = "HPs_0001") @RequestParam(required = false)
|
||||
@Parameter(description = "버전명", example = "G_000001") @RequestParam(required = false)
|
||||
String hyperVer,
|
||||
@Parameter(
|
||||
description = "정렬",
|
||||
@@ -124,7 +126,7 @@ public class HyperParamApiController {
|
||||
searchReq.setSort(sort);
|
||||
searchReq.setPage(page);
|
||||
searchReq.setSize(size);
|
||||
Page<List> list = hyperParamService.getHyperParamList(searchReq);
|
||||
Page<List> list = hyperParamService.getHyperParamList(model, searchReq);
|
||||
|
||||
return ApiResponseDto.ok(list);
|
||||
}
|
||||
@@ -133,7 +135,7 @@ public class HyperParamApiController {
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(responseCode = "200", description = "삭제 성공", content = @Content),
|
||||
@ApiResponse(responseCode = "422", description = "HPs_0001 삭제 불가", content = @Content),
|
||||
@ApiResponse(responseCode = "422", description = "default 삭제 불가", content = @Content),
|
||||
@ApiResponse(responseCode = "404", description = "하이퍼파라미터를 찾을 수 없음", content = @Content),
|
||||
})
|
||||
@DeleteMapping("/{uuid}")
|
||||
@@ -179,8 +181,11 @@ public class HyperParamApiController {
|
||||
@ApiResponse(responseCode = "404", description = "하이퍼파라미터를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/init")
|
||||
public ApiResponseDto<HyperParamDto.Basic> getInitHyperParam() {
|
||||
return ApiResponseDto.ok(hyperParamService.getInitHyperParam());
|
||||
@GetMapping("/init/{model}")
|
||||
public ApiResponseDto<HyperParamDto.Basic> getInitHyperParam(
|
||||
@PathVariable ModelType model
|
||||
|
||||
) {
|
||||
return ApiResponseDto.ok(hyperParamService.getInitHyperParam(model));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user