From 9dde3c25130543821795ca3b682429e3593fc95d Mon Sep 17 00:00:00 2001 From: Tiago Freitas Pereira <tiagofrepereira@gmail.com> Date: Mon, 27 Jul 2020 14:31:38 +0200 Subject: [PATCH] Clening up checkpoint wrapper --- .../base/pipelines/vanilla_biometrics/wrappers.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/bob/bio/base/pipelines/vanilla_biometrics/wrappers.py b/bob/bio/base/pipelines/vanilla_biometrics/wrappers.py index 0a8f2a84..0728a687 100644 --- a/bob/bio/base/pipelines/vanilla_biometrics/wrappers.py +++ b/bob/bio/base/pipelines/vanilla_biometrics/wrappers.py @@ -161,6 +161,7 @@ class BioAlgorithmCheckpointWrapper(BioAlgorithm): _make_name(sampleset, biometric_references) + self._score_extension, ) + parent = sampleset if self.force or not os.path.exists(path): # Computing score @@ -170,14 +171,11 @@ class BioAlgorithmCheckpointWrapper(BioAlgorithm): allow_scoring_with_all_biometric_references=allow_scoring_with_all_biometric_references, ) self.write_scores(scored_sample_set.samples, path) + parent = scored_sample_set - scored_sample_set = DelayedSampleSet( - functools.partial(_load, path), parent=scored_sample_set - ) - - else: - samples = _load(path) - scored_sample_set = SampleSet(samples, parent=sampleset) + scored_sample_set = DelayedSampleSet( + functools.partial(_load, path), parent=parent + ) return scored_sample_set -- GitLab