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
f54e1196
Commit
f54e1196
authored
Dec 11, 2023
by
linpeiqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不知道为啥又行了
parent
cd0f3f53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
TuningRunServiceImpl.java
.../yice/webadmin/app/service/impl/TuningRunServiceImpl.java
+8
-5
No files found.
application-webadmin/src/main/java/com/yice/webadmin/app/service/impl/TuningRunServiceImpl.java
View file @
f54e1196
...
...
@@ -33,7 +33,6 @@ 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
;
import
java.util.concurrent.atomic.AtomicInteger
;
...
...
@@ -209,6 +208,7 @@ public class TuningRunServiceImpl extends BaseService<TuningRun, Long> implement
public
void
onOpen
(
ServerHandshake
serverHandshake
)
{
log
.
info
(
"-------------与大模型建立连接-------------"
);
}
@Override
public
void
onMessage
(
String
message
)
{
log
.
info
(
"收到来自服务端的消息:"
+
message
);
...
...
@@ -242,16 +242,18 @@ public class TuningRunServiceImpl extends BaseService<TuningRun, Long> implement
}
log
.
info
(
"发送服务端的消息:"
+
sendJson
.
toJSONString
());
if
(
receiveMsg
.
equals
(
"process_completed"
))
{
// this.close();
if
(
receiveJson
.
getBoolean
(
"success"
)){
// this.close();
if
(
receiveJson
.
getBoolean
(
"success"
))
{
isSuccess
.
set
(
1
);
}
}
}
@Override
public
void
onClose
(
int
i
,
String
s
,
boolean
b
)
{
log
.
info
(
"关闭连接:::"
+
"i = "
+
i
+
":::s = "
+
s
+
":::b = "
+
b
);
}
@Override
public
void
onError
(
Exception
e
)
{
log
.
error
(
"报错了:::"
+
e
.
getMessage
());
...
...
@@ -259,15 +261,16 @@ public class TuningRunServiceImpl extends BaseService<TuningRun, Long> implement
}.
connect
();
System
.
out
.
println
(
"isSuccess.get():"
+
isSuccess
.
get
());
if
(
isSuccess
.
get
()
==
1
)
{
saveAll
(
tuningRun
,
targetModelVersionURl
,
runPublishDto
);
saveAll
(
tuningRun
,
targetModelVersionURl
,
runPublishDto
);
tuningRun
.
setPublishStatus
(
1
);
}
else
{
tuningRun
.
setPublishStatus
(-
1
);
}
return
this
.
updateById
(
tuningRun
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveAll
(
TuningRun
tuningRun
,
String
targetModelVersionURl
,
RunPublishDto
runPublishDto
)
{
public
void
saveAll
(
TuningRun
tuningRun
,
String
targetModelVersionURl
,
RunPublishDto
runPublishDto
)
{
ModelVersion
modelVersionS
=
new
ModelVersion
();
modelVersionS
.
setRunId
(
tuningRun
.
getRunId
());
modelVersionS
.
setTaskId
(
tuningRun
.
getTaskId
());
...
...
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