Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev-DXTZYK
fanshuai 1 year ago
parent
commit
73fdb64061
3 changed files with 23 additions and 21 deletions
  1. +12
    -12
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java
  2. +10
    -9
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java
  3. +1
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/vo/GitProjectVo.java

+ 12
- 12
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java View File

@@ -738,17 +738,18 @@ public class ModelsServiceImpl implements ModelsService {
modelDependency.setMeta(meta); modelDependency.setMeta(meta);
modelDependency1Dao.insert(modelDependency); modelDependency1Dao.insert(modelDependency);


// 配置远程S3地址
String s3Path = "management-platform-files/" + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName;
dvcUtils.dvcRemoteAdd(rootPath, s3Path);
dvcUtils.dvcConfigS3Credentials(rootPath, endpoint);
dvcUtils.dvcConfigS3Credentials2(rootPath, accessKeyId);
dvcUtils.dvcConfigS3Credentials3(rootPath, secretAccessKey);
// dvc 跟踪
dvcUtils.dvcAdd(rootPath, "model");
dvcUtils.pushNewBranchToRemote(rootPath, gitLinkUsername, gitLinkPassword, branchName);

CompletableFuture.supplyAsync(() -> { CompletableFuture.supplyAsync(() -> {
try { try {
// 配置远程S3地址
String s3Path = "management-platform-files/" + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName;
dvcUtils.dvcRemoteAdd(rootPath, s3Path);
dvcUtils.dvcConfigS3Credentials(rootPath, endpoint);
dvcUtils.dvcConfigS3Credentials2(rootPath, accessKeyId);
dvcUtils.dvcConfigS3Credentials3(rootPath, secretAccessKey);
// dvc 跟踪
dvcUtils.dvcAdd(rootPath, "model");
dvcUtils.pushNewBranchToRemote(rootPath, gitLinkUsername, gitLinkPassword, branchName);
//dvc push 到远程S3 //dvc push 到远程S3
dvcUtils.dvcPush(rootPath); dvcUtils.dvcPush(rootPath);
} catch (Exception e) { } catch (Exception e) {
@@ -756,9 +757,8 @@ public class ModelsServiceImpl implements ModelsService {
} }
return null; return null;
}); });
return "新增模型版本成功";
} }
return null;
return "新增模型版本成功";
} }




@@ -871,7 +871,7 @@ public class ModelsServiceImpl implements ModelsService {
String modelTagName = modelsVo.getModelTag(); String modelTagName = modelsVo.getModelTag();
String modelTypeName = modelsVo.getModelType(); String modelTypeName = modelsVo.getModelType();


String url = gitendpoint + "/api/projects.json?user_id=" + userId + "&sort_by=praises_count";
String url = gitendpoint + "/api/projects.json";


String name = modelsVo.getName(); String name = modelsVo.getName();
if (StringUtils.isNotEmpty(name)) { if (StringUtils.isNotEmpty(name)) {


+ 10
- 9
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java View File

@@ -214,17 +214,18 @@ public class NewDatasetServiceImpl implements NewDatasetService {
addDatasetSourceToDataVo(datasetVo); addDatasetSourceToDataVo(datasetVo);


YamlUtils.generateYamlFile(JsonUtils.objectToMap(datasetVo), localPath, "dataset"); YamlUtils.generateYamlFile(JsonUtils.objectToMap(datasetVo), localPath, "dataset");
//dvc数据跟踪
// 配置远程S3地址
dvcUtils.dvcRemoteAdd(localPath, s3Path);
dvcUtils.dvcConfigS3Credentials(localPath, endpoint);
dvcUtils.dvcConfigS3Credentials2(localPath, accessKeyId);
dvcUtils.dvcConfigS3Credentials3(localPath, secretAccessKey);
// dvc 跟踪
dvcUtils.dvcAdd(localPath, "dataset");
dvcUtils.pushNewBranchToRemote(localPath, gitLinkUsername, gitLinkPassword, branchName);

CompletableFuture.supplyAsync(() -> { CompletableFuture.supplyAsync(() -> {
try { try {
//dvc数据跟踪
// 配置远程S3地址
dvcUtils.dvcRemoteAdd(localPath, s3Path);
dvcUtils.dvcConfigS3Credentials(localPath, endpoint);
dvcUtils.dvcConfigS3Credentials2(localPath, accessKeyId);
dvcUtils.dvcConfigS3Credentials3(localPath, secretAccessKey);
// dvc 跟踪
dvcUtils.dvcAdd(localPath, "dataset");
dvcUtils.pushNewBranchToRemote(localPath, gitLinkUsername, gitLinkPassword, branchName);
//dvc push 到远程S3 //dvc push 到远程S3
dvcUtils.dvcPush(localPath); dvcUtils.dvcPush(localPath);
} catch (Exception e) { } catch (Exception e) {


+ 1
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/vo/GitProjectVo.java View File

@@ -27,6 +27,7 @@ public class GitProjectVo implements Serializable {


// @ApiModelProperty(value = "项目分类ID", required = false) // @ApiModelProperty(value = "项目分类ID", required = false)
// private int projectCategoryId; // private int projectCategoryId;

// //
// @ApiModelProperty(value = "项目语言ID", required = false) // @ApiModelProperty(value = "项目语言ID", required = false)
// private int projectLanguageId; // private int projectLanguageId;


Loading…
Cancel
Save