fix(ci): lazy import logger in predix.py and cli.py to avoid ImportError in test env

Wrapped  in try/except
ImportError with standard logging fallback. The rdagent.log
module chain fails when predix.py is imported as a module
in the CI test environment (kronos CLI tests).
This commit is contained in:
TPTBusiness
2026-05-01 13:57:31 +02:00
parent c0516d60f9
commit 87610d660f
2 changed files with 12 additions and 2 deletions
+6 -1
View File
@@ -27,7 +27,12 @@ import typer
from rich.console import Console
from typing_extensions import Annotated
from rdagent.utils.env import logger
try:
from rdagent.utils.env import logger
except ImportError:
import logging
logger = logging.getLogger(__name__)
from rdagent.app.data_science.loop import main as data_science
from rdagent.app.finetune.llm.loop import main as llm_finetune