October 23, 2024
Chicago 12, Melborne City, USA
python

Unable to receive print/logging from a python screen session


Two days ago, I launched a screen session and run a python script on it. My python script is basically a grid search, therefore I wrote the code as it could print me (or logs) the different results and performance achieved.

I’m running python and screen on a remote Linux server, I’m connected from my local machine with it by SSH.

The issue is that while I was connected within the screen session all was ok and I had received normally the prints but when I disconnected and then reconnected it became not possible to receive the print or loggings. The code seems still running due the gpu is fully used and the process is not died. Despite that, I didn’t receive any print or logs as progress’ signals from my python script.

I seen that may be a matter of buffer…but I guess it would be very weird that is so long ( consider that I normally receive 5 logs each 2 minutes)

Commands used are, in order:

ssh username@serverip  

screen 

python -u gridsearch.py

To reconnect I always use

screen -r screensessioname

I’m checking the gpu through:

nvidia-smi

Anyone can help me?



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video