From 4a5786e0526c2935d57d97c78854a8ee00f3bd6a Mon Sep 17 00:00:00 2001 From: DriesSmit Date: Sun, 21 Apr 2024 15:00:29 +0200 Subject: [PATCH] feat: suppress warning --- debatellm/agents.py | 3 +++ scripts/experiments_utils.py | 2 +- scripts/launch_experiments.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debatellm/agents.py b/debatellm/agents.py index 50c482a..7c50427 100644 --- a/debatellm/agents.py +++ b/debatellm/agents.py @@ -17,7 +17,10 @@ import time from importlib import import_module from typing import Any, Callable, Dict, Optional, Tuple +import logging +# Set the logging level for 'httpx' to 'WARNING' to suppress info and debug messages +logging.getLogger('httpx').setLevel(logging.WARNING) import google import numpy as np import openai diff --git a/scripts/experiments_utils.py b/scripts/experiments_utils.py index 9eb10bd..2b46db2 100644 --- a/scripts/experiments_utils.py +++ b/scripts/experiments_utils.py @@ -141,7 +141,7 @@ def run_experiments( if verbose: print(f"Launching {len(experiments)} experiments...") - + with ThreadPoolExecutor(max_workers=parallel_workers) as executor: list(tqdm(executor.map(run_experiment, experiments), total=len(experiments))) diff --git a/scripts/launch_experiments.py b/scripts/launch_experiments.py index b958b73..bb22d23 100644 --- a/scripts/launch_experiments.py +++ b/scripts/launch_experiments.py @@ -211,4 +211,5 @@ "pubmedqa", "mmlu", ] # "medqa", "pubmedqa", "mmlu", "cosmosqa", "ciar", "gpqa", medmcqa + run_experiments(exp_table, parallel_workers=2, shuffle=False, sort_by_dataset=False)