helper for starting parallel scripts

This commit is contained in:
2022-09-30 21:56:23 +00:00
parent 86136338a1
commit 5e46f52639
+20
View File
@@ -0,0 +1,20 @@
import os
if __name__ == '__main__':
folder = '/home/workspace/data/dataset/train'
# folder = '/home/workspace/data/dataset/train_100'
ids = os.listdir(folder)#[:800]
skirt = 0
count = 0
step = 75
# !!!!!!! change skirt parameter in script
while count < len(ids):
os.system('nohup python convert_to_uv.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'to_uv_unposed_no_shape_' + str(count) + '_' + str(count+step) + ' > nohup/to_uv_unposed_no_shape_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &')
# os.system('python Data/convert_to_uv.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + '')
count += step