Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StopIteration Error #5

Open
realmadridchenwentao opened this issue Mar 19, 2023 · 2 comments
Open

StopIteration Error #5

realmadridchenwentao opened this issue Mar 19, 2023 · 2 comments

Comments

@realmadridchenwentao
Copy link

Thanks for your reply about the dataset in the former issue!
After I fine-tune the SIIM-ACR Pneumothorax segmentation task with pre-trained model weights and run ft.sh with mmsegmentation, the following error is reported:

Traceback (most recent call last):
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 34, in __next__
    data = next(self.iter_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
    data = self._next_data()
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1172, in _next_data
    raise StopIteration
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tools/train.py", line 242, in <module>
    main()
  File "tools/train.py", line 231, in main
    train_segmentor(
  File "/home/wentaochen/mmsegmentation/mmseg/apis/train.py", line 194, in train_segmentor
    runner.run(data_loaders, cfg.workflow)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 144, in run
    iter_runner(iter_loaders[i], **kwargs)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 61, in train
    data_batch = next(data_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 41, in __next__
    data = next(self.iter_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
    data = self._next_data()
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1172, in _next_data
    raise StopIteration
StopIteration
Traceback (most recent call last):
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 34, in __next__
    data = next(self.iter_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
    data = self._next_data()
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1172, in _next_data
    raise StopIteration
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tools/train.py", line 242, in <module>
    main()
  File "tools/train.py", line 231, in main
    train_segmentor(
  File "/home/wentaochen/mmsegmentation/mmseg/apis/train.py", line 194, in train_segmentor
    runner.run(data_loaders, cfg.workflow)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 144, in run
    iter_runner(iter_loaders[i], **kwargs)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 61, in train
    data_batch = next(data_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 41, in __next__
    data = next(self.iter_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
    data = self._next_data()
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1172, in _next_data
    raise StopIteration
StopIteration
Traceback (most recent call last):
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 34, in __next__
    data = next(self.iter_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
    data = self._next_data()
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1172, in _next_data
    raise StopIteration
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tools/train.py", line 242, in <module>
    main()
  File "tools/train.py", line 231, in main
    train_segmentor(
  File "/home/wentaochen/mmsegmentation/mmseg/apis/train.py", line 194, in train_segmentor
    runner.run(data_loaders, cfg.workflow)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 144, in run
    iter_runner(iter_loaders[i], **kwargs)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 61, in train
    data_batch = next(data_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 41, in __next__
    data = next(self.iter_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
    data = self._next_data()
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1172, in _next_data
    raise StopIteration
StopIteration
Traceback (most recent call last):
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 34, in __next__
    data = next(self.iter_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
    data = self._next_data()
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1172, in _next_data
    raise StopIteration
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tools/train.py", line 242, in <module>
    main()
  File "tools/train.py", line 231, in main
    train_segmentor(
  File "/home/wentaochen/mmsegmentation/mmseg/apis/train.py", line 194, in train_segmentor
    runner.run(data_loaders, cfg.workflow)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 144, in run
    iter_runner(iter_loaders[i], **kwargs)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 61, in train
    data_batch = next(data_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/mmcv/runner/iter_based_runner.py", line 41, in __next__
    data = next(self.iter_loader)
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
    data = self._next_data()
  File "/home/wentaochen/anaconda3/envs/MRM/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1172, in _next_data
    raise StopIteration
StopIteration

Hope you can give me some advice! Thank you very much!

@SZUHvern
Copy link

I have the same problem, have you solved it?

@GUESSZERO4
Copy link

I had the same problem when I recently reproduced this work? Have you solved it yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants