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

Segmenting the scores and biometric references checkpoints by group to avoid...

Segmenting the scores and biometric references checkpoints by group to avoid too many files in one directory
parent a1d08d1b
......@@ -38,16 +38,24 @@ class BioAlgorithmCheckpointWrapper(BioAlgorithm):
def __init__(self, biometric_algorithm, base_dir, force=False, **kwargs):
def __init__(self, biometric_algorithm, base_dir, group=None, force=False, **kwargs):
self.biometric_reference_dir = os.path.join(base_dir, "biometric_references")
self.score_dir = os.path.join(base_dir, "scores")
self.base_dir = base_dir
self.biometric_algorithm = biometric_algorithm
self.force = force
self._biometric_reference_extension = ".hdf5"
self._score_extension = ".pkl"
self.base_dir = base_dir
self._score_extension = ".pkl"
def set_score_references_path(self, group):
if group is None:
self.biometric_reference_dir = os.path.join(self.base_dir, "biometric_references")
self.score_dir = os.path.join(self.base_dir, "scores")
self.biometric_reference_dir = os.path.join(self.base_dir, group, "biometric_references")
self.score_dir = os.path.join(self.base_dir, group, "scores")
def enroll(self, enroll_features):
return self.biometric_algorithm.enroll(enroll_features)
......@@ -190,6 +198,9 @@ class BioAlgorithmDaskWrapper(BioAlgorithm):
biometric_references, data
def set_score_references_path(self, group):
def dask_vanilla_biometrics(pipeline, npartitions=None, partition_size=None):
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