File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/neo4j_graphrag/experimental/components Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,12 @@ async def run(self, graph: Neo4jGraph) -> KGWriterModel:
193
193
Args:
194
194
graph (Neo4jGraph): The knowledge graph to upsert into the database.
195
195
"""
196
+ # we disable the notification logger to get rid of the deprecation
197
+ # warning about Cypher subqueries. Once the queries are updated
198
+ # for Neo4j 5.23, we can remove this line and the 'finally' block
199
+ notification_logger = logging .getLogger ("neo4j.notifications" )
200
+ notification_level = notification_logger .level
201
+ notification_logger .setLevel (logging .ERROR )
196
202
try :
197
203
if inspect .iscoroutinefunction (self .driver .execute_query ):
198
204
await self ._async_db_setup ()
@@ -227,3 +233,5 @@ async def run(self, graph: Neo4jGraph) -> KGWriterModel:
227
233
except neo4j .exceptions .ClientError as e :
228
234
logger .exception (e )
229
235
return KGWriterModel (status = "FAILURE" , metadata = {"error" : str (e )})
236
+ finally :
237
+ notification_logger .setLevel (notification_level )
You can’t perform that action at this time.
0 commit comments