Guest User

Untitled

a guest
Feb 19th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. """call the distributed process"""
  2.  
  3. from subprocess import Popen# call shell command
  4.  
  5. hosts = ['gpu1', 'gpu2', 'gpu3']
  6.  
  7. hostfile = open('hosts', 'w')
  8. hostfile.write('\n'.join(hosts))
  9. hostfile.close()
  10.  
  11. command = '''python3 ../../tools/launch.py -n 3 --launcher ssh -H hosts "export MXNET_PROFILER_AUTOSTART=1; python3 train_cifar10.py --num-layers 56 --kv-store dist_sync --gpus 0 --num-epochs 5"'''
  12.  
  13. proc = Popen(command, shell=True)
  14. proc.wait()
Add Comment
Please, Sign In to add comment