Skip to content

Commit 1ae744c

Browse files
committed
BUG: fix bugs in lazy loader.
1 parent 4946f55 commit 1ae744c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

barcodebert/pretraining.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ def print_pass(*args, **kwargs):
182182
eval_set = "Val"
183183

184184
# Dataloaders -------------------------------------------------------------
185+
if config.cpu_workers is None:
186+
config.cpu_workers = utils.get_num_cpu_available()
187+
185188
if config.lazy_load:
186189
# streaming IterableDataset → no sampler, no shuffle
187190
stream_kwargs = {

0 commit comments

Comments
 (0)