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
2b853d01
Commit
2b853d01
authored
Apr 26, 2024
by
pengxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化。
parent
d7a925bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
10 deletions
+2
-10
DatasetConstant.java
.../java/com/yice/webadmin/app/constant/DatasetConstant.java
+0
-5
DatasetOutputServiceImpl.java
...e/webadmin/app/service/impl/DatasetOutputServiceImpl.java
+1
-1
DatasetVersionServiceImpl.java
.../webadmin/app/service/impl/DatasetVersionServiceImpl.java
+1
-4
No files found.
application-webadmin/src/main/java/com/yice/webadmin/app/constant/DatasetConstant.java
View file @
2b853d01
...
...
@@ -112,11 +112,6 @@ public class DatasetConstant {
*/
public
static
final
String
INSTRUCTION
=
"instruction"
;
/**
* instruction数据
*/
public
static
final
String
INPUT
=
"input"
;
/**
* args参数值
*/
...
...
application-webadmin/src/main/java/com/yice/webadmin/app/service/impl/DatasetOutputServiceImpl.java
View file @
2b853d01
...
...
@@ -397,7 +397,7 @@ public class DatasetOutputServiceImpl extends BaseService<DatasetOutput, Long> i
instruction
=
instruction
.
replace
(
"\n"
,
""
);
output
=
output
.
replace
(
"\n"
,
""
);
pw
.
printf
(
maxWidth
>
0
?
"%-"
+
maxWidth
+
"s,%-"
+
maxWidth
+
"s\n"
:
"%s,%s\n"
,
output
,
instruction
);
pw
.
printf
(
maxWidth
>
0
?
"%-"
+
maxWidth
+
"s,%-"
+
maxWidth
+
"s\n"
:
"%s,%s\n"
,
instruction
,
output
);
}
pw
.
flush
();
// 转换为InputStream
...
...
application-webadmin/src/main/java/com/yice/webadmin/app/service/impl/DatasetVersionServiceImpl.java
View file @
2b853d01
...
...
@@ -203,7 +203,6 @@ public class DatasetVersionServiceImpl extends BaseService<DatasetVersion, Long>
// 将这一行的数据添加到Map中
rowData
.
put
(
DatasetConstant
.
INSTRUCTION
,
instruction
);
rowData
.
put
(
DatasetConstant
.
OUTPUT
,
output
);
rowData
.
put
(
DatasetConstant
.
INPUT
,
""
);
// 将这一行的数据转换为一个JSON对象
String
rowJson
=
JsonUtils
.
toJson
(
rowData
);
...
...
@@ -217,7 +216,7 @@ public class DatasetVersionServiceImpl extends BaseService<DatasetVersion, Long>
jsonBuilder
.
append
(
rowJson
);
}
else
{
// 如果格式不正确,可以记录日志或抛出异常
System
.
err
.
println
(
"Invalid line format: "
+
line
);
log
.
info
(
"Invalid line format: "
+
line
);
}
}
...
...
@@ -266,7 +265,6 @@ public class DatasetVersionServiceImpl extends BaseService<DatasetVersion, Long>
// 将这一行的数据添加到Map中
rowData
.
put
(
DatasetConstant
.
OUTPUT
,
line
[
1
]);
rowData
.
put
(
DatasetConstant
.
INPUT
,
""
);
rowData
.
put
(
DatasetConstant
.
INSTRUCTION
,
line
[
0
]);
// 将这一行的数据转换为一个JSON对象
...
...
@@ -324,7 +322,6 @@ public class DatasetVersionServiceImpl extends BaseService<DatasetVersion, Long>
// 将这一行的数据添加到Map中
rowData
.
put
(
DatasetConstant
.
INSTRUCTION
,
instruction
);
rowData
.
put
(
DatasetConstant
.
OUTPUT
,
output
);
rowData
.
put
(
DatasetConstant
.
INPUT
,
""
);
// 将这一行的数据转换为一个JSON对象
String
rowJson
=
JsonUtils
.
toJson
(
rowData
);
...
...
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