alternative to jupyter notebook?
I have a number of problems using Jupyter notebook, windows 10. When my .ipynb file reaches a certain length, sage basically grinds to a halt, and I need to start a new file. When doing a long calculation, where each bit needs the calculations from the previous part, this isn't practical. Also, when I "save" an .ipynb file, the actual calculations aren't saved, and each file takes about half a day to go through and recalculate everything again. I have about 5 files now, and the power keeps flickering on and off briefly... Also, it happens constantly that sage won't let me type anything in. This can last for up to 10 minutes at a time, and seems to have something to do with the way the file is saved. I haven't even reached the final part of my calculation, which is the part I expect to be the slowest by far. My husband tells me to stop messing around with windows and learn Linux. Any other suggestions? Thanks very much!
At least as a workaround you can save and load intermediate results (see the examples there).
You may also save/load the whole session:
Then, in another notebook:
Basically, your problem seems not to be Jupyter per se, but the size of your problem's computation.
You may have hit a (new ?) bug. Further exploration may be in order.
Correct. You should explicitly
save
the computed objects, andload
them when needed. See alsosave_session
, but take note of its limits...'rburning`'s suggestion to split your work by saving each part's results as needed is sound. BTW, your husband's is also sound, and might reap benefits unrelated to Sagemath ;-)...
Thanks, saving does help. I have no understanding of this process; why most of my stuff can be saved individually but is not saved when I save the session, or the ipynb file. For the moment, as long as it works. I've started on a newer computer, with more RAM, which also helps with some of the issues. Learning Linux will have to wait until we get IT support :-)
It is a good question. When you "save" a Jupyter notebook, you save the string representation of the inputs and the string representation of the outputs, but not the input themselves or the output themselves, nor the global variables. For example, you can see that the lists
In
andOut
(which contains all inputs and all outputs when you save) are empty when you close and open the notebook again : it starts at 1 again withIn[1]
andOut[1]
. By usingsave_session('a.sobj')
andload_session('a.sobj')
you reload all variables in the namespace including theIn
andOut
lists.