training is freezing for multiple hours
I am fine tuning the imagenet pretrained model using around 170k training images. After certain number of iterations of training ( e.g. 1600 - depends on the training set; last week it was getting stuck around iteration 2420 on a different dataset), it seems to freeze for 3/4 ( sometimes more ) hours without showing any diagnostic message for the freeze. Has anyone experienced this / Does anyone have the solution?
I'm experiencing the same.
Even though I could not find the reason, I was able to continue training by resuming from the last snapshot taken. It freezes again after some number (usually pretty high this time) of iterations, though.
This also happens to me. It happens for a while now.
I did some investigation into this:
- When I let the training continue the computer "defreezes" after some time. Somtimes it takes minutes, but I have seen it to take almost 24 hours. When I let the training continue this freezing happens every few hours.
- I replaces the data layer with a dummy data layer and run it again. This time this freezing didn't happen. (I run it for about 24 hours and only once, so it may be a coincidence.)
Currently I assume it has something to do with the lmdb dataset implementation, and am looking into the code. @shelhamer I think a bug should be open for this.
@talda this sounds quite serious. A data pipeline overhaul is on the charts for after the CVPR deadline. In particular, simplifying and verifying the correctness of #1238 is on the list.
Stalling like this was never observed for training the Caffe reference models 100,000s of iterations. An issue was potentially introduced with the merge of #1238 or other data refactoring. You could try your training by running a version before #1238 to help diagnose the problem.
@shelhamer This problem happened also before #1238 It started to happen to me when I switched from a much older version to fc921bf9d6959f06705b7ea52b2e28733b3fdd42 (and continue to happen after #1238).
If this is the same problem as #1377, try setting /proc/sys/vm/swappiness to zero. This solved our system freezes. See this very helpful answer from the main author of LMDB, http://www.openldap.org/lists/openldap-technical/201503/msg00077.html
There are more possible alternative solutions in #1377 discussion.