|
|
|
@@ -675,10 +675,6 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
String gitLinkUsername = loginUser.getSysUser().getGitLinkUsername(); |
|
|
|
String gitLinkPassword = loginUser.getSysUser().getGitLinkPassword(); |
|
|
|
|
|
|
|
// String ci4sUsername = "admin"; |
|
|
|
// String gitLinkUsername = "fanshuai"; |
|
|
|
// String gitLinkPassword = "h1n2x3j4y5@"; |
|
|
|
|
|
|
|
Map<String, Object> userInfo = getUserInfo(ci4sUsername, gitLinkUsername, gitLinkPassword); |
|
|
|
|
|
|
|
String repositoryName = modelsVo.getIdentifier() == null ? ci4sUsername + "_model_" + DateUtils.dateTimeNow() : modelsVo.getIdentifier(); |
|
|
|
@@ -712,7 +708,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
dvcUtils.dvcCheckout(rootPath); |
|
|
|
//干掉目标文件夹 |
|
|
|
dvcUtils.deleteDirectory(modelPath); |
|
|
|
if (modelsVo.getModelVersionVos()!= null && modelsVo.getModelVersionVos().size() != 0) { |
|
|
|
if (modelsVo.getModelVersionVos() != null && modelsVo.getModelVersionVos().size() != 0) { |
|
|
|
String sourcePath = modelsVo.getModelVersionVos().get(0).getUrl(); |
|
|
|
|
|
|
|
if (Constant.Source_Export.equals(modelsVo.getModelSource())) { |
|
|
|
@@ -750,6 +746,13 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
YamlUtils.generateYamlFile(metaMap, metaPath, "metadata"); |
|
|
|
String meta = JSON.toJSONString(modelMetaVo); |
|
|
|
|
|
|
|
//保存指标 |
|
|
|
Map<String, Object> metrics = modelMetaVo.getMetrics(); |
|
|
|
YamlUtils.generateYamlFile(metrics, rootPath, "metrics"); |
|
|
|
//保存参数 |
|
|
|
Map<String, Object> params = modelMetaVo.getParams(); |
|
|
|
YamlUtils.generateYamlFile(params, rootPath, "params"); |
|
|
|
|
|
|
|
//保存模型依赖 |
|
|
|
modelDependency.setRepoId(modelsVo.getId()); |
|
|
|
modelDependency.setIdentifier(repositoryName); |
|
|
|
|