Skip to content

Commit f38d115

Browse files
fix(graphgen): fix clear method
1 parent 97af1af commit f38d115

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

graphgen/graphgen.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ def clear(self):
212212
loop.run_until_complete(self.async_clear())
213213

214214
async def async_clear(self):
215-
await self.full_docs_storage.clear()
216-
await self.text_chunks_storage.clear()
217-
await self.wiki_storage.clear()
215+
await self.full_docs_storage.drop()
216+
await self.text_chunks_storage.drop()
217+
await self.wiki_storage.drop()
218218
await self.graph_storage.clear()
219-
await self.rephrase_storage.clear()
220-
await self.qa_storage.clear()
219+
await self.rephrase_storage.drop()
220+
await self.qa_storage.drop()
221221

222-
logger.info("All caches are cleared")
222+
logger.info("All caches are cleared")

graphgen/operators/extract_kg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ async def extract_kg(
2121
max_concurrent: int = 1000
2222
):
2323
"""
24-
2524
:param llm_client: Synthesizer LLM model to extract entities and relationships
2625
:param kg_instance
2726
:param tokenizer_instance

models/storage/json_storage.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,3 @@ async def upsert(self, data: dict):
4545

4646
async def drop(self):
4747
self._data = {}
48-
49-
async def clear(self):
50-
if os.path.exists(self._file_name):
51-
os.remove(self._file_name)

0 commit comments

Comments
 (0)