Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 19, 2024
1 parent f610d00 commit 629b29e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ Unlike simple stacking of GNN layers, these models could involve pre-processing,
- **[DistMult](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.DistMult.html)** from Yang *et al.*: [Embedding Entities and Relations for Learning and Inference in Knowledge Bases](https://arxiv.org/abs/1412.6575) (ICLR 2015) \[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/kge_fb15k_237.py)\]
- **[RotatE](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.RotatE.html)** from Sun *et al.*: [RotatE: Knowledge Graph Embedding by Relational Rotation in Complex Space](https://arxiv.org/abs/1902.10197) (ICLR 2019) \[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/kge_fb15k_237.py)\]
- **[TransF](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.TransF.html)** from Ji *et al.*: [Knowledge Graph Embedding by Flexible Translation](https://cdn.aaai.org/ocs/12887/12887-57589-1-PB.pdf) (ACL 2015) \[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/kge_fb15k_237.py)\]

</details>

**GNN operators and utilities:**
Expand Down
2 changes: 1 addition & 1 deletion test/nn/kge/test_transf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def test_transf():
mean_rank, mrr, hits = model.test(h, r, t, batch_size=5, log=False)
assert 0 <= mean_rank <= 10
assert 0 < mrr <= 1
assert hits == 1.0
assert hits == 1.0
7 changes: 1 addition & 6 deletions torch_geometric/nn/kge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,5 @@
from .transf import TransF

__all__ = classes = [
'KGEModel',
'TransE',
'ComplEx',
'DistMult',
'RotatE',
'TransF'
'KGEModel', 'TransE', 'ComplEx', 'DistMult', 'RotatE', 'TransF'
]
1 change: 1 addition & 0 deletions torch_geometric/nn/kge/transf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from torch_geometric.nn.kge import KGEModel


class TransF(KGEModel):
r"""The TransF model from the "Knowledge Graph Embedding by Flexible Translation"
paper.
Expand Down

0 comments on commit 629b29e

Please sign in to comment.