Skip to content

Commit b854079

Browse files
refactor: turn log level to DEBUG when extracting KG
1 parent cbbd2ae commit b854079

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

graphgen/bases/base_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ def _image_exists(path_or_url: str, timeout: int = 3) -> bool:
4040
"""
4141
if not path_or_url:
4242
return False
43-
4443
if not path_or_url.startswith(("http://", "https://", "ftp://")):
4544
path = path_or_url.replace("file://", "", 1)
45+
path = os.path.abspath(path)
4646
return os.path.isfile(path)
4747
try:
4848
resp = requests.head(path_or_url, allow_redirects=True, timeout=timeout)

graphgen/models/kg_builder/light_rag_kg_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def extract(
4242

4343
# step 2: initial glean
4444
final_result = await self.llm_client.generate_answer(hint_prompt)
45-
logger.info("First extraction result: %s", final_result)
45+
logger.debug("First extraction result: %s", final_result)
4646

4747
# step3: iterative refinement
4848
history = pack_history_conversations(hint_prompt, final_result)
@@ -57,7 +57,7 @@ async def extract(
5757
glean_result = await self.llm_client.generate_answer(
5858
text=KG_EXTRACTION_PROMPT[language]["CONTINUE"], history=history
5959
)
60-
logger.info("Loop %s glean: %s", loop_idx + 1, glean_result)
60+
logger.debug("Loop %s glean: %s", loop_idx + 1, glean_result)
6161

6262
history += pack_history_conversations(
6363
KG_EXTRACTION_PROMPT[language]["CONTINUE"], glean_result

0 commit comments

Comments
 (0)