Skip to content

Commit 60aca0a

Browse files
committed
Round time in debug log
1 parent e48269c commit 60aca0a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/build_graph/simple_kg_builder_from_pdf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
AUTH = ("neo4j", "password")
2323
DATABASE = "neo4j"
2424

25+
import logging
26+
27+
logging.basicConfig(level=logging.DEBUG)
2528

2629
root_dir = Path(__file__).parents[1]
2730
file_path = root_dir / "data" / "Harry Potter and the Chamber of Secrets Summary.pdf"

src/neo4j_graphrag/experimental/pipeline/pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ async def run(
104104
res = await self.execute(context, inputs)
105105
end_time = default_timer()
106106
logger.debug(
107-
f"TASK FINISHED {self.name} in {end_time - start_time} res={prettify(res)}"
107+
f"TASK FINISHED {self.name} in {round(end_time - start_time)}s res={prettify(res)}"
108108
)
109109
return res
110110

@@ -567,7 +567,7 @@ async def run(self, data: dict[str, Any]) -> PipelineResult:
567567
)
568568
raise e
569569
end_time = default_timer()
570-
logger.debug(f"PIPELINE FINISHED {run_id} in {end_time - start_time}s")
570+
logger.debug(f"PIPELINE FINISHED {run_id} in {round(end_time - start_time)}s")
571571
return res
572572

573573
async def _run(self, run_id: str, data: dict[str, Any]) -> PipelineResult:

0 commit comments

Comments
 (0)