From c9367bb1f8ae41490a2bd7b9f7db65dedcffa70d Mon Sep 17 00:00:00 2001 From: shun zhang <596602667@qq.com> Date: Sat, 10 Jun 2023 02:58:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E5=8F=96=E5=86=85=E5=AE=B9=E7=89=B9?= =?UTF-8?q?=E5=BE=81=E6=94=B9=E4=B8=BA=E7=BA=BF=E7=A8=8B=E6=B1=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prepare/preprocess_ppg.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/prepare/preprocess_ppg.py b/prepare/preprocess_ppg.py index 536048c5..719a9a52 100644 --- a/prepare/preprocess_ppg.py +++ b/prepare/preprocess_ppg.py @@ -67,15 +67,15 @@ def process_file(file): else: process_num = args.thread_count - # with ThreadPoolExecutor(max_workers=process_num) as executor: - # futures = [executor.submit(process_file, file) for file in os.listdir(f"./{wavPath}/{spks}")] - # for future in tqdm(as_completed(futures), total=len(futures)): - # pass + with ThreadPoolExecutor(max_workers=process_num) as executor: + futures = [executor.submit(process_file, file) for file in os.listdir(f"./{wavPath}/{spks}")] + for future in tqdm(as_completed(futures), total=len(futures)): + pass - with Pool(processes=process_num) as pool: - results = [pool.apply_async(process_file, (file,)) for file in os.listdir(f"./{wavPath}/{spks}")] - for result in tqdm(results, total=len(results)): - result.wait() + # with Pool(processes=process_num) as pool: + # results = [pool.apply_async(process_file, (file,)) for file in os.listdir(f"./{wavPath}/{spks}")] + # for result in tqdm(results, total=len(results)): + # result.wait() else: file = spks