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
2437e182
Commit
2437e182
authored
Dec 07, 2023
by
linpeiqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小bug
parent
39cf978d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
TuningRunServiceImpl.java
.../yice/webadmin/app/service/impl/TuningRunServiceImpl.java
+9
-4
No files found.
application-webadmin/src/main/java/com/yice/webadmin/app/service/impl/TuningRunServiceImpl.java
View file @
2437e182
...
...
@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.io.File
;
import
java.net.URI
;
import
java.util.List
;
...
...
@@ -59,7 +60,7 @@ public class TuningRunServiceImpl extends BaseService<TuningRun, Long> implement
private
IdGeneratorWrapper
idGenerator
;
@Autowired
private
PythonConfig
pythonConfig
;
private
String
model
Name
;
private
String
model
VersionURl
;
/**
* 返回当前Service的主表Mapper对象。
...
...
@@ -197,14 +198,18 @@ public class TuningRunServiceImpl extends BaseService<TuningRun, Long> implement
modelManageS
.
setModelDescribe
(
runPublishDto
.
getModelDescribe
());
modelManageS
.
setModelName
(
runPublishDto
.
getModelName
());
modelManageS
.
setModelType
(
runPublishDto
.
getModelType
());
modelVersionURl
=
pythonConfig
.
getModelOutputFileBaseDir
()
+
runPublishDto
.
getModelName
()
+
"_V1"
;
modelVersionS
.
setModelUrl
(
modelVersionURl
);
this
.
modelManageService
.
saveAndCreateVersion
(
modelManageS
,
modelVersionS
);
modelName
=
runPublishDto
.
getModelName
()
+
"_V1"
;
}
else
{
modelVersionS
.
setModelId
(
runPublishDto
.
getModelId
());
ModelManage
modelManageS
=
this
.
modelManageService
.
getById
(
runPublishDto
.
getModelId
());
modelManageS
.
setModelDescribe
(
runPublishDto
.
getModelDescribe
());
this
.
modelManageService
.
updateById
(
modelManageS
);
modelName
=
this
.
modelVersionService
.
saveNew
(
modelVersionS
).
getVersionName
();
ModelVersion
modelVersionR
=
this
.
modelVersionService
.
saveNew
(
modelVersionS
);
modelVersionURl
=
pythonConfig
.
getModelOutputFileBaseDir
()
+
modelVersionR
.
getVersionName
();
modelVersionR
.
setModelUrl
(
modelVersionURl
);
this
.
modelVersionService
.
updateById
(
modelVersionR
);
}
new
WebSocketClient
(
new
URI
(
this
.
pythonConfig
.
getPythonWebsocketUri
()),
new
Draft_6455
())
{
@Override
...
...
@@ -237,7 +242,7 @@ public class TuningRunServiceImpl extends BaseService<TuningRun, Long> implement
array
.
add
(
tuningRun
.
getTrainMethod
());
array
.
add
(
jsonObject
.
get
(
"promptTemplate"
));
array
.
add
(
2
);
String
newModelUrl
=
pythonConfig
.
getModelOutputFileBaseDir
()
+
modelName
;
String
newModelUrl
=
modelVersionURl
;
array
.
add
(
newModelUrl
);
array
.
add
(
"none"
);
sendJson
.
put
(
"data"
,
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