File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -509,10 +509,17 @@ def load_sample(
509
509
else :
510
510
sample_path = paths ["bg" ]
511
511
512
- sample_path = sample_path / year
513
-
514
- full_samples_list = listdir (sample_path ) # get all directories in data_dir
515
- load_samples = [str (s ) for s in full_samples_list if sample .get_selector (year ).match (s )]
512
+ if not isinstance (sample_path , list ):
513
+ sample_path = [sample_path ]
514
+
515
+ # find the directory that contains the sample
516
+ for sp in sample_path :
517
+ spy = sp / year
518
+ full_samples_list = listdir (spy ) # get all directories in data_dir
519
+ load_samples = [str (s ) for s in full_samples_list if sample .get_selector (year ).match (s )]
520
+ if len (load_samples ):
521
+ sample_path = spy
522
+ break
516
523
517
524
logger .info (f"Loading { load_samples } " )
518
525
You can’t perform that action at this time.
0 commit comments