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
e45cd27c
Commit
e45cd27c
authored
Nov 25, 2015
by
Manuel Günther
Browse files
Fixed --skip-when-existing option of grid_search.py
parent
29fa6673
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/base/script/grid_search.py
View file @
e45cd27c
...
...
@@ -319,14 +319,14 @@ def execute_dependent_task(command_line, directories, dependency_level):
# add dependencies
if
dependencies
:
command_line
+=
[
'--external-dependencies'
]
+
[
str
(
d
)
for
d
in
dependencies
]
command_line
+=
[
'--external-dependencies'
]
+
[
str
(
d
)
for
d
in
sorted
(
list
(
set
(
dependencies
)))
]
# execute the command
new_job_ids
=
{}
try
:
verif_args
=
verify
.
parse_arguments
(
command_line
)
result_dir
=
os
.
path
.
join
(
verif_args
.
result_directory
,
verif_args
.
sub_directory
)
if
not
args
.
skip_when_existent
or
not
os
.
path
.
exists
(
result_dir
):
result_dir
s
=
[
os
.
path
.
join
(
verif_args
.
result_directory
,
verif_args
.
database
.
protocol
,
verif_args
.
score_directories
[
i
])
for
i
in
((
0
,
1
)
if
verif_args
.
zt_norm
else
(
0
,))]
if
not
args
.
skip_when_existent
or
not
all
(
os
.
path
.
exists
(
result_dir
)
for
result_dir
in
result_dirs
)
:
# get the command line parameter for the result directory
if
args
.
dry_run
:
if
args
.
verbose
:
...
...
@@ -336,7 +336,7 @@ def execute_dependent_task(command_line, directories, dependency_level):
global
fake_job_id
new_job_ids
=
verify
.
verify
(
verif_args
,
command_line
,
external_fake_job_id
=
fake_job_id
)
else
:
logger
.
info
(
"Skipping execution of %s since result director
y
'%s' already exists"
,
tools
.
command_line
(
command_line
),
result_dir
)
logger
.
info
(
"Skipping execution of %s since result director
ies
'%s' already exists"
,
tools
.
command_line
(
command_line
),
result_dir
s
)
except
Exception
as
e
:
logger
.
error
(
"The execution of job was rejected!
\n
%s
\n
Reason:
\n
%s"
,
tools
.
command_line
(
command_line
),
e
)
...
...
Write
Preview
Supports
Markdown
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