PyCharm debug collecting data卡住

我是远程调试服务器上pytorch程序遇到的,一直卡在 collecting data 。重启多次无用

https://stackoverflow.com/questions/39371676/debugger-times-out-at-collecting-data

In case you landed here because you are using PyTorch (or any other deep learning library) and try to debug in PyCharm (torch 1.31, PyCharm 2019.2 in my case) but it's super slow:

Enable Gevent compatible in the Python Debugger settings as linkliu mayuyu pointed out. The problem might be caused due to debugging large deep learning models (BERT transformer in my case), but I'm not entirely sure about this.

I'm adding this answer as it's end of 2019 and this doesn't seem to be fixed yet. Further I think this is affecting many engineers using deep learning, so I hope my answer-formatting triggers their stackoverflow algorithm 😃

Note (June 2020): While adding the Gevent compatible allows you to debug PyTorch models, it will prevent you from debug your Flask application in PyCharm! My breakpoints were not working anymore and it took me a while to figure out that this flag is the reason for it. So make sure to enable it only on a per-project base.

posted on 2021-01-21 22:46  likeatree  阅读(788)  评论(0编辑  收藏  举报

导航