MCPcopy Create free account
hub / github.com/Enfoirer/Text2GraphRAG / load_progress

Method load_progress

agent/recipe_ai_agent.py:508–523  ·  view source on GitHub ↗

加载处理进度

(self)

Source from the content-addressed store, hash-verified

506 json.dump(progress_data, f, ensure_ascii=False, indent=2)
507
508 def load_progress(self) -> Dict:
509 """加载处理进度"""
510 if os.path.exists(self.progress_file):
511 try:
512 with open(self.progress_file, 'r', encoding='utf-8') as f:
513 progress_data = json.load(f)
514
515 self.processed_files = set(progress_data.get("processed_files", []))
516 self.current_batch = progress_data.get("current_batch", 0)
517 self.concept_id_counter = progress_data.get("concept_id_counter", 201000000)
518
519 return progress_data
520 except Exception as e:
521 print(f"警告: 加载进度文件失败 - {str(e)}")
522 return {}
523 return {}
524
525 def save_batch_data(self, batch_num: int = None):
526 """保存当前批次数据"""

Callers 1

batch_process_recipesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected