Skip to content

Commit 55f21ad

Browse files
authored
Quickfix WDS (lucidrains#357)
Deprecated length attribute got removed in the latest WebDataset version, so only check the length of the dataset if not using WDS. Thanks to ARKseal for pointing out to that bug.
1 parent eacb720 commit 55f21ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train_dalle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,8 @@ def tokenize(s):
382382
tokenizer=tokenizer,
383383
shuffle=is_shuffle,
384384
)
385+
assert len(ds) > 0, 'dataset is empty'
385386

386-
assert len(ds) > 0, 'dataset is empty'
387387
if distr_backend.is_root_worker():
388388
if not ENABLE_WEBDATASET:
389389
print(f'{len(ds)} image-text pairs found for training')

0 commit comments

Comments
 (0)