Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
YetJustSysyc
Compiler2024-人工式生成智能
Commits
100c03a4
Commit
100c03a4
authored
10 months ago
by
冯思程
Browse files
Options
Download
Patches
Plain Diff
fix(scripts): fix
parent
9b3e7582
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/compare_result.py
+3
-2
scripts/compare_result.py
with
3 additions
and
2 deletions
+3
-2
scripts/compare_result.py
+
3
−
2
View file @
100c03a4
...
@@ -19,8 +19,9 @@ def compare_rows(csv_file, row1, row2):
...
@@ -19,8 +19,9 @@ def compare_rows(csv_file, row1, row2):
try
:
try
:
value1
=
float
(
value1_str
)
value1
=
float
(
value1_str
)
value2
=
float
(
value2_str
)
value2
=
float
(
value2_str
)
diff
=
value1
-
value2
diff
=
value2
-
value1
print
(
f
"Difference in
{
header
}
(row1 - row2):
{
diff
}
"
)
diff
=
diff
/
value1
*
100
print
(
f
"Difference in
{
header
}
(row1 - row2):
{
diff
}
%"
)
except
ValueError
:
except
ValueError
:
print
(
f
"Error converting values in
{
header
}
: '
{
data1
[
i
]
}
' and '
{
data2
[
i
]
}
'"
)
print
(
f
"Error converting values in
{
header
}
: '
{
data1
[
i
]
}
' and '
{
data2
[
i
]
}
'"
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets