From 058b5916a49dc7eac6538b206d8cb694a2fbc163 Mon Sep 17 00:00:00 2001 From: Leon Luithlen Date: Mon, 11 Nov 2024 12:59:36 +0100 Subject: [PATCH 1/3] Remove graph overwriting on exception in NetworkXAdapter --- cognee/infrastructure/databases/graph/networkx/adapter.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cognee/infrastructure/databases/graph/networkx/adapter.py b/cognee/infrastructure/databases/graph/networkx/adapter.py index 19bd50051..5fe97e94a 100644 --- a/cognee/infrastructure/databases/graph/networkx/adapter.py +++ b/cognee/infrastructure/databases/graph/networkx/adapter.py @@ -267,14 +267,6 @@ class NetworkXAdapter(GraphDBInterface): await self.save_graph_to_file(file_path) except Exception: logger.error("Failed to load graph from file: %s", file_path) - # Initialize an empty graph in case of error - self.graph = nx.MultiDiGraph() - - file_dir = os.path.dirname(file_path) - if not os.path.exists(file_dir): - os.makedirs(file_dir, exist_ok = True) - - await self.save_graph_to_file(file_path) async def delete_graph(self, file_path: str = None): """Asynchronously delete the graph file from the filesystem.""" From dc209eb26ce7f37001d12e9def5126a51cb4d866 Mon Sep 17 00:00:00 2001 From: Leon Luithlen Date: Tue, 12 Nov 2024 10:48:38 +0100 Subject: [PATCH 2/3] Rerun checks --- .DS_Store | Bin 0 -> 6148 bytes README.md | 1 - cognee/.DS_Store | Bin 0 -> 6148 bytes 3 files changed, 1 deletion(-) create mode 100644 .DS_Store create mode 100644 cognee/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c53aac86a09d129220b9f904fda3e88a43eb0059 GIT binary patch literal 6148 zcmeHKISv9b477m)L_?wu z8Wo@dRDcRl0V?oC1+usf$6q{?M^OPP@E;1;{ZQbBHL(r!s{@0#0KfslZkT&70W1~( z*2Fdt5ts%Q7*x#`LxYZZ$-J7_1_oU;n-9%5Yj!B=Z^!w?(?x3_M=C%CUKQxaa$@y= z3IEXlzmmA30#x9y6wtw9wV30RvbJ_U&T4Ieui=(+hnr#U6bxRDfnJWWuyQ>0q{u5a Y$9_$01D%ez(}DaMFkNU=;MWQ~01mYkvj6}9 literal 0 HcmV?d00001 diff --git a/README.md b/README.md index 82c3730dc..181a23004 100644 --- a/README.md +++ b/README.md @@ -285,4 +285,3 @@ pip install cognee contributors - diff --git a/cognee/.DS_Store b/cognee/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..51227d71a94e52683c4d00d01ac912a7dfa75f3b GIT binary patch literal 6148 zcmeHKI|>3p3{CuiU}I@HSMUad=n3`$7K)81_^Y?_TprDrPoXS!S|~4&yqQeiEc=Sh zMnrUeSOjyq1*=D6P-_S;VFyM%Fva+Zyp5TE&WLZbpy zfC^9nDnJE3tw46z(fHFB^FAs-1%6%u`#u!7VNGlU{nLTqBLHxKv>VnwO8|={fHkoV zL$0gG>bW2DSK<@<*e5h_zG?{ceokWPC@W?4D@!4jkV*c7e!sMHO^~d U8|ZZ8oet#BfayY`0^e5P0W;M1& literal 0 HcmV?d00001 From 6e59370d71902135522c269e2c7d6c14d9cccb6e Mon Sep 17 00:00:00 2001 From: Leon Luithlen Date: Tue, 12 Nov 2024 12:07:20 +0100 Subject: [PATCH 3/3] Rerun checks --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 181a23004..82c3730dc 100644 --- a/README.md +++ b/README.md @@ -285,3 +285,4 @@ pip install cognee contributors +