mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-07 03:57:45 +00:00
adjust logging system (#51)
* remove ruff comment in log.py * change log framework and fix llm_utils.py's logs * Some thoughts for logging * fix SingletonMeta's definition, maintain an instance dict for each class that inherits it * adjust log codes directory, add some tag for factor implementation logging * Update rdagent/core/conf.py * fix factor task app & log * fix log import * Streamlet framework * fix log tag to path logic * Add todos * Add example in docstring * add log tag for llm_utils.py * Capture lost content --------- Co-authored-by: Young <afe.young@gmail.com> Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,7 @@ from rdagent.core.evolving_framework import (
|
||||
RAGStrategy,
|
||||
)
|
||||
from rdagent.core.experiment import Implementation
|
||||
from rdagent.core.log import RDAgentLog
|
||||
from rdagent.log import rdagent_logger as logger
|
||||
from rdagent.core.prompts import Prompts
|
||||
from rdagent.oai.llm_utils import (
|
||||
APIBackend,
|
||||
@@ -336,7 +336,7 @@ class FactorGraphRAGStrategy(RAGStrategy):
|
||||
)["component_no_list"]
|
||||
return [all_component_nodes[index - 1] for index in sorted(list(set(component_no_list)))]
|
||||
except:
|
||||
RDAgentLog().warning("Error when analyzing components.")
|
||||
logger.warning("Error when analyzing components.")
|
||||
analyze_component_user_prompt = "Your response is not a valid component index list."
|
||||
|
||||
return []
|
||||
@@ -714,7 +714,7 @@ class FactorGraphKnowledgeBase(KnowledgeBase):
|
||||
Load knowledge, offer brief information of knowledge and common handle interfaces
|
||||
"""
|
||||
self.graph: UndirectedGraph = UndirectedGraph.load(Path.cwd() / "graph.pkl")
|
||||
RDAgentLog().info(f"Knowledge Graph loaded, size={self.graph.size()}")
|
||||
logger.info(f"Knowledge Graph loaded, size={self.graph.size()}")
|
||||
|
||||
if init_component_list:
|
||||
for component in init_component_list:
|
||||
|
||||
Reference in New Issue
Block a user