Hacker News new | past | comments | ask | show | jobs | submit login

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 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.



My 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....




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: