Changed make dirs function

parent b2f1c962
Pipeline #38375 failed with stage
in 3 minutes and 31 seconds
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment