@@ -69,8 +69,9 @@ def validate_data_split(
69
69
70
70
if batch_size is not None :
71
71
num_of_cells = n_train % batch_size
72
- if ((num_of_cells < 3 and num_of_cells > 0 ) and
73
- not (num_of_cells == 1 and drop_last is True )):
72
+ if (num_of_cells < 3 and num_of_cells > 0 ) and not (
73
+ num_of_cells == 1 and drop_last is True
74
+ ):
74
75
warnings .warn (
75
76
f"Last batch will have a small size of { num_of_cells } "
76
77
f"samples. Consider changing settings.batch_size or batch_size in model.train "
@@ -166,8 +167,9 @@ def validate_data_split_with_external_indexing(
166
167
167
168
if batch_size is not None :
168
169
num_of_cells = n_train % batch_size
169
- if ((num_of_cells < 3 and num_of_cells > 0 )
170
- and not (num_of_cells == 1 and drop_last is True )):
170
+ if (num_of_cells < 3 and num_of_cells > 0 ) and not (
171
+ num_of_cells == 1 and drop_last is True
172
+ ):
171
173
warnings .warn (
172
174
f"Last batch will have a small size of { num_of_cells } "
173
175
f"samples. Consider changing settings.batch_size or batch_size in model.train "
@@ -263,7 +265,7 @@ def __init__(
263
265
self .validation_size ,
264
266
self .data_loader_kwargs .pop ("batch_size" , settings .batch_size ),
265
267
self .drop_last ,
266
- self .train_size_is_none
268
+ self .train_size_is_none ,
267
269
)
268
270
269
271
def setup (self , stage : str | None = None ):
@@ -446,7 +448,7 @@ def setup(self, stage: str | None = None):
446
448
self .validation_size ,
447
449
self .data_loader_kwargs .pop ("batch_size" , settings .batch_size ),
448
450
self .drop_last ,
449
- self .train_size_is_none
451
+ self .train_size_is_none ,
450
452
)
451
453
452
454
labeled_permutation = self ._labeled_indices
@@ -487,7 +489,7 @@ def setup(self, stage: str | None = None):
487
489
self .validation_size ,
488
490
self .data_loader_kwargs .pop ("batch_size" , settings .batch_size ),
489
491
self .drop_last ,
490
- self .train_size_is_none
492
+ self .train_size_is_none ,
491
493
)
492
494
493
495
unlabeled_permutation = self ._unlabeled_indices
0 commit comments