From e19bedf52316e06a3c4039e1e5dff9ad6c318fe8 Mon Sep 17 00:00:00 2001 From: littletomatodonkey Date: Fri, 9 Apr 2021 10:28:06 +0000 Subject: [PATCH] fix infer --- tools/infer/predict_system_mp.py | 6 ++++-- tools/infer/utility.py | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/infer/predict_system_mp.py b/tools/infer/predict_system_mp.py index 42373ee8..a4c3bf39 100755 --- a/tools/infer/predict_system_mp.py +++ b/tools/infer/predict_system_mp.py @@ -38,9 +38,11 @@ if __name__ == "__main__": with open("{}/results.{}".format(inference_dir, process_id), "w") as fin: - p = subprocess.Popen(cmd, stdout=fin, stderr=fin) + # p = subprocess.Popen(cmd, stdout=fin, stderr=fin) # if you want to print results in the screen, you can use the following command - # p = subprocess.Popen(cmd, stdout=fin, stderr=sys.stdout) + p = subprocess.Popen(cmd, stdout=sys.stdout, stderr=sys.stdout) p_list.append(p) for p in p_list: p.wait() + print("all inference results are save in directory: {}".format( + inference_dir)) diff --git a/tools/infer/utility.py b/tools/infer/utility.py index d84332cc..a264be5f 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -85,7 +85,6 @@ def parse_args(): parser.add_argument("--enable_mkldnn", type=str2bool, default=False) parser.add_argument("--use_pdserving", type=str2bool, default=False) - parser.add_argument("--use_multiprocess", type=str2bool, default=False) parser.add_argument("--total_process_num", type=int, default=1) parser.add_argument("--process_id", type=int, default=0) -- GitLab