feat/training_260202 #50
@@ -506,11 +506,15 @@ public class FIleChecker {
|
||||
|
||||
try {
|
||||
File dir = new File(targetPath);
|
||||
log.info("targetPath={}", targetPath);
|
||||
log.info("absolute targetPath={}", dir.getAbsolutePath());
|
||||
|
||||
if (!dir.exists()) {
|
||||
dir.mkdirs();
|
||||
}
|
||||
|
||||
File dest = new File(dir, String.valueOf(chunkIndex));
|
||||
log.info("real save path = {}", dest.getAbsolutePath());
|
||||
|
||||
log.info("chunkIndex={}, uploadSize={}", chunkIndex, mfile.getSize());
|
||||
log.info("savedSize={}", dest.length());
|
||||
@@ -522,6 +526,9 @@ public class FIleChecker {
|
||||
log.info("after delete={}", dest.length());
|
||||
mfile.transferTo(dest);
|
||||
|
||||
log.info("after transfer size={}", dest.length());
|
||||
log.info("after transfer exists={}", dest.exists());
|
||||
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
log.error("chunk save error", e);
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.kamco.cd.training.model.dto.ModelTrainMngDto;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainMngDto.SearchReq;
|
||||
import com.kamco.cd.training.postgres.core.HyperParamCoreService;
|
||||
import com.kamco.cd.training.postgres.core.ModelTrainMngCoreService;
|
||||
import com.kamco.cd.training.train.service.TrainJobService;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
@@ -30,7 +29,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@Slf4j
|
||||
public class ModelTrainMngService {
|
||||
|
||||
private final TrainJobService trainJobService;
|
||||
private final ModelTrainMngCoreService modelTrainMngCoreService;
|
||||
private final HyperParamCoreService hyperParamCoreService;
|
||||
private final TmpDatasetService tmpDatasetService;
|
||||
|
||||
@@ -14,14 +14,14 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@RequiredArgsConstructor
|
||||
public class TmpDatasetService {
|
||||
|
||||
@Value("${train.requestDir}")
|
||||
@Value("${train.docker.requestDir}")
|
||||
private String requestDir;
|
||||
|
||||
// 환경에 맞게 yml로 빼는 걸 추천
|
||||
private final Path BASE = Paths.get(requestDir);
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public Path buildTmpDatasetSymlink(String uid, List<String> uids) throws IOException {
|
||||
public Path buildTmpDatasetSymlink(String uid, List<String> datasetUids) throws IOException {
|
||||
|
||||
// 환경에 맞게 yml로 빼는 걸 추천
|
||||
Path BASE = Paths.get(requestDir);
|
||||
Path tmp = BASE.resolve("tmp").resolve(uid);
|
||||
|
||||
// mkdir -p "$TMP"/train/{input1,input2,label} ...
|
||||
@@ -31,7 +31,7 @@ public class TmpDatasetService {
|
||||
}
|
||||
}
|
||||
|
||||
for (String id : uids) {
|
||||
for (String id : datasetUids) {
|
||||
Path srcRoot = BASE.resolve(id);
|
||||
|
||||
for (String type : List.of("train", "val")) {
|
||||
|
||||
Reference in New Issue
Block a user