tarzanagh commited on
Commit
d1764e3
·
verified ·
1 Parent(s): e478cbc

Suppress Event loop warnings

Browse files
src/passage_entity/benchmark_runner.py CHANGED
@@ -79,6 +79,11 @@ from src.passage_entity.utils import QuerySolution
79
  # ---------------------------------------------------------------------------
80
  from openai import AsyncOpenAI
81
 
 
 
 
 
 
82
  # Load .env file if present (for API keys)
83
  _dotenv_path = os.path.join(os.path.dirname(__file__), "..", "..", ".env")
84
  if os.path.isfile(_dotenv_path):
 
79
  # ---------------------------------------------------------------------------
80
  from openai import AsyncOpenAI
81
 
82
+ # Suppress harmless "Event loop is closed" warnings from httpx async cleanup
83
+ import warnings
84
+ warnings.filterwarnings("ignore", message=".*Event loop is closed.*")
85
+ logging.getLogger("asyncio").setLevel(logging.CRITICAL)
86
+
87
  # Load .env file if present (for API keys)
88
  _dotenv_path = os.path.join(os.path.dirname(__file__), "..", "..", ".env")
89
  if os.path.isfile(_dotenv_path):