Commit 91d31a1d authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Make the load function accepts a path

parent 648e787a
Pipeline #38439 failed with stage
in 3 minutes and 4 seconds
......@@ -281,9 +281,7 @@ class CheckpointMixin:
# save the new sample
# Setting the solved path to the sample
sample.path = path
new_sample = self.load(sample)
new_sample = self.load(sample, path)
return new_sample
......@@ -333,13 +331,13 @@ class CheckpointMixin:
raise ValueError("Type for sample not supported %s" % type(sample))
def load(self, sample):
def load(self, sample, path):
# because we are checkpointing, we return a DelayedSample
# instead of a normal (preloaded) sample. This allows the next
# phase to avoid loading it would it be unnecessary (e.g. next
# phase is already check-pointed)
return DelayedSample(
functools.partial(self.load_func, sample.path), parent=sample
functools.partial(self.load_func, path), parent=sample
def load_model(self):
Supports Markdown
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