@@ -88,7 +88,7 @@ def test_bottomup_dataset(minimal_instance, tmp_path):
8888 cache_img = "memory" ,
8989 apply_aug = base_bottom_config .use_augmentations_train ,
9090 )
91- dataset ._fill_cache ()
91+ dataset ._fill_cache ([ sio . load_slp ( minimal_instance )] )
9292
9393 gt_sample_keys = [
9494 "image" ,
@@ -201,7 +201,7 @@ def test_bottomup_dataset(minimal_instance, tmp_path):
201201 cache_img = "disk" ,
202202 cache_img_path = f"{ tmp_path } /cache_imgs" ,
203203 )
204- dataset ._fill_cache ()
204+ dataset ._fill_cache ([ sio . load_slp ( minimal_instance )] )
205205
206206 gt_sample_keys = [
207207 "image" ,
@@ -314,7 +314,7 @@ def test_bottomup_multiclass_dataset(minimal_instance, tmp_path):
314314 cache_img = "memory" ,
315315 apply_aug = base_bottom_config .use_augmentations_train ,
316316 )
317- dataset ._fill_cache ()
317+ dataset ._fill_cache ([ tracked_labels ] )
318318
319319 sample = next (iter (dataset ))
320320 assert len (sample .keys ()) == len (gt_sample_keys )
@@ -400,7 +400,7 @@ def test_bottomup_multiclass_dataset(minimal_instance, tmp_path):
400400 cache_img = "disk" ,
401401 cache_img_path = f"{ tmp_path } /cache_imgs" ,
402402 )
403- dataset ._fill_cache ()
403+ dataset ._fill_cache ([ tracked_labels ] )
404404
405405 sample = next (iter (dataset ))
406406 assert len (sample .keys ()) == len (gt_sample_keys )
@@ -446,7 +446,13 @@ def test_centered_instance_dataset(minimal_instance, tmp_path):
446446 cache_img = "disk" ,
447447 cache_img_path = f"{ tmp_path } /cache_imgs" ,
448448 )
449- dataset ._fill_cache ()
449+ dataset ._fill_cache (
450+ [
451+ sio .load_slp (minimal_instance ),
452+ sio .load_slp (minimal_instance ),
453+ sio .load_slp (minimal_instance ),
454+ ]
455+ )
450456
451457 gt_sample_keys = [
452458 "centroid" ,
@@ -481,7 +487,7 @@ def test_centered_instance_dataset(minimal_instance, tmp_path):
481487 cache_img = "memory" ,
482488 apply_aug = base_topdown_data_config .use_augmentations_train ,
483489 )
484- dataset ._fill_cache ()
490+ dataset ._fill_cache ([ sio . load_slp ( minimal_instance )] )
485491
486492 gt_sample_keys = [
487493 "centroid" ,
@@ -711,7 +717,7 @@ def test_centered_multiclass_dataset(minimal_instance, tmp_path):
711717 cache_img = "disk" ,
712718 cache_img_path = f"{ tmp_path } /cache_imgs" ,
713719 )
714- dataset ._fill_cache ()
720+ dataset ._fill_cache ([ tracked_labels , tracked_labels , tracked_labels ] )
715721
716722 gt_sample_keys = [
717723 "centroid" ,
@@ -749,7 +755,7 @@ def test_centered_multiclass_dataset(minimal_instance, tmp_path):
749755 cache_img = "memory" ,
750756 apply_aug = base_topdown_data_config .use_augmentations_train ,
751757 )
752- dataset ._fill_cache ()
758+ dataset ._fill_cache ([ tracked_labels ] )
753759
754760 sample = next (iter (dataset ))
755761 assert len (sample .keys ()) == len (gt_sample_keys )
@@ -923,7 +929,7 @@ def test_centroid_dataset(minimal_instance, tmp_path):
923929 cache_img = "disk" ,
924930 cache_img_path = f"{ tmp_path } /cache_imgs" ,
925931 )
926- dataset ._fill_cache ()
932+ dataset ._fill_cache ([ sio . load_slp ( minimal_instance )] )
927933
928934 gt_sample_keys = [
929935 "image" ,
@@ -957,7 +963,7 @@ def test_centroid_dataset(minimal_instance, tmp_path):
957963 apply_aug = base_centroid_data_config .use_augmentations_train ,
958964 labels = [sio .load_slp (minimal_instance )],
959965 )
960- dataset ._fill_cache ()
966+ dataset ._fill_cache ([ sio . load_slp ( minimal_instance )] )
961967
962968 gt_sample_keys = [
963969 "image" ,
@@ -1094,7 +1100,7 @@ def test_single_instance_dataset(minimal_instance, tmp_path):
10941100 cache_img = "disk" ,
10951101 cache_img_path = f"{ tmp_path } /cache_imgs" ,
10961102 )
1097- dataset ._fill_cache ()
1103+ dataset ._fill_cache ([ labels , labels , labels ] )
10981104 sample = next (iter (dataset ))
10991105 assert len (dataset ) == 3
11001106
@@ -1127,7 +1133,7 @@ def test_single_instance_dataset(minimal_instance, tmp_path):
11271133 cache_img = "memory" ,
11281134 apply_aug = base_singleinstance_data_config .use_augmentations_train ,
11291135 )
1130- dataset ._fill_cache ()
1136+ dataset ._fill_cache ([ labels ] )
11311137
11321138 sample = next (iter (dataset ))
11331139 assert len (dataset ) == 1
0 commit comments