After leaving the annotation session in Prodigy without saving through Jupyter Notebook, I sometimes struggle to upload a new set of data unless I completely switch the computer off and restart. In other circumstances, the uploading of new data requires just the closing the Anaconda session. Basically, the problem is that the web server/localhost is already occupied by the previous set of documents. How can I easily kill the processes and start a brand new session?
When you run Prodigy, it starts a regular web server on the given host and port. So you'll need to terminate the web server – otherwise, it keeps running on the port. (This isn't specific to Prodigy btw and you'll be able to stop the Prodigy server just like you'd stop any other server in your notebook).
I think Jupyter Notebooks just let you press the "stop" icon on the cell? Also see this Stack Overflow thread:
better than restarting your computer, you can write in a Jupyter cell:
!netstat -ano | findstr :8080
This looks for the PID (Process ID) of the web server on the port 8080, in this case Prodigy, in order to be able to terminate it with the following command:
!Taskkill /PID <PIDProdigy> /F
This works in windows and propably similiar for other OS. You could even probably automate this with a small script/ function.