Method `get_samples` should return all samples if `split` is `None`
As discussed in our last one-on-one, the method get_samples()
(https://gitlab.idiap.ch/bob/bob.db.drive/blob/master/bob/db/drive/query.py#L54) should return all samples if split
is None
, which should be the default. This helps when homogeneously applying pre-processing to all samples given a certain protocol. Otherwise, pre-processing may need to know the split names for every dataset.
Furthermore, there is an inconsistence between paths
that get paths and get_samples
which gets samples.
I particularly find the use of the verb unnecessary in this case. To homogenise your method names, I suggest you use paths
and samples
as method names.
If you make samples()
function when split=None
, then paths()
can be implemented simply as:
def paths(self):
return list(itertools.chain((k.img_path, k.gt_path) for k in self.samples()))
Notice this process tends to be more robust because you're always going through samples()
instead of having two code paths on your class.