I´m trying to restart the kernel in a Google Colab Jupyter Notebook through a cell. The option given previously:
import os
os._exit(00)
is ok, but it seems to me that this is not a very "pythonic" way of restarting the kernel. The other option:
from IPython.core.display import HTML
HTML("<script>Jupyter.notebook.kernel.restart()</script>")
seems more "pythonic" (better) to me, but it is not working.
Is there something specific to Google Colab that I should have done?
Best regards,
Gustavo,
Just go to "Runtime" in the option menu then click on "Reset all runtimes..".
It helps me to restart kernel as in jupyter notebook happen when i'm trying to run this:
tf.executing_eagerly()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With