指南:擴(kuò)展框架功能與貢獻(xiàn)代碼)
AutoSchemaKG開發(fā)指南擴(kuò)展框架功能與貢獻(xiàn)代碼【免費(fèi)下載鏈接】AutoSchemaKGThis repository contains the implementation of AutoSchemaKG, a novel framework for automatic knowledge graph construction that combines schema generation via conceptualization.項(xiàng)目地址: https://gitcode.com/gh_mirrors/au/AutoSchemaKGAutoSchemaKG是一個(gè)創(chuàng)新的知識(shí)圖譜自動(dòng)構(gòu)建框架它通過概念化生成模式幫助開發(fā)者輕松構(gòu)建高質(zhì)量的知識(shí)圖譜。本指南將為你提供擴(kuò)展框架功能和貢獻(xiàn)代碼的完整步驟讓你快速成為AutoSchemaKG社區(qū)的一員。認(rèn)識(shí)AutoSchemaKG框架結(jié)構(gòu) AutoSchemaKG采用模塊化設(shè)計(jì)主要包含以下核心組件知識(shí)圖譜構(gòu)建模塊atlas_rag/kg_construction/LLM生成器atlas_rag/llm_generator/檢索器atlas_rag/retriever/評(píng)估模塊EvaluateKGC/、EvaluateGeneralTask/AutoSchemaKG框架架構(gòu)示意圖展示了知識(shí)圖譜構(gòu)建與AI推理的融合設(shè)計(jì)環(huán)境準(zhǔn)備快速開始開發(fā) 1. 克隆項(xiàng)目倉庫git clone https://gitcode.com/gh_mirrors/au/AutoSchemaKG cd AutoSchemaKG2. 安裝依賴pip install -e .[dev] pre-commit install3. 驗(yàn)證安裝python -m pytest --showlocals -s -vv -nauto tests/擴(kuò)展功能的三種實(shí)用方法 ?添加新的知識(shí)圖譜抽取規(guī)則在atlas_rag/kg_construction/triple_extraction.py中定義新的抽取邏輯在atlas_rag/llm_generator/prompt/triple_extraction_prompt.py添加對(duì)應(yīng)的提示模板參考example/example_scripts/custom_extraction/中的示例進(jìn)行測(cè)試集成新的LLM模型在atlas_rag/llm_generator/llm_generator.py中實(shí)現(xiàn)模型調(diào)用接口添加模型配置到atlas_rag/llm_generator/generation_config.py參考EvaluateGeneralTask/lm-evaluation-harness/lm_eval/models/中的現(xiàn)有實(shí)現(xiàn)開發(fā)自定義評(píng)估指標(biāo)在EvaluateKGC/SchemaQuality/eval.py中添加評(píng)估函數(shù)創(chuàng)建新的測(cè)試數(shù)據(jù)集放置在EvaluateKGC/SchemaQuality/data/參考EvaluateGeneralTask/lm-evaluation-harness/docs/new_task_guide.md編寫評(píng)估邏輯貢獻(xiàn)代碼的最佳實(shí)踐 代碼風(fēng)格規(guī)范AutoSchemaKG使用ruff進(jìn)行代碼檢查確保代碼風(fēng)格一致# 手動(dòng)運(yùn)行代碼檢查 pre-commit run --all-files主要規(guī)范包括遵循PEP 8編碼規(guī)范使用有意義的變量和函數(shù)命名為新功能添加詳細(xì)注釋提交Pull Request的步驟創(chuàng)建分支git checkout -b feature/your-feature-name提交更改git commit -m Add: 新功能的簡要描述推送分支git push origin feature/your-feature-name在GitCode上創(chuàng)建Pull Request填寫詳細(xì)的功能描述和測(cè)試結(jié)果測(cè)試編寫指南所有新功能都需要添加對(duì)應(yīng)的測(cè)試用例單元測(cè)試放在tests/目錄下集成測(cè)試放在example/目錄下使用pytest風(fēng)格編寫測(cè)試確保覆蓋率80%AutoSchemaKG支持的Few-shot學(xué)習(xí)示例可用于評(píng)估新功能的性能參與社區(qū)獲取幫助與分享經(jīng)驗(yàn) 官方文檔docs/source/項(xiàng)目看板通過GitCode項(xiàng)目頁面查看開發(fā)計(jì)劃問題反饋在GitCode上提交issue提供詳細(xì)的錯(cuò)誤信息和復(fù)現(xiàn)步驟總結(jié)開始你的貢獻(xiàn)之旅 通過本指南你已經(jīng)了解了AutoSchemaKG的基本架構(gòu)、擴(kuò)展方法和貢獻(xiàn)流程。無論你是想添加新功能、修復(fù)bug還是改進(jìn)文檔每一個(gè)貢獻(xiàn)都能幫助AutoSchemaKG變得更好?,F(xiàn)在就克隆項(xiàng)目開始你的貢獻(xiàn)之旅吧記住好的貢獻(xiàn)始于一個(gè)小的改進(jìn)。查看EvaluateGeneralTask/lm-evaluation-harness/docs/CONTRIBUTING.md獲取更多詳細(xì)信息加入我們的社區(qū)一起構(gòu)建更強(qiáng)大的知識(shí)圖譜自動(dòng)構(gòu)建框架【免費(fèi)下載鏈接】AutoSchemaKGThis repository contains the implementation of AutoSchemaKG, a novel framework for automatic knowledge graph construction that combines schema generation via conceptualization.項(xiàng)目地址: https://gitcode.com/gh_mirrors/au/AutoSchemaKG創(chuàng)作聲明:本文部分內(nèi)容由AI輔助生成(AIGC),僅供參考