diff --git a/bob/bio/base/database/database.py b/bob/bio/base/database/database.py index 2ab5156477c2803242ece20cb1bb8ad27640eabc..63092420c5cebac8f3e4b8ba0ab1160a91a9fcc7 100644 --- a/bob/bio/base/database/database.py +++ b/bob/bio/base/database/database.py @@ -9,7 +9,7 @@ from numpy.testing.decorators import setastest import bob.db.base -class BioDatabase(six.with_metaclass(abc.ABCMeta, bob.db.base.Database)): +class BioDatabase(six.with_metaclass(abc.ABCMeta, bob.db.base.FileDatabase)): """This class represents the basic API for database access. Please use this class as a base class for your database access classes. Do not forget to call the constructor of this base class in your derived class. @@ -90,7 +90,8 @@ class BioDatabase(six.with_metaclass(abc.ABCMeta, bob.db.base.Database)): super(BioDatabase, self).__init__( original_directory=original_directory, - original_extension=original_extension) + original_extension=original_extension, + **kwargs) self.name = name @@ -100,7 +101,7 @@ class BioDatabase(six.with_metaclass(abc.ABCMeta, bob.db.base.Database)): self.enroller_training_options = enroller_training_options self.check_existence = check_original_files_for_existence - self._kwargs = kwargs + self._kwargs = {} self.annotation_directory = annotation_directory self.annotation_extension = annotation_extension diff --git a/bob/bio/base/database/filelist/query.py b/bob/bio/base/database/filelist/query.py index c3454093192d7c54f6eb0f40145b30da76421607..4bb6487ba9a86e080f6cd5e2ee91b11653a3cf57 100644 --- a/bob/bio/base/database/filelist/query.py +++ b/bob/bio/base/database/filelist/query.py @@ -130,7 +130,6 @@ class FileListBioDatabase(ZTBioDatabase): and the given sub-directories and file names (which default to useful values if not given).""" super(FileListBioDatabase, self).__init__( - filelists_directory=filelists_directory, name=name, protocol=protocol, original_directory=original_directory, @@ -138,7 +137,10 @@ class FileListBioDatabase(ZTBioDatabase): annotation_directory=annotation_directory, annotation_extension=annotation_extension, annotation_type=annotation_type, - # extra args for pretty printing + **kwargs) + # extra args for pretty printing + self._kwargs.update(dict( + filelists_directory=filelists_directory, dev_sub_directory=dev_sub_directory, eval_sub_directory=eval_sub_directory, world_filename=world_filename, @@ -150,9 +152,10 @@ class FileListBioDatabase(ZTBioDatabase): tnorm_filename=tnorm_filename, znorm_filename=znorm_filename, use_dense_probe_file_list=use_dense_probe_file_list, - # if both probe_filename and scores_filename are given, what kind of list should be used? + # if both probe_filename and scores_filename are given, what kind + # of list should be used? keep_read_lists_in_memory=keep_read_lists_in_memory, - **kwargs) + )) # self.original_directory = original_directory # self.original_extension = original_extension self.bio_file_class = bio_file_class