From 3f1d1267cfe105816ac5ec579777140770351f36 Mon Sep 17 00:00:00 2001 From: Santiago Castro Date: Tue, 9 Jan 2024 08:23:36 -0500 Subject: [PATCH] Fix crash when using `--distributed` (#114) --- clip_benchmark/datasets/builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clip_benchmark/datasets/builder.py b/clip_benchmark/datasets/builder.py index f8dd95d..14c1e56 100644 --- a/clip_benchmark/datasets/builder.py +++ b/clip_benchmark/datasets/builder.py @@ -759,7 +759,7 @@ def read_txt(fname): if not cache_dir or not isinstance(cache_dir, str): cache_dir = None dataset = ( - wds.WebDataset(filepattern, cache_dir=cache_dir) + wds.WebDataset(filepattern, cache_dir=cache_dir, nodesplitter=lambda src: src) .decode(wds.autodecode.ImageHandler("pil", extensions=["webp", "png", "jpg", "jpeg"])) ) # Load based on classification or retrieval task