Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.base
Commits
508293fc
Commit
508293fc
authored
Oct 24, 2017
by
Manuel Günther
Browse files
Removed write_commands function in grid_search (closes
#71
)
parent
b5d283c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
bob/bio/base/script/grid_search.py
View file @
508293fc
...
...
@@ -90,9 +90,6 @@ def command_line_options(command_line_parameters):
parser
.
add_argument
(
'-G'
,
'--gridtk-database-directory'
,
metavar
=
'DIR'
,
default
=
'grid_db'
,
help
=
'Directory where the submitted.sql3 files should be written into (will create sub-directories on need)'
)
parser
.
add_argument
(
'-w'
,
'--write-commands'
,
help
=
'(optional) The file name where to write the calls into (will not write the dependencies, though)'
)
parser
.
add_argument
(
'-q'
,
'--dry-run'
,
action
=
'store_true'
,
help
=
'Just write the commands to console and mimic dependencies, but do not execute the commands'
)
...
...
@@ -301,18 +298,6 @@ def execute_dependent_task(command_line, directories, dependency_level):
if
args
.
parameters
is
not
None
:
command_line
+=
args
.
parameters
[
1
:]
# write the command to file?
if
args
.
write_commands
:
index
=
command_line
.
index
(
'--gridtk-database-file'
)
command_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
command_line
[
index
+
1
]),
args
.
write_commands
)
bob
.
io
.
base
.
create_directories_safe
(
os
.
path
.
dirname
(
command_file
))
with
open
(
command_file
,
'w'
)
as
f
:
f
.
write
(
'bin/verify.py '
)
for
p
in
command_line
:
f
.
write
(
p
+
' '
)
f
.
close
()
logger
.
info
(
"Wrote command line into file '%s'"
,
command_file
)
# extract dependencies
global
job_ids
dependencies
=
[]
...
...
bob/bio/base/test/test_scripts.py
View file @
508293fc
...
...
@@ -591,7 +591,6 @@ def test_grid_search():
'-G'
,
test_dir
,
'-T'
,
test_dir
,
'-R'
,
test_dir
,
'-w'
,
'Job.txt'
,
'-g'
,
'grid'
,
'-v'
,
'--'
,
'--dry-run'
,
...
...
@@ -613,7 +612,6 @@ def test_grid_search():
'-G'
,
test_dir
,
'-T'
,
test_dir
,
'-R'
,
test_dir
,
'-w'
,
'Job.txt'
,
'-l'
,
'4'
,
'-L'
,
'-1'
,
'-v'
,
'--'
,
'--imports'
,
'bob.io.image'
,
'--dry-run'
,
...
...
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