Recently, I updated version of pytorch on my env from 1.x to 2.0.
I think it’s worth to update because, original site says….
PYTORCH 2.X: FASTER, MORE PYTHONIC AND AS DYNAMIC AS EVER
Today, we announce torch.compile
, a feature that pushes PyTorch performance to new heights and starts the move for parts of PyTorch from C++ back into Python. We believe that this is a substantial new direction for PyTorch – hence we call it 2.0. torch.compile
is a fully additive (and optional) feature and hence 2.0 is 100% backward compatible by definition.
Underpinning torch.compile
are new technologies – TorchDynamo, AOTAutograd, PrimTorch and TorchInductor.
And also, pytorch_geometric supports pytorch2.0. Previously I worte blog post about building QSAR model with PyG. Old version of PyG didn’t support graph from molecule. So I wrote my own function to do that. But recent version of PyG has the function!
You can check the details on the official documentation.
I have interest the new version of pyg and pytorch. So I rewrote the my code with new packages.
The code is shown below.
By using compiled model, I got many worning masseges but it worked and got almost same figure to previous post.
This is first trial of using new version of pyg and pytorch for me. I would like to dive more deeply into the packages as soon as possible.