Merge pull request 'best epoch 파일 선택 수정' (#131) from feat/training_260202 into develop
Reviewed-on: #131
This commit was merged in pull request #131.
This commit is contained in:
@@ -9,6 +9,7 @@ import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -414,12 +415,10 @@ public class DockerTrainService {
|
||||
if (uuid == null || uuid.isBlank()) throw new IllegalArgumentException("uuid is required");
|
||||
if (epoch == null || epoch <= 0) throw new IllegalArgumentException("epoch must be > 0");
|
||||
|
||||
String modelFile =
|
||||
String.valueOf(findCheckpoint(Path.of(responseDir + req.getOutputFolder()), epoch));
|
||||
Path epochPath = Paths.get(responseDir, req.getOutputFolder());
|
||||
|
||||
if (modelFile == null || modelFile.isBlank()) {
|
||||
throw new IllegalArgumentException("best model file is required");
|
||||
}
|
||||
Path checkpoint = findCheckpoint(epochPath, epoch);
|
||||
String modelFile = checkpoint.toString();
|
||||
|
||||
List<String> c = new ArrayList<>();
|
||||
|
||||
@@ -469,7 +468,6 @@ public class DockerTrainService {
|
||||
return normalPath;
|
||||
}
|
||||
|
||||
// 둘 다 없으면 null 또는 예외
|
||||
return null;
|
||||
throw new IllegalStateException("Checkpoint 파일이 없습니다. epoch=" + epoch);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user