Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lmp_server
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lmp
lmp_server
Commits
11d98239
Commit
11d98239
authored
Dec 07, 2023
by
linpeiqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小bug
parent
2437e182
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
TuningRunController.java
...com/yice/webadmin/app/controller/TuningRunController.java
+30
-6
No files found.
application-webadmin/src/main/java/com/yice/webadmin/app/controller/TuningRunController.java
View file @
11d98239
...
@@ -18,7 +18,9 @@ import com.yice.common.log.model.constant.SysOperationLogType;
...
@@ -18,7 +18,9 @@ import com.yice.common.log.model.constant.SysOperationLogType;
import
com.yice.webadmin.app.config.PythonConfig
;
import
com.yice.webadmin.app.config.PythonConfig
;
import
com.yice.webadmin.app.dto.RunPublishDto
;
import
com.yice.webadmin.app.dto.RunPublishDto
;
import
com.yice.webadmin.app.dto.TuningRunDto
;
import
com.yice.webadmin.app.dto.TuningRunDto
;
import
com.yice.webadmin.app.model.*
;
import
com.yice.webadmin.app.model.DatasetVersion
;
import
com.yice.webadmin.app.model.ModelVersion
;
import
com.yice.webadmin.app.model.TuningRun
;
import
com.yice.webadmin.app.service.*
;
import
com.yice.webadmin.app.service.*
;
import
com.yice.webadmin.app.util.FileUtil
;
import
com.yice.webadmin.app.util.FileUtil
;
import
com.yice.webadmin.app.vo.TuningRunVo
;
import
com.yice.webadmin.app.vo.TuningRunVo
;
...
@@ -26,17 +28,12 @@ import io.swagger.annotations.Api;
...
@@ -26,17 +28,12 @@ import io.swagger.annotations.Api;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.UrlResource
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.nio.file.Paths
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Optional
;
/**
/**
* 精调任务运行操作控制器类。
* 精调任务运行操作控制器类。
...
@@ -113,6 +110,33 @@ public class TuningRunController {
...
@@ -113,6 +110,33 @@ public class TuningRunController {
return
ResponseResult
.
success
();
return
ResponseResult
.
success
();
}
}
/**
* 更新精调任务运行数据,通过ID。
*
* @param tuningRunDto 更新对象。
* @return 应答结果对象。
*/
@OperationLog
(
type
=
SysOperationLogType
.
UPDATE
)
@PostMapping
(
"/updateById"
)
public
ResponseResult
<
Void
>
updateById
(
@MyRequestBody
TuningRunDto
tuningRunDto
)
{
String
errorMessage
=
MyCommonUtil
.
getModelValidationError
(
tuningRunDto
,
true
);
if
(
errorMessage
!=
null
)
{
return
ResponseResult
.
error
(
ErrorCodeEnum
.
DATA_VALIDATED_FAILED
,
errorMessage
);
}
TuningRun
tuningRun
=
MyModelUtil
.
copyTo
(
tuningRunDto
,
TuningRun
.
class
);
TuningRun
originalTuningRun
=
tuningRunService
.
getById
(
tuningRun
.
getRunId
());
originalTuningRun
.
setRunStatus
(
tuningRun
.
getRunStatus
());
if
(
originalTuningRun
==
null
)
{
// NOTE: 修改下面方括号中的话述
errorMessage
=
"数据验证失败,当前 [数据] 并不存在,请刷新后重试!"
;
return
ResponseResult
.
error
(
ErrorCodeEnum
.
DATA_NOT_EXIST
,
errorMessage
);
}
if
(!
tuningRunService
.
updateById
(
originalTuningRun
))
{
return
ResponseResult
.
error
(
ErrorCodeEnum
.
DATA_NOT_EXIST
);
}
return
ResponseResult
.
success
();
}
/**
/**
* 获取预览命令。
* 获取预览命令。
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment