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

module 'signal' has no attribute 'SIGALRM' when training in dataset #6871

Closed
1 task done
tongtongkunkun opened this issue Mar 6, 2022 · 4 comments · Fixed by #7013
Closed
1 task done

module 'signal' has no attribute 'SIGALRM' when training in dataset #6871

tongtongkunkun opened this issue Mar 6, 2022 · 4 comments · Fixed by #7013
Labels
question Further information is requested

Comments

@tongtongkunkun
Copy link

Search before asking

Question

this problem came to when I run in the window system.
the error as following:

module 'signal' has no attribute 'SIGALRM'

AutoAnchor: 5.67 anchors/target, 1.000 Best Possible Recall (BPR). Current anchors are a good fit to dataset
Image sizes 64 train, 64 val
Using 8 dataloader workers
Logging results to runs\train\exp13
Starting training for 100 epochs...

 Epoch   gpu_mem       box       obj       cls    labels  img_size

0%| | 0/127 [00:05<?, ?it/s]
Traceback (most recent call last):
File "D:\anacoda\anacoda-install\lib\site-packages\torch\utils\data\dataloader.py", line 872, in _try_get_data
data = self._data_queue.get(timeout=timeout)
File "D:\anacoda\anacoda-install\lib\queue.py", line 178, in get
raise Empty
_queue.Empty

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:/Machine_Learning/yolov5/yolov5-master/yolov5-master/train.py", line 643, in
main(opt)
File "E:/Machine_Learning/yolov5/yolov5-master/yolov5-master/train.py", line 539, in main
train(opt.hyp, opt, device, callbacks)
File "E:/Machine_Learning/yolov5/yolov5-master/yolov5-master/train.py", line 305, in train
for i, (imgs, targets, paths, _) in pbar: # batch -------------------------------------------------------------
File "D:\anacoda\anacoda-install\lib\site-packages\tqdm\std.py", line 1167, in iter
for obj in iterable:
File "E:\Machine_Learning\yolov5\yolov5-master\yolov5-master\utils\datasets.py", line 141, in iter
yield next(self.iterator)
File "D:\anacoda\anacoda-install\lib\site-packages\torch\utils\data\dataloader.py", line 435, in next
data = self._next_data()
File "D:\anacoda\anacoda-install\lib\site-packages\torch\utils\data\dataloader.py", line 1068, in _next_data
idx, data = self._get_data()
File "D:\anacoda\anacoda-install\lib\site-packages\torch\utils\data\dataloader.py", line 1024, in _get_data
success, data = self._try_get_data()
File "D:\anacoda\anacoda-install\lib\site-packages\torch\utils\data\dataloader.py", line 885, in _try_get_data
raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str)) from e
RuntimeError: DataLoader worker (pid(s) 2924, 11744, 6944, 11576, 8828, 17232, 5968, 5168) exited unexpectedly

Process finished with exit code 1

Additional

No response

@tongtongkunkun tongtongkunkun added the question Further information is requested label Mar 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2022

👋 Hello @tongtongkunkun, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://ultralytics.com or email support@ultralytics.com.

Requirements

Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

@glenn-jocher
Copy link
Member

glenn-jocher commented Mar 6, 2022

@tongtongkunkun it appears you may have environment problems. Please ensure you meet all dependency requirements if you are attempting to run YOLOv5 locally. If in doubt, create a new virtual Python 3.9 environment, clone the latest repo (code changes daily), and pip install requirements.txt again from scratch.

💡 ProTip! Try one of our verified environments below if you are having trouble with your local environment.

Requirements

Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Models and datasets download automatically from the latest YOLOv5 release when first requested.

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

@yeshanliu
Copy link
Contributor

yeshanliu commented Mar 16, 2022

#5395 (comment) Find 'plot_labels' and remove 'Timeout(30)' behind it.

@glenn-jocher
Copy link
Member

@tongtongkunkun @yeshanliu good news 😃! Your original issue may now be fixed ✅ in PR #7013. This PR disables Timout using SIGALARM on Windows. To receive this update:

  • Gitgit pull from within your yolov5/ directory or git clone https://github.com/ultralytics/yolov5 again
  • PyTorch Hub – Force-reload model = torch.hub.load('ultralytics/yolov5', 'yolov5s', force_reload=True)
  • Notebooks – View updated notebooks Open In Colab Open In Kaggle
  • Dockersudo docker pull ultralytics/yolov5:latest to update your image Docker Pulls

Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀!

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

Successfully merging a pull request may close this issue.

3 participants