Hi! What exactly are you trying to do? There shouldn't be a need to explicitly end a session and the /end_session endpoint is currently mostly internals for Prodigy Scale and mostly relevant for named multi-user sessions (e.g. if you append something like ?session=foo).
Hi Ines, thanks for fast response. Actually, I'm trying to create a chatbot sort of UI for a client where they can load a .csv file, process it, initiate a session, open prodigy annotation window and kill the server without using terminal window at all.
Cool, thanks! I have used this approach described in the first link you have shared:
from psutil import process_iter
from signal import SIGTERM # or SIGKILL
for proc in process_iter():
for conns in proc.connections(kind='inet'):
if conns.laddr.port == 8080:
proc.send_signal(SIGTERM) # or SIGKILL
Just needed to run the .py file with sudo in the first place, then it worked perfectly. I'll check your jupyterlab approach as well, it looks more elegant. Congrats by the way for this amazing extension and please keep up good work.