Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

基于 OpenKE-PyTorch 开发的知识图谱嵌入工具包,支持跨平台运行,具备自动超参数搜索、高效并行训练以及实验结果记录功能,为研究与应用提供强大助力。

License

Notifications You must be signed in to change notification settings

LuYF-Lemon-love/pybind11-OpenKE

Repository files navigation

pybind11-OpenKE logo

pybind11-OpenKE — 知识图谱嵌入工具包

Documentation Status

基于 OpenKE-PyTorch 开发的知识图谱嵌入工具包,支持跨平台运行,具备自动超参数搜索、高效并行训练以及实验结果记录功能,为研究与应用提供强大助力。

教程和 API 参考文档可以访问 pybind11-openke.readthedocs.io。 源代码可以访问 github.com/LuYF-Lemon-love/pybind11-OpenKE

📁 pybind11_ke/
pybind11-OpenKE 源代码保存在 pybind11_ke/
📚 docs/
所有的文档源文件保存在 docs/。 所有的 *.rst 构成了文档中的各个部分。
🌰 examples/
pybind11-OpenKE 的例子保存在 examples/,修改自 OpenKE-PyTorch
📍 docs/_static/logs/
pybind11-OpenKE 的例子运行日志保存在 docs/_static/logs/
💡 benchmarks/
常用的知识图谱保存在 benchmarks/
📜 README.rst
项目主页。
⁉️ Questions / comments
如果你有任何问题,可以在 Github issue 提问。

Note

本项目基于 OpenKE-PyTorch 的版本保存在 thunlp-OpenKE-PyTorch 分支。

新特性

易用的

  • 1.0.0 版本: 利用 C++ 重写底层数据处理、C++11 的线程库实现并行、 pybind11 实现 Python 和 C++ 的交互,进而能够做到跨平台 (Windows, Linux)。
  • 2.0.0 版本: 使用 Python 重写底层数据处理,进而能够做到跨平台 (Windows, Linux)。
  • 使用 Setuptools 打包了 pybind11-OpenKE, 使得能够像其他第三方库一样使用。
  • 增加了文档。

正确的

高效的

扩展的

  • 在模型训练过程中,能够在验证集上评估模型(模型能够一次评估多个三元组(batch),能够大大加速模型评估)。
  • 增加了学习率调度器。
  • 能够利用 wandb 输出日志。
  • 实现了早停止。
  • 能够自定义 Hits@N。

支持的知识图谱嵌入模型:

类型 模型
平移模型 TransE :cite:`TransE`, TransH :cite:`TransH`, TransR :cite:`TransR`, TransD :cite:`TransD`, RotatE :cite:`RotatE`
语义匹配模型 RESCAL :cite:`RESCAL`, DistMult :cite:`DistMult`, HolE :cite:`HolE`, ComplEx :cite:`ComplEx`, Analogy :cite:`ANALOGY`, SimplE :cite:`SimplE`
图神经网络模型 R-GCN :cite:`R-GCN`, CompGCN :cite:`CompGCN`

如何引用这个项目?

如果您发现 pybind11-OpenKE 对您的研究有用,请考虑使用以下 BibTeX 模板引用 pybind11-OpenKE:

@misc{pybind11-OpenKE,
   author = {Lu, Yanfeng and Hou, Fengzhen},
   year = {2024},
   note = {https://github.com/LuYF-Lemon-love/pybind11-OpenKE},
   title = {pybind11-OpenKE: An Open Source Library for Knowledge Graph Embeddings}
}

该仓库主要由 Yanfeng LuFengzhen Hou 提供(按时间顺序排列)。

About

基于 OpenKE-PyTorch 开发的知识图谱嵌入工具包,支持跨平台运行,具备自动超参数搜索、高效并行训练以及实验结果记录功能,为研究与应用提供强大助力。

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages