Merge branch 'feat/training_260202' of https://kamco.git.gs.dabeeo.com/MVPTeam/kamco-train-api into feat/training_260202
This commit is contained in:
@@ -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")) {
|
||||
|
||||
@@ -45,6 +45,8 @@ public class ModelMngRepositoryImpl implements ModelMngRepositoryCustom {
|
||||
builder.and(modelMasterEntity.modelNo.eq(req.getModelNo()));
|
||||
}
|
||||
|
||||
builder.and(modelMasterEntity.delYn.isFalse());
|
||||
|
||||
List<ModelMasterEntity> content =
|
||||
queryFactory
|
||||
.selectFrom(modelMasterEntity)
|
||||
|
||||
@@ -15,7 +15,7 @@ public class TrainRunRequest {
|
||||
// ========================
|
||||
// 기본
|
||||
// ========================
|
||||
private UUID datasetFolder;
|
||||
private String datasetFolder;
|
||||
private UUID outputFolder;
|
||||
private String inputSize;
|
||||
private String cropSize;
|
||||
@@ -84,10 +84,6 @@ public class TrainRunRequest {
|
||||
|
||||
private UUID uuid;
|
||||
|
||||
public String getDatasetFolder() {
|
||||
return String.valueOf(this.datasetFolder);
|
||||
}
|
||||
|
||||
public String getOutputFolder() {
|
||||
return String.valueOf(this.outputFolder);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user