Merge pull request '이어하기 로그 수정' (#100) from feat/training_260202 into develop
Reviewed-on: #100
This commit was merged in pull request #100.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user