학습실행 step1 할 때 best epoch 업데이트

This commit is contained in:
2026-02-13 10:15:04 +09:00
parent 26a4623aa8
commit 1e62a8b097
4 changed files with 48 additions and 0 deletions

View File

@@ -29,4 +29,9 @@ public class ModelTrainMetricsJobCoreService {
public void insertModelMetricsValidation(List<Object[]> batchArgs) {
modelTrainMetricsJobRepository.insertModelMetricsValidation(batchArgs);
}
@Transactional
public void updateModelSelectedBestEpoch(Long modelId, Integer epoch) {
modelTrainMetricsJobRepository.updateModelSelectedBestEpoch(modelId, epoch);
}
}

View File

@@ -12,4 +12,6 @@ public interface ModelTrainMetricsJobRepositoryCustom {
void updateModelMetricsTrainSaveYn(Long modelId, String stepNo);
void insertModelMetricsValidation(List<Object[]> batchArgs);
void updateModelSelectedBestEpoch(Long modelId, Integer epoch);
}

View File

@@ -82,4 +82,13 @@ public class ModelTrainMetricsJobRepositoryImpl extends QuerydslRepositorySuppor
jdbcTemplate.batchUpdate(sql, batchArgs);
}
@Override
public void updateModelSelectedBestEpoch(Long modelId, Integer epoch) {
queryFactory
.update(modelMasterEntity)
.set(modelMasterEntity.bestEpoch, epoch)
.where(modelMasterEntity.id.eq(modelId))
.execute();
}
}