title: Python flush printing many times
body: <p>I am running some python (pytorch) code through slurm. This is my first time using slurm. I have a lot of print statements in my code for status updates, but they aren't printing to the output file that I specify. I think in issue is with the fact that python buffers. However, when I use the -u flag, or set flush=True is some of the print statements, it prints the same thing many times, which is very confusing and I am very unsure why this is happening.</p>
  <p>Any suggestions? Because I can't really debug my code without it. Thanks!</p>