AntonioLonga / PytorchGeometricTutorial

Pytorch Geometric Tutorials
1.03k stars 303 forks source link

Tutorial14: replace `AddTrainValTestMask` with `RandomNodeSplit` #13

Open kiritofeng opened 1 year ago

kiritofeng commented 1 year ago

Thanks for the very useful tutorials!

When I was running Tutorial14 today, I encountered the error:

AttributeError                            Traceback (most recent call last)
[<ipython-input-38-3675939561a2>](https://localhost:8080/#) in <module>
      1 name = 'Cora'
      2 transform = transforms.Compose([
----> 3     transforms.AddTrainValTestMask('train_rest', num_val=500, num_test=500),
      4     transforms.TargetIndegree(),
      5 ])

AttributeError: module 'torch_geometric.transforms' has no attribute 'AddTrainValTestMask'

The pytorch_geometric v2.0.0 changelog has

transforms.AddTrainValTestMask has been replaced in favour of transforms.RandomNodeSplit

so I updated the notebook accordingly, please let me know if there's anything else I should do.