PyTorch Geometric Temporal environment installation (pro-test effective)

1.  Introduction to PyTorch Geometric Temporal

PyTorch Geometric Temporal is a temporal (dynamic) extension library for PyTorch Geometric.

The library includes various dynamical and temporal geometric deep learning, embedding and spatiotemporal regression methods from various published research papers. Additionally, it comes with an easy-to-use dataset loader, train-test splitter and temporal fast iterator for dynamic and temporal graphs. The framework naturally provides GPU support. It also provides a large number of benchmark datasets, including areas such as demographic forecasting, the sharing economy, energy production, and network traffic management. Finally, you can also create your own datasets.

The package interfaces well with Pytorch Lightning, allowing training on cpus, single and multiple gpus out of the box. Check out this introductory example using PyTorch Geometric Temporal and PyTorch lightning.

2. Github 地址:GitHub - benedekrozemberczki/pytorch_geometric_temporal: PyTorch Geometric Temporal: Spatiotemporal Signal Processing with Neural Machine Learning Models (CIKM 2021)

Download the ZIP:

3. Requires Python version=3.7! ! (If not, create a new virtual environment)

conda create -n pytorch_geo Python=3.7 

4. Determine the version installed on your computer (GPU version)

 1. Is there a GPU, is CUDA installed, and is Pytorch installed?

 2. What is the CUDA version? The correct way to check the CUDA version (pro-test is effective)

     What is the version of Pytorch? (Direct conda list can be viewed)

     Of course, if Pytorch is not installed, it is recommended to install one first to match your own computer.

      Pytorch install GPU version

5. Unzip the zip and view docs/requirements.txt

networkx
numpy
https://download.pytorch.org/whl/cpu/torch-1.5.0%2Bcpu-cp37-cp37m-linux_x86_64.whl
https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/torch-1.5.0/torch_scatter-latest%2Bcpu-cp37-cp37m-linux_x86_64.whl
https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/torch-1.5.0/torch_sparse-latest%2Bcpu-cp37-cp37m-linux_x86_64.whl
https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/torch-1.5.0/torch_cluster-latest%2Bcpu-cp37-cp37m-linux_x86_64.whl
https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/torch-1.5.0/torch_spline_conv-latest%2Bcpu-cp37-cp37m-linux_x86_64.whl
torch_geometric
sphinx==4.0.2
sphinx_rtd_theme==0.5.2
six

----important! ! ! ————

        1. We need to change requirements.txt according to our situation:

https://pytorch-geometric.com/whl/torch-1.7.0.html

        Find the version you need at this link.

        2. For example, my computer is a window system, and Pytorch=1.7.0 with CUDA=10.2 has been installed, then you can change requirements.txt to:

networkx
numpy
https://pytorch-geometric.com/whl/torch-1.7.0/torch_scatter-latest+cu102-cp37-cp37m-win_amd64.whl
https://pytorch-geometric.com/whl/torch-1.7.0/torch_sparse-latest+cu102-cp37-cp37m-win_amd64.whl
https://pytorch-geometric.com/whl/torch-1.7.0/torch_cluster-latest+cu102-cp37-cp37m-win_amd64.whl
https://pytorch-geometric.com/whl/torch-1.7.0/torch_spline_conv-latest+cu102-cp37-cp37m-win_amd64.whl
torch_geometric
sphinx==4.0.2
sphinx_rtd_theme==0.5.2
six

        Other environments and versions can follow suit.

6. Install the packages in requirements.txt

        1. Open the anaconda prompt and activate the previously created virtual environment pytorch_geo 

        2. Switch path to pytorch_geometric_temporal-master\docs

cd  D:\pytorch_geometric_temporal-master\docs

        3. Enter:

pip install -r requirements.txt

         That's it!

Guess you like

Origin blog.csdn.net/baidu_30506559/article/details/121915734