-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
If I start a long running cell on a notebook which has the %%time magic as the first line and then accidentally lose connection to it (dropped SSH, or closing the browser window), the output (i.e. the running time of the statements) is lost.
Is it possible to show the output of the %%time command on the kernel's console on the server in such cases?
I've encountered some optimization routines (e.g. L-BFGS from scipy.optimise), which output solely on the kernel console. So that makes me think that there is a way to output to the kernel's stdout at least via C. Is there a better and/or documented way of outputting on the kernel's console?
If so, I am willing to write an extension for my own use which extends %%time magic.
Also, looking at the code for the magics,, there are thresholds in place which determine whether the Parse Time and Compile time are shown to the user ( (tp_min and tc_min respectively). Perhaps there could be a similar threshold which could push the output to the kernel console if the process runs for long enough that the connection may be dropped?