From 3585b698f81cb3ee2155d4b9c85ec83f86074fb7 Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Wed, 28 Jul 2021 08:20:06 +0300 Subject: [PATCH] [~] Refactor --- python/tasks/mlb_player.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/tasks/mlb_player.py b/python/tasks/mlb_player.py index 6485d4d..7da461a 100644 --- a/python/tasks/mlb_player.py +++ b/python/tasks/mlb_player.py @@ -1209,7 +1209,7 @@ def kernel_16(images): t4, ]) - assert os.system(r''' + with subprocess.Popen(''' cd /kaggle/working/AlphaPose && python3 \ scripts/demo_inference.py \ @@ -1218,7 +1218,10 @@ def kernel_16(images): --indir %s \ --outdir %s \ --save_img - ''' % (t2, t4)) == 0, 'fuck' + ''' % (t2, t4), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p: + + pprint.pprint(p.communicate()) + p.wait() t6 = [] with io.open(