3 ms·
Interesting! The approach I take to the "script fails after running for an hour" problem is to drop into a debugger on an exception. I use https://gist.github.c
by naftaliharris 11y ago
Interesting! The approach I take to the "script fails after running for an hour" problem is to drop into a debugger on an exception. I use https://gist.github.com/naftaliharris/8284193 https://gist.github.com/naftaliharris/8284193 for this but you can also use "python -m pdb myscript.py" or "python -i myscript.py" and then "import pdb; pdb.pm()" when your script fails.
- sdenton4 11y agoMy approach has always been to do checkpointing on long computations, so that if something fails in step n, it can pick back up again from step n-1. Of course, if your script has REAL problems, your data is going to be suspect at step n-1 as well....