pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
20.52k stars 3.57k forks source link

[BUG] Fixing Bug in Version Handling #9410

Closed drivanov closed 2 weeks ago

drivanov commented 3 weeks ago

I've noticed that the tests with the withPackage test decorators

@withPackage("torch>=1.12.0")
def test_some_test(...):
    . . .

are not being executed,

SKIPPED [2] test/nn/conv/test_heat_conv.py:10: Package torch>=1.12.0 not found
SKIPPED [2] test/nn/conv/test_hetero_conv.py:181: Package torch>=2.1.0 not found
SKIPPED [1] test/nn/conv/test_hgt_conv.py:12: Package torch>=1.12.0 not found
SKIPPED [1] test/nn/conv/test_hgt_conv.py:63: Package torch>=1.12.0 not found
SKIPPED [1] test/nn/conv/test_hgt_conv.py:114: Package torch>=1.12.0 not found

even though I have torch=2.4.0 installed on my machine. To be precise, I am using Torch version 2.4.0a0+f70bd71a48.nv24.06 which has an unexpected version ID format for the for pytorch_geometric .

The proposed PR uses standard Python version handling, which covers the dev case previously treated separately.

NOTES: