You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
We do plan to fix this in the notebook so that changes show up in the notebook even if you close the browser tab (or lose the connection to the notebook server). But it requires some substantial architectural changes, to store the state of the document on the server.
We don't generally fall back to showing things on the kernel console, which may not be accessible to the user, and isn't an obvious place to look for output.
I understand that this is not the best solution. However, it would solve my problem and I am interested in writing an extension which can do this as a make shift arrangement till the architecture is overhauled.
Could you give me a few hints as to how one may try to do it if one were so inclined?
The kernel doesn't have a good way of knowing when the notebook is connected, but any output you print to sys.__stdout__ (with the double underscores around stdout) should end up in the terminal if you want to play around.
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'sstdout
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
andCompile time
are shown to the user ( (tp_min
andtc_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?The text was updated successfully, but these errors were encountered: