Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Binary paint shop problem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
Jiří Kalvoda
Binary paint shop problem
Commits
3d4fe867
Commit
3d4fe867
authored
1 year ago
by
Jiří Kalvoda
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.kam.mff.cuni.cz:jirikalvoda/binary-paint-shop-problem
parents
71c54010
600c1160
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
data_lib.py
+8
-1
8 additions, 1 deletion
data_lib.py
prace/bakalarka/g.py
+1
-1
1 addition, 1 deletion
prace/bakalarka/g.py
prace/bakalarka/index.md
+118
-74
118 additions, 74 deletions
prace/bakalarka/index.md
with
127 additions
and
76 deletions
data_lib.py
+
8
−
1
View file @
3d4fe867
...
@@ -68,7 +68,7 @@ class Run:
...
@@ -68,7 +68,7 @@ class Run:
return
self
.
algo_version
==
self
.
algo
.
current_version
return
self
.
algo_version
==
self
.
algo
.
current_version
class
Data
:
class
Data
:
def
__init__
(
self
,
logfile
=
None
,
validate_versions
=
True
):
def
__init__
(
self
,
logfile
=
None
,
validate_versions
=
True
,
remove_duplications
=
False
):
self
.
validate_versions
=
validate_versions
self
.
validate_versions
=
validate_versions
logfile
=
logfile
or
os
.
environ
.
get
(
'
LOGFILE
'
,
'
log
'
)
logfile
=
logfile
or
os
.
environ
.
get
(
'
LOGFILE
'
,
'
log
'
)
raw_json
=
"
[
"
+
open
(
logfile
,
mode
=
'
r
'
).
read
()[
0
:
-
2
]
+
"
]
"
raw_json
=
"
[
"
+
open
(
logfile
,
mode
=
'
r
'
).
read
()[
0
:
-
2
]
+
"
]
"
...
@@ -78,10 +78,17 @@ class Data:
...
@@ -78,10 +78,17 @@ class Data:
self
.
pipelines
=
{}
self
.
pipelines
=
{}
self
.
runs
=
[]
self
.
runs
=
[]
duplication_checker
=
{}
for
it
in
raw_data
:
for
it
in
raw_data
:
run
=
Run
(
self
,
it
)
run
=
Run
(
self
,
it
)
self
.
runs
.
append
(
run
)
self
.
runs
.
append
(
run
)
if
not
validate_versions
or
run
.
is_up_to_date
():
if
not
validate_versions
or
run
.
is_up_to_date
():
if
remove_duplications
:
key
=
(
run
.
n
,
run
.
seed
,
run
.
print_pipeline
())
if
key
in
duplication_checker
:
continue
duplication_checker
[
key
]
=
run
self
.
pipelines
.
setdefault
(
run
.
print_pipeline
(),
[])
self
.
pipelines
.
setdefault
(
run
.
print_pipeline
(),
[])
self
.
pipelines
[
run
.
print_pipeline
()].
append
(
run
)
self
.
pipelines
[
run
.
print_pipeline
()].
append
(
run
)
...
...
This diff is collapsed.
Click to expand it.
prace/bakalarka/g.py
+
1
−
1
View file @
3d4fe867
...
@@ -9,7 +9,7 @@ import sys, os
...
@@ -9,7 +9,7 @@ import sys, os
d
=
pathlib
.
Path
(
"
/
"
.
join
(
__file__
.
split
(
"
/
"
)[:
-
1
]))
d
=
pathlib
.
Path
(
"
/
"
.
join
(
__file__
.
split
(
"
/
"
)[:
-
1
]))
def
load
(
name
):
def
load
(
name
):
return
data_lib
.
Data
(
d
/
name
,
validate_versions
=
False
)
return
data_lib
.
Data
(
d
/
name
,
validate_versions
=
False
,
remove_duplications
=
True
)
def
load_main_test
():
def
load_main_test
():
return
load
(
d
/
"
main_test/log
"
)
return
load
(
d
/
"
main_test/log
"
)
...
...
This diff is collapsed.
Click to expand it.
prace/bakalarka/index.md
+
118
−
74
View file @
3d4fe867
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