Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.pipelines
Commits
ef0d089b
Commit
ef0d089b
authored
Mar 26, 2020
by
Tiago de Freitas Pereira
Browse files
Changed make dirs function
parent
b2f1c962
Pipeline
#38375
failed with stage
in 3 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pipelines/mixins.py
View file @
ef0d089b
...
...
@@ -315,12 +315,12 @@ class CheckpointMixin:
def
save
(
self
,
sample
):
if
isinstance
(
sample
,
Sample
):
path
=
self
.
make_path
(
sample
)
bob
.
io
.
base
.
create_directories_safe
(
os
.
path
.
dirname
(
path
))
os
.
makedirs
(
os
.
path
.
dirname
(
path
)
,
exist_ok
=
True
)
return
self
.
save_func
(
sample
.
data
,
path
)
elif
isinstance
(
sample
,
SampleSet
):
for
s
in
sample
.
samples
:
path
=
self
.
make_path
(
s
)
bob
.
io
.
base
.
create_directories_safe
(
os
.
path
.
dirname
(
path
))
os
.
makedirs
(
os
.
path
.
dirname
(
path
)
,
exist_ok
=
True
)
return
self
.
save_func
(
s
.
data
,
path
)
else
:
raise
ValueError
(
"Type for sample not supported %s"
%
type
(
sample
))
...
...
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!
Cancel
Please
register
or
sign in
to comment