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
3c155aac
Commit
3c155aac
authored
Dec 06, 2023
by
linpeiqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加微调后反馈信息
parent
0c70924d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
TuningRunController.java
...com/yice/webadmin/app/controller/TuningRunController.java
+3
-2
No files found.
application-webadmin/src/main/java/com/yice/webadmin/app/controller/TuningRunController.java
View file @
3c155aac
...
...
@@ -280,14 +280,15 @@ public class TuningRunController {
* @return 应答结果对象,包含对象详情。
*/
@GetMapping
(
"/getStatus"
)
public
ResponseResult
<
ArrayNode
>
getStatus
(
@RequestParam
Long
runId
)
throws
IOException
{
public
ResponseResult
<
String
>
getStatus
(
@RequestParam
Long
runId
)
throws
IOException
{
TuningRun
tuningRun
=
this
.
tuningRunService
.
getById
(
runId
);
ModelVersion
modelVersion
=
this
.
modelVersionService
.
getById
(
tuningRun
.
getModelVersionId
());
String
url
=
this
.
pythonConfig
.
getModelTuningFileBaseDir
()
+
modelVersion
.
getVersionName
()
+
File
.
separator
+
tuningRun
.
getTrainMethod
()
+
File
.
separator
+
"train_"
+
tuningRun
.
getRunId
()
+
File
.
separator
+
"trainer_state.json"
;
File
file
=
new
File
(
url
);
// 指定文件路径
ObjectMapper
objectMapper
=
new
ObjectMapper
();
ArrayNode
arrayNode
=
(
ArrayNode
)
objectMapper
.
readTree
(
file
);
return
ResponseResult
.
success
(
arrayNode
);
String
jsonString
=
objectMapper
.
writeValueAsString
(
arrayNode
);
return
ResponseResult
.
success
(
jsonString
);
}
private
ResponseEntity
<
Resource
>
getFileByUrl
(
String
url
)
throws
IOException
{
Path
file
=
Paths
.
get
(
url
);
...
...
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