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 06a2c5d commit 2a466c8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 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'
]
4 changes: 2 additions & 2 deletions torch_geometric/nn/kge/transf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

from torch_geometric.nn.kge import KGEModel


class TransF(KGEModel):
r"""
The TransF model from the "Knowledge Graph Embedding by Flexible
r"""The TransF model from the "Knowledge Graph Embedding by Flexible
Translation" paper.
:class:`TransF` introduces a flexible translation mechanism by dynamically
Expand Down

0 comments on commit 2a466c8

Please sign in to comment.