I’m training on Google Cloud with 2 T4 GPUs, which are quite inexpensive and using screen to keep the code running, even if SSH disconnects for any reason. Steps to run screen properly:
$ script /dev/null
$ screen

ENTER
$ python training.py

CLOSE WINDOW
To check what part of the code is running, SSH again an run:
$ screen -r

3310.pts-6.training

$ screen -d -r 3310
To quit screen:
$ screen -X -S 3310.pts-6.training quit