Programmatically check if PyTorch is using a GPU?

This is a great point. Luckily, I am the only one who uses the system. I believe, unless I do anything manually, the scheduling script will be the only thing making use of the GPU at any given time.

Your command is parsing well, and it seems you have solved my problem! Thanks a lot.