From 079bc8b1727b520c5d6ebeba11755daefef07af8 Mon Sep 17 00:00:00 2001 From: nauyisu022 <59754221+nauyisu022@users.noreply.github.com> Date: Sat, 20 Apr 2024 16:25:15 +0800 Subject: [PATCH] update --- trustllm_pkg/trustllm/config.py | 2 +- trustllm_pkg/trustllm/utils/gpt_auto_eval.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/trustllm_pkg/trustllm/config.py b/trustllm_pkg/trustllm/config.py index d7cb860..fa5c3a2 100644 --- a/trustllm_pkg/trustllm/config.py +++ b/trustllm_pkg/trustllm/config.py @@ -12,7 +12,7 @@ replicate_api = None zhipu_api = None -max_worker = 1 +max_worker = 8 ##only support azure api for auto evaluation azure_openai = True diff --git a/trustllm_pkg/trustllm/utils/gpt_auto_eval.py b/trustllm_pkg/trustllm/utils/gpt_auto_eval.py index cd3aed3..1fc7885 100644 --- a/trustllm_pkg/trustllm/utils/gpt_auto_eval.py +++ b/trustllm_pkg/trustllm/utils/gpt_auto_eval.py @@ -159,7 +159,7 @@ def process_item(item, el): print('Total data number: {}'.format(len(data))) print('Evaluating...') - with concurrent.futures.ThreadPoolExecutor(max_workers=6) as executor: + with concurrent.futures.ThreadPoolExecutor(max_workers=self.max_worker) as executor: futures = [executor.submit(process_item, item, el) for item, el in zip(prompt_data, data)] # Add a callback to handle completion and errors