모델등록 수정

This commit is contained in:
2026-02-12 15:43:52 +09:00
parent 7a22d8ba73
commit 8e4bea53da
3 changed files with 15 additions and 11 deletions

View File

@@ -62,7 +62,7 @@ public class ModelTrainMngService {
* @return
*/
@Transactional
public void createModelTrain(ModelTrainMngDto.AddReq req) {
public UUID createModelTrain(ModelTrainMngDto.AddReq req) {
HyperParam hyperParam = req.getHyperParam();
HyperParamDto.Basic hyper = new HyperParamDto.Basic();
@@ -81,7 +81,10 @@ public class ModelTrainMngService {
}
// 모델학습 테이블 저장
Long modelId = modelTrainMngCoreService.saveModel(req);
ModelTrainMngDto.Basic modelDto = modelTrainMngCoreService.saveModel(req);
Long modelId = modelDto.getId();
UUID modelUuid = modelDto.getUuid();
// 모델학습 데이터셋 저장
modelTrainMngCoreService.saveModelDataset(modelId, req);
@@ -109,10 +112,7 @@ public class ModelTrainMngService {
throw new RuntimeException(e);
}
// 저장 다 끝난 뒤에 job enqueue
if (Boolean.TRUE.equals(req.getIsStart())) {
trainJobService.enqueue(modelId); // job 저장 + 이벤트 발행(실행은 AFTER_COMMIT)
}
return modelUuid;
}
/**