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
a90bbae9
Commit
a90bbae9
authored
Dec 12, 2023
by
linpeiqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口返回类型
parent
cf476579
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
ModelEstimateController.java
...yice/webadmin/app/controller/ModelEstimateController.java
+3
-3
ModelVersionController.java
.../yice/webadmin/app/controller/ModelVersionController.java
+4
-4
TuningRunController.java
...com/yice/webadmin/app/controller/TuningRunController.java
+3
-3
No files found.
application-webadmin/src/main/java/com/yice/webadmin/app/controller/ModelEstimateController.java
View file @
a90bbae9
...
@@ -102,7 +102,7 @@ public class ModelEstimateController {
...
@@ -102,7 +102,7 @@ public class ModelEstimateController {
* @return 应答结果对象。
* @return 应答结果对象。
*/
*/
@GetMapping
(
"/getPreviewCommand"
)
@GetMapping
(
"/getPreviewCommand"
)
public
ResponseResult
<
String
>
getPreviewCommand
(
@RequestParam
Long
taskId
)
{
public
ResponseResult
<
JSONArray
>
getPreviewCommand
(
@RequestParam
Long
taskId
)
{
ModelEstimate
modelEstimate
=
this
.
modelEstimateService
.
getById
(
taskId
);
ModelEstimate
modelEstimate
=
this
.
modelEstimateService
.
getById
(
taskId
);
ModelVersion
modelVersion
=
this
.
modelVersionService
.
getById
(
modelEstimate
.
getModelVersionId
());
ModelVersion
modelVersion
=
this
.
modelVersionService
.
getById
(
modelEstimate
.
getModelVersionId
());
DatasetVersion
datasetVersion
=
this
.
datasetVersionService
.
getById
(
modelEstimate
.
getDatasetVersionId
());
DatasetVersion
datasetVersion
=
this
.
datasetVersionService
.
getById
(
modelEstimate
.
getDatasetVersionId
());
...
@@ -132,8 +132,8 @@ public class ModelEstimateController {
...
@@ -132,8 +132,8 @@ public class ModelEstimateController {
array
.
add
(
jsonObject
.
get
(
"ToppSamplingValue"
));
array
.
add
(
jsonObject
.
get
(
"ToppSamplingValue"
));
array
.
add
(
jsonObject
.
get
(
"temperatureCoefficient"
));
array
.
add
(
jsonObject
.
get
(
"temperatureCoefficient"
));
array
.
add
(
this
.
pythonConfig
.
getModelEstimateFileBaseDir
()
+
modelVersion
.
getVersionName
()
+
File
.
separator
+
"evl_"
+
taskId
);
array
.
add
(
this
.
pythonConfig
.
getModelEstimateFileBaseDir
()
+
modelVersion
.
getVersionName
()
+
File
.
separator
+
"evl_"
+
taskId
);
System
.
out
.
println
(
array
.
toJSONString
()
);
System
.
out
.
println
(
array
);
return
ResponseResult
.
success
(
array
.
toJSONString
()
);
return
ResponseResult
.
success
(
array
);
}
}
/**
/**
...
...
application-webadmin/src/main/java/com/yice/webadmin/app/controller/ModelVersionController.java
View file @
a90bbae9
package
com
.
yice
.
webadmin
.
app
.
controller
;
package
com
.
yice
.
webadmin
.
app
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.page.PageMethod
;
import
com.github.pagehelper.page.PageMethod
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
...
@@ -166,7 +167,7 @@ public class ModelVersionController {
...
@@ -166,7 +167,7 @@ public class ModelVersionController {
* @return 应答结果对象,包含查询结果集。
* @return 应答结果对象,包含查询结果集。
*/
*/
@PostMapping
(
"/listModels"
)
@PostMapping
(
"/listModels"
)
public
ResponseResult
<
String
>
listModels
()
throws
IOException
{
public
ResponseResult
<
JSONArray
>
listModels
()
throws
IOException
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"placeholder"
,
"string"
);
jsonObject
.
put
(
"placeholder"
,
"string"
);
jsonObject
.
put
(
"controller_address"
,
pythonConfig
.
getControllerAddress
());
jsonObject
.
put
(
"controller_address"
,
pythonConfig
.
getControllerAddress
());
...
@@ -175,11 +176,10 @@ public class ModelVersionController {
...
@@ -175,11 +176,10 @@ public class ModelVersionController {
JSONObject
jo
=
JSON
.
parseObject
(
result
);
JSONObject
jo
=
JSON
.
parseObject
(
result
);
Integer
code
=
jo
.
getIntValue
(
"code"
);
Integer
code
=
jo
.
getIntValue
(
"code"
);
String
msg
=
jo
.
getString
(
"msg"
);
String
msg
=
jo
.
getString
(
"msg"
);
String
data
=
jo
.
getString
(
"data"
);
if
(
code
!=
null
&&
code
==
200
)
{
if
(
code
!=
null
&&
code
==
200
)
{
return
ResponseResult
.
create
(
ErrorCodeEnum
.
NO_ERROR
,
msg
,
data
);
return
ResponseResult
.
create
(
ErrorCodeEnum
.
NO_ERROR
,
msg
,
jo
.
getJSONArray
(
"data"
)
);
}
else
{
}
else
{
return
ResponseResult
.
create
(
ErrorCodeEnum
.
SERVER_INTERNAL_ERROR
,
msg
,
data
);
return
ResponseResult
.
create
(
ErrorCodeEnum
.
SERVER_INTERNAL_ERROR
,
msg
,
null
);
}
}
}
}
...
...
application-webadmin/src/main/java/com/yice/webadmin/app/controller/TuningRunController.java
View file @
a90bbae9
...
@@ -144,7 +144,7 @@ public class TuningRunController {
...
@@ -144,7 +144,7 @@ public class TuningRunController {
* @return 应答结果对象。
* @return 应答结果对象。
*/
*/
@GetMapping
(
"/getPreviewCommand"
)
@GetMapping
(
"/getPreviewCommand"
)
public
ResponseResult
<
String
>
getPreviewCommand
(
@RequestParam
Long
runId
)
{
public
ResponseResult
<
JSONArray
>
getPreviewCommand
(
@RequestParam
Long
runId
)
{
TuningRun
tuningRun
=
this
.
tuningRunService
.
getById
(
runId
);
TuningRun
tuningRun
=
this
.
tuningRunService
.
getById
(
runId
);
ModelVersion
modelVersion
=
this
.
modelVersionService
.
getById
(
tuningRun
.
getModelVersionId
());
ModelVersion
modelVersion
=
this
.
modelVersionService
.
getById
(
tuningRun
.
getModelVersionId
());
DatasetVersion
datasetVersion
=
this
.
datasetVersionService
.
getById
(
tuningRun
.
getDatasetVersionId
());
DatasetVersion
datasetVersion
=
this
.
datasetVersionService
.
getById
(
tuningRun
.
getDatasetVersionId
());
...
@@ -190,8 +190,8 @@ public class TuningRunController {
...
@@ -190,8 +190,8 @@ public class TuningRunController {
array
.
add
(
jsonObject
.
get
(
"dpoBetaData"
));
array
.
add
(
jsonObject
.
get
(
"dpoBetaData"
));
array
.
add
(
new
JSONArray
());
array
.
add
(
new
JSONArray
());
array
.
add
(
"train_"
+
runId
);
array
.
add
(
"train_"
+
runId
);
System
.
out
.
println
(
array
.
toJSONString
()
);
System
.
out
.
println
(
array
);
return
ResponseResult
.
success
(
array
.
toJSONString
()
);
return
ResponseResult
.
success
(
array
);
}
}
/**
/**
...
...
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