File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import litellm
99from typing import Dict
1010
11- # Fix LiteLLM event loop binding issues by setting logging to ERROR level
12- # This disables the logging worker that causes event loop binding problems
13- import os
14-
15- if os .environ .get ("LITELLM_LOG" ) is None :
16- os .environ ["LITELLM_LOG" ] = "ERROR"
11+ # Fix LiteLLM event loop binding issues by disabling the logging worker
12+ try :
13+ # Disable LiteLLM's async logging worker to prevent event loop binding issues
14+ import litellm .litellm_core_utils .logging_worker
15+
16+ # Monkey patch to disable the worker entirely
17+ original_start_worker = litellm .litellm_core_utils .logging_worker .start_worker
18+ litellm .litellm_core_utils .logging_worker .start_worker = lambda * args , ** kwargs : None
19+ except Exception :
20+ pass # Best effort
1721
1822from eval_protocol .dataset_logger import default_logger
1923from eval_protocol .models import EvaluationRow , Message
You can’t perform that action at this time.
0 commit comments