File "train.py", line 177, in
init_processes(0, opt.n_gpu_per_node, main, opt)
File "/work/09143/arnabd/ls6/I2SB/distributed_util.py", line 22, in init_processes
fn(args)
File "train.py", line 143, in main
run.train(opt, train_dataset, val_dataset, corrupt_method)
File "/work/09143/arnabd/ls6/I2SB/i2sb/runner.py", line 170, in train
x0, x1, mask, y, cond = self.sample_batch(opt, train_loader, corrupt_method)
File "/work/09143/arnabd/ls6/I2SB/i2sb/runner.py", line 124, in sample_batch
clean_img, y = next(loader)
File "/work/09143/arnabd/ls6/I2SB/i2sb/util.py", line 31, in setup_loader
yield from loader
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/prefetch_generator/init.py", line 116, in next
raise next_item
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/prefetch_generator/init.py", line 98, in run
for item in self.generator: self.queue.put((True , item))
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 652, in next
data = self._next_data()
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1347, in _next_data
return self._process_data(data)
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1373, in _process_data
data.reraise()
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/_utils.py", line 461, in reraise
raise exception
PIL.UnidentifiedImageError: Caught UnidentifiedImageError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torchvision/datasets/folder.py", line 230, in getitem
sample = self.loader(path)
File "/work/09143/arnabd/ls6/I2SB/dataset/imagenet.py", line 69, in
data_set.loader = lambda path: loader(path, data_set.lmdb_data)
File "/work/09143/arnabd/ls6/I2SB/dataset/imagenet.py", line 27, in lmdb_loader
img = Image.open(io.BytesIO(bytedata))
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/PIL/Image.py", line 3280, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x154a3e1ef130>
I get the following error when I try to run training
python train.py --n-gpu-per-node 1 --corrupt sr4x-bicubic --dataset-dir /scratch/09143/arnabd/ILSVRC/Data/CLS-LOC --batch-size 256 --microbatch 2 --beta-max 100 --log-dir . --log-writer tensorboard
File "train.py", line 177, in
init_processes(0, opt.n_gpu_per_node, main, opt)
File "/work/09143/arnabd/ls6/I2SB/distributed_util.py", line 22, in init_processes
fn(args)
File "train.py", line 143, in main
run.train(opt, train_dataset, val_dataset, corrupt_method)
File "/work/09143/arnabd/ls6/I2SB/i2sb/runner.py", line 170, in train
x0, x1, mask, y, cond = self.sample_batch(opt, train_loader, corrupt_method)
File "/work/09143/arnabd/ls6/I2SB/i2sb/runner.py", line 124, in sample_batch
clean_img, y = next(loader)
File "/work/09143/arnabd/ls6/I2SB/i2sb/util.py", line 31, in setup_loader
yield from loader
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/prefetch_generator/init.py", line 116, in next
raise next_item
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/prefetch_generator/init.py", line 98, in run
for item in self.generator: self.queue.put((True , item))
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 652, in next
data = self._next_data()
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1347, in _next_data
return self._process_data(data)
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1373, in _process_data
data.reraise()
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/_utils.py", line 461, in reraise
raise exception
PIL.UnidentifiedImageError: Caught UnidentifiedImageError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/torchvision/datasets/folder.py", line 230, in getitem
sample = self.loader(path)
File "/work/09143/arnabd/ls6/I2SB/dataset/imagenet.py", line 69, in
data_set.loader = lambda path: loader(path, data_set.lmdb_data)
File "/work/09143/arnabd/ls6/I2SB/dataset/imagenet.py", line 27, in lmdb_loader
img = Image.open(io.BytesIO(bytedata))
File "/work/09143/arnabd/ls6/miniconda/envs/i2sb/lib/python3.8/site-packages/PIL/Image.py", line 3280, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x154a3e1ef130>