Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if process is hanging in Jupyter iPython notebook

The process I'm running in a iPython notebook continues to run past an hour. The process is a manipulation of a large dataframe, 6400col x 200000rows, explained here. It appears the cell is still running In:[*], but I want to know if its hanging vs being productive. Inserting print statements only worked to a point (possibly due to some limit of print statements in iPython).

I'm using Python 3.5.1 and IPython 4.1.2 from Anaconda 2.5.0 (64-bit).

like image 553
Thomas Matthew Avatar asked Apr 18 '16 20:04

Thomas Matthew


People also ask

How do I know if my code is running in Jupyter Notebook?

Your first Jupyter Notebook will open in new tab — each notebook uses its own tab because you can open multiple notebooks simultaneously. If you switch back to the dashboard, you will see the new file Untitled. ipynb and you should see some green text that tells you your notebook is running.

Why is my Jupyter Notebook hanging?

Try in another browser (e.g. if you normally use Firefox, try with Chrome). This helps pin down where the problem is. Try disabling any browser extensions and/or any Jupyter extensions you have installed. Some internet security software can interfere with Jupyter.

How do you close a running process in Jupyter Notebook?

After all of your notebooks are closed and shut down, you can end your Jupyter Notebook session by clicking on the QUIT button at the top right of the dashboard. You can now close the browswer tab for Jupyter Notebook . If desired, you can also close your terminal by typing the command exit and hitting Enter .

How do you check checkpoints in Jupyter Notebook?

ipynb file to a previously saved checkpoint by using the Revert to Checkpoint button, the checkpoint file is what gets accessed and opened inside Jupyter. As a side note, the checkpoint file is located within a hidden folder named . ipynb_checkpoints . This folder is located within the same folder as the initial .


1 Answers

Use the tools that your operating system provides to check the CPU usage. If one of your CPU's is pegged, it's running. Otherwise it's probably hanging.

like image 159
Roland Smith Avatar answered Oct 22 '22 13:10

Roland Smith