Skip to content

Commit

Permalink
Add additional test to RandomLinkSplit for HeteroData (#5221)
Browse files Browse the repository at this point in the history
* add test

* changelog

* changelog
  • Loading branch information
rusty1s committed Aug 17, 2022
1 parent 834be97 commit d82e224
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed a bug in `TUDataset` where `pre_filter` was not applied whenever `pre_transform` was present
- Renamed `RandomTranslate` to `RandomJitter` - the usage of `RandomTranslate` is now deprecated ([#4828](https://github.com/pyg-team/pytorch_geometric/pull/4828))
- Do not allow accessing edge types in `HeteroData` with two node types when there exists multiple relations between these types ([#4782](https://github.com/pyg-team/pytorch_geometric/pull/4782))
- Allow `edge_type == rev_edge_type` argument in `RandomLinkSplit` ([#4757](https://github.com/pyg-team/pytorch_geometric/pull/4757))
- Allow `edge_type == rev_edge_type` argument in `RandomLinkSplit` ([#4757](https://github.com/pyg-team/pytorch_geometric/pull/4757), [#5221](https://github.com/pyg-team/pytorch_geometric/pull/5221))
- Fixed a numerical instability in the `GeneralConv` and `neighbor_sample` tests ([#4754](https://github.com/pyg-team/pytorch_geometric/pull/4754))
- Fixed a bug in `HANConv` in which destination node features rather than source node features were propagated ([#4753](https://github.com/pyg-team/pytorch_geometric/pull/4753))
- Fixed versions of `checkout` and `setup-python` in CI ([#4751](https://github.com/pyg-team/pytorch_geometric/pull/4751))
Expand Down
5 changes: 5 additions & 0 deletions test/transforms/test_random_link_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,8 @@ def test_random_link_split_on_undirected_hetero_data():
rev_edge_types=('p', 'p'))
train_data, val_data, test_data = transform(data)
assert train_data['p', 'p'].is_undirected()

transform = RandomLinkSplit(is_undirected=True, edge_types=('p', 'p'),
rev_edge_types=('p', 'p'))
train_data, val_data, test_data = transform(data)
assert train_data['p', 'p'].is_undirected()

0 comments on commit d82e224

Please sign in to comment.