Path.iterdir() yields paths in an arbitrary order so it needs to be sorted when using it to assign labels for a classifier.
I got burned by this when repurposing the GenomicBenchmarkDataset class for my own data sets. We had to swap the positive and negative samples in the test data for them to get the correct classification labels! This PR fixes that.
Path.iterdir() yields paths in an arbitrary order so it needs to be sorted when using it to assign labels for a classifier.
I got burned by this when repurposing the
GenomicBenchmarkDataset
class for my own data sets. We had to swap the positive and negative samples in the test data for them to get the correct classification labels! This PR fixes that.