이어하기 로그 수정

This commit is contained in:
2026-02-13 13:26:54 +09:00
parent a5b3ae613f
commit a070566048

View File

@@ -1,6 +1,7 @@
package com.kamco.cd.training.train.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.kamco.cd.training.common.exception.CustomApiException;
import com.kamco.cd.training.model.dto.ModelTrainMngDto;
import com.kamco.cd.training.postgres.core.ModelTrainJobCoreService;
import com.kamco.cd.training.postgres.core.ModelTrainMngCoreService;
@@ -19,6 +20,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -164,7 +166,7 @@ public class TrainJobService {
// 체크포인트 탐지해서 resumeFrom 세팅
String resumeFrom = findResumeFromOrNull(nextParams);
if (resumeFrom == null) {
throw new IllegalStateException("이어하기 체크포인트가 없습니다.");
throw new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND, "이어하기 체크포인트가 없습니다.");
}
nextParams.put("resumeFrom", resumeFrom);
nextParams.put("resume", true);
@@ -199,7 +201,7 @@ public class TrainJobService {
Path outDir = Paths.get(responseDir, outputFolder);
log.info("resume outDir response path: {}", outDir);
Path last = outDir.resolve("last_checkpoint");
log.info("resume last response path: {}", outDir);
log.info("resume last response path: {}", last);
if (!Files.isRegularFile(last)) return null;