Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GPTGrammarParsing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Noah Heuser
GPTGrammarParsing
Commits
12cf70ae
Commit
12cf70ae
authored
9 months ago
by
Noah Heuser
Browse files
Options
Downloads
Patches
Plain Diff
old_stats_to_chart.py
parent
ffd3319e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
PythonAPI/main.py
+3
-1
3 additions, 1 deletion
PythonAPI/main.py
PythonAPI/old_stats_to_chart.py
+104
-0
104 additions, 0 deletions
PythonAPI/old_stats_to_chart.py
with
107 additions
and
1 deletion
PythonAPI/main.py
+
3
−
1
View file @
12cf70ae
...
@@ -2,6 +2,7 @@ import send_request
...
@@ -2,6 +2,7 @@ import send_request
import
get_results
import
get_results
import
stats_calc
import
stats_calc
import
json
import
json
import
old_stats_to_chart
type
=
2
type
=
2
repeat
=
3
repeat
=
3
...
@@ -14,4 +15,5 @@ repeat = 3
...
@@ -14,4 +15,5 @@ repeat = 3
# get_results.build_check_dict(output_list, repeat, type, i)
# get_results.build_check_dict(output_list, repeat, type, i)
# check_dicts = get_results.set_dev_check(type, i)
# check_dicts = get_results.set_dev_check(type, i)
# get_results.count_class_members(check_dicts, type, i, repeat)
# get_results.count_class_members(check_dicts, type, i, repeat)
stats_calc
.
build_stat_file
(
type
)
#stats_calc.build_stat_file(type)
\ No newline at end of file
old_stats_to_chart
.
create_old_charts_t2
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
PythonAPI/old_stats_to_chart.py
0 → 100644
+
104
−
0
View file @
12cf70ae
import
matplotlib.pyplot
as
plt
import
numpy
as
np
def
create_old_charts_t3
():
labels_0
=
(
"
Total
"
,
"
Mode 0
"
,
"
Mode 1
"
,
"
Mode 2
"
,
"
Mode 3
"
)
amount0
=
{
'
K1
'
:
np
.
array
([
41.34
,
43.3
,
43.64
,
45.98
,
34.55
]),
'
K2
'
:
np
.
array
([
23.75
,
27.15
,
18.1
,
24.82
,
23.34
])
}
width
=
0.9
fig0
,
ax0
=
plt
.
subplots
()
bottom
=
np
.
zeros
(
len
(
labels_0
))
for
mode
,
mode_count
in
amount0
.
items
():
p
=
ax0
.
bar
(
labels_0
,
mode_count
,
width
,
label
=
mode
,
bottom
=
bottom
)
bottom
+=
mode_count
ax0
.
bar_label
(
p
,
label_type
=
'
center
'
)
ax0
.
legend
()
ax0
.
set_ylim
(
0
,
100
)
plt
.
savefig
(
f
"
charts1/t3/chart_old0.png
"
)
labels_1
=
(
"
Total
"
,
"
Mode 0
"
,
"
Mode 1
"
,
"
Mode 2
"
,
"
Mode 3
"
)
amount1
=
{
'
K1
'
:
np
.
array
([
95.75
,
95.99
,
97.11
,
95.45
,
93.98
]),
'
K2
'
:
np
.
array
([
0
,
0
,
0
,
0
,
0
])
}
width
=
0.9
fig1
,
ax1
=
plt
.
subplots
()
bottom
=
np
.
zeros
(
len
(
labels_1
))
for
mode
,
mode_count
in
amount1
.
items
():
p
=
ax1
.
bar
(
labels_1
,
mode_count
,
width
,
label
=
mode
,
bottom
=
bottom
)
bottom
+=
mode_count
ax1
.
bar_label
(
p
,
label_type
=
'
center
'
)
ax1
.
legend
(
loc
=
'
upper right
'
,
ncols
=
2
)
ax1
.
set_ylim
(
0
,
110
)
plt
.
savefig
(
f
"
charts1/t3/chart_old1.png
"
)
fig3
,
ax3
=
plt
.
subplots
()
labels_3
=
[
"
Total
"
,
"
Mode 0
"
,
"
Mode 1
"
,
"
Mode 2
"
,
"
Mode 3
"
]
counts0
=
[
91.18
,
88.83
,
93.21
,
91.39
,
91.04
]
bar_colors
=
[
'
tab:blue
'
,
'
tab:red
'
,
'
tab:orange
'
,
'
tab:green
'
,
'
tab:purple
'
]
p
=
ax3
.
bar
(
labels_3
,
counts0
,
color
=
bar_colors
)
ax3
.
bar_label
(
p
)
ax3
.
set_ylim
(
0
,
110
)
plt
.
savefig
(
f
"
charts1/t3/chart_old2.png
"
)
fig4
,
ax4
=
plt
.
subplots
()
labels_4
=
[
"
Total
"
,
"
Mode 0
"
,
"
Mode 1
"
,
"
Mode 2
"
,
"
Mode 3
"
]
counts1
=
[
79.96
,
85.97
,
85.57
,
77.92
,
69.19
]
bar_colors
=
[
'
tab:blue
'
,
'
tab:red
'
,
'
tab:orange
'
,
'
tab:green
'
,
'
tab:purple
'
]
p
=
ax4
.
bar
(
labels_4
,
counts1
,
color
=
bar_colors
)
ax4
.
bar_label
(
p
)
ax4
.
set_ylim
(
0
,
110
)
plt
.
savefig
(
f
"
charts1/t3/chart_old3.png
"
)
def
create_old_charts_t2
():
labels_0
=
(
"
Total
"
,
"
Mode 0
"
,
"
Mode 1
"
,
"
Mode 2
"
,
"
Mode 3
"
)
amount0
=
{
'
K1
'
:
np
.
array
([
27.27
,
27.48
,
42.53
,
23.24
,
20.68
]),
'
K2
'
:
np
.
array
([
25.31
,
21.62
,
24.52
,
28.13
,
25.55
])
}
width
=
0.9
fig0
,
ax0
=
plt
.
subplots
()
bottom
=
np
.
zeros
(
len
(
labels_0
))
for
mode
,
mode_count
in
amount0
.
items
():
p
=
ax0
.
bar
(
labels_0
,
mode_count
,
width
,
label
=
mode
,
bottom
=
bottom
)
bottom
+=
mode_count
ax0
.
bar_label
(
p
,
label_type
=
'
center
'
)
ax0
.
legend
()
ax0
.
set_ylim
(
0
,
100
)
plt
.
savefig
(
f
"
charts1/t2/chart_old0.png
"
)
labels_1
=
(
"
Total
"
,
"
Mode 0
"
,
"
Mode 1
"
,
"
Mode 2
"
,
"
Mode 3
"
)
amount1
=
{
'
K1
'
:
np
.
array
([
97.13
,
97.62
,
98.72
,
95.65
,
95.99
]),
'
K2
'
:
np
.
array
([
0
,
0
,
0
,
0
,
0
])
}
width
=
0.9
fig1
,
ax1
=
plt
.
subplots
()
bottom
=
np
.
zeros
(
len
(
labels_1
))
for
mode
,
mode_count
in
amount1
.
items
():
p
=
ax1
.
bar
(
labels_1
,
mode_count
,
width
,
label
=
mode
,
bottom
=
bottom
)
bottom
+=
mode_count
ax1
.
bar_label
(
p
,
label_type
=
'
center
'
)
ax1
.
legend
(
loc
=
'
upper right
'
,
ncols
=
2
)
ax1
.
set_ylim
(
0
,
110
)
plt
.
savefig
(
f
"
charts1/t2/chart_old1.png
"
)
fig3
,
ax3
=
plt
.
subplots
()
labels_3
=
[
"
Total
"
,
"
Mode 0
"
,
"
Mode 1
"
,
"
Mode 2
"
,
"
Mode 3
"
]
counts0
=
[
91.71
,
88.62
,
96.15
,
88.89
,
92.23
]
bar_colors
=
[
'
tab:blue
'
,
'
tab:red
'
,
'
tab:orange
'
,
'
tab:green
'
,
'
tab:purple
'
]
p
=
ax3
.
bar
(
labels_3
,
counts0
,
color
=
bar_colors
)
ax3
.
bar_label
(
p
)
ax3
.
set_ylim
(
0
,
110
)
plt
.
savefig
(
f
"
charts1/t2/chart_old2.png
"
)
fig4
,
ax4
=
plt
.
subplots
()
labels_4
=
[
"
Total
"
,
"
Mode 0
"
,
"
Mode 1
"
,
"
Mode 2
"
,
"
Mode 3
"
]
counts1
=
[
77.2
,
83.55
,
86.31
,
74.4
,
63.41
]
bar_colors
=
[
'
tab:blue
'
,
'
tab:red
'
,
'
tab:orange
'
,
'
tab:green
'
,
'
tab:purple
'
]
p
=
ax4
.
bar
(
labels_4
,
counts1
,
color
=
bar_colors
)
ax4
.
bar_label
(
p
)
ax4
.
set_ylim
(
0
,
110
)
plt
.
savefig
(
f
"
charts1/t2/chart_old3.png
"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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