Skip to content
Snippets Groups Projects
Commit cc3e85e6 authored by Manuel Günther's avatar Manuel Günther
Browse files

Using derived class BioFile.load functions as default for read_original_data

parent 63d3b73e
No related branches found
No related tags found
2 merge requests!37Issue 8 remove database configuration,!33WIP: Resolve "Preprocessor does not use the load method of the BioFile class"
Pipeline #
...@@ -21,13 +21,13 @@ class Preprocessor: ...@@ -21,13 +21,13 @@ class Preprocessor:
read_original_data: callable read_original_data: callable
This function is used to read the original data from file. This function is used to read the original data from file.
It takes three inputs: A :py:class:`bob.bio.db.BioFile`, the original directory (as ``str``) and the original extension (as ``str``). It takes three inputs: A :py:class:`bob.bio.db.BioFile` (or one of its derivatives), the original directory (as ``str``) and the original extension (as ``str``).
kwargs : ``key=value`` pairs kwargs : ``key=value`` pairs
A list of keyword arguments to be written in the :py:meth:`__str__` function. A list of keyword arguments to be written in the :py:meth:`__str__` function.
""" """
def __init__(self, writes_data = True, read_original_data = bob.bio.db.BioFile.load, **kwargs): def __init__(self, writes_data = True, read_original_data = lambda biofile,directory,extension : biofile.load(directory,extension), **kwargs):
# Each class needs to have a constructor taking # Each class needs to have a constructor taking
# all the parameters that are required for the preprocessing as arguments # all the parameters that are required for the preprocessing as arguments
self.writes_data = writes_data self.writes_data = writes_data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment