'Practical difference in terminating Pytorch training using Ctrl-C or Ctrl-\

When terminating Pytorch training scripts, I find that I get control of my terminal faster when using Ctrl-\ over Ctrl-C. I understand that Ctrl-C sends SIGINT and Ctrl-\ sends SIGQUIT, and that by convention, processes catch SIGINT and do whatever they need in order to terminate gracefully.

For the average Pytorch user, is there a practical difference between the two? Aside from user scripts that have defined behaviour upon receiving SIGINT, interrupting Pytorch training shouldn't result in data loss since training can be resumed from the last snapshot of weights.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source