gnu: python-pytorch-geometric: Update to commit 85cf9fc.

Fixes guix/guix#1043.

* gnu/packages/machine-learning.scm (python-pytorch-geometric): Update to
commit 85cf9fc.
[arguments]: Fix the 'delete-top-level-directories phase.
[propagated-inputs]: Add python-xxhash.

Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
David Elsing 2025-07-11 20:54:39 +02:00 committed by Andreas Enge
parent baba8a4370
commit fd8e1f3e65
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -89,6 +89,7 @@
#:use-module (gnu packages curl) #:use-module (gnu packages curl)
#:use-module (gnu packages databases) #:use-module (gnu packages databases)
#:use-module (gnu packages dejagnu) #:use-module (gnu packages dejagnu)
#:use-module (gnu packages digest)
#:use-module (gnu packages documentation) #:use-module (gnu packages documentation)
#:use-module (gnu packages freedesktop) #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gcc) #:use-module (gnu packages gcc)
@ -5461,91 +5462,94 @@ Note: currently this package does not provide GPU support.")
python-sympy))))) python-sympy)))))
(define-public python-pytorch-geometric (define-public python-pytorch-geometric
(package (let ((commit "85cf9fc12b1138c1f2adbed8a761356c3f4197e7")
(name "python-pytorch-geometric") (revision "0"))
(version "2.6.1") (package
(source (origin (name "python-pytorch-geometric")
(method git-fetch) (version (git-version "2.6.1" revision commit))
(uri (git-reference (source (origin
(url "https://github.com/pyg-team/pytorch_geometric/") (method git-fetch)
(commit version))) (uri (git-reference
(file-name (git-file-name name version)) (url "https://github.com/pyg-team/pytorch_geometric/")
(sha256 (commit commit)))
(base32 (file-name (git-file-name name version))
"0dbxz9d22vzm7fr9kgg66hj3sf8ag2ly8qky58cxvn1hyjl5h3v7")))) (sha256
(build-system pyproject-build-system) (base32
(arguments "104v3w9yv7akyxpyd8aq85mw1mncql8mvr1p1b34ph09csqh68hq"))))
(list (build-system pyproject-build-system)
#:test-flags (arguments
;; Hangs with AttributeError: 'NoneType' object has no attribute 'rpc_async' (list
'(list "--ignore=test/distributed/test_rpc.py" #:test-flags
;; A message passing jinja template is missing ;; Hangs with AttributeError: 'NoneType' object has no attribute 'rpc_async'
"--ignore=test/nn/conv/test_message_passing.py" '(list "--ignore=test/distributed/test_rpc.py"
"--ignore=test/nn/test_sequential.py" ;; A message passing jinja template is missing
"--ignore=test/nn/models/test_basic_gnn.py" "--ignore=test/nn/conv/test_message_passing.py"
;; These all fail with a size mismatch error such as "--ignore=test/nn/test_sequential.py"
;; RuntimeError: shape '[-1, 2, 1, 1]' is invalid for input of size 3 "--ignore=test/nn/models/test_basic_gnn.py"
"--ignore=test/explain/algorithm/test_captum_explainer.py" ;; These all fail with a size mismatch error such as
;; Requires the nonfree MKL on CPU. ;; RuntimeError: shape '[-1, 2, 1, 1]' is invalid for input of size 3
"--ignore=test/nn/models/test_graph_unet.py" "--ignore=test/explain/algorithm/test_captum_explainer.py"
"-k" (string-append ;; Requires the nonfree MKL on CPU.
;; Permissions error "--ignore=test/nn/models/test_graph_unet.py"
"not test_packaging" "-k" (string-append
;; Unknown multiprocessing failure ;; Permissions error
" and not test_data_share_memory" "not test_packaging"
;; This can fail due to accuracy problems ;; Unknown multiprocessing failure
" and not test_gdc" " and not test_data_share_memory"
;; These refuse to be run on CPU and really want a GPU ;; This can fail due to accuracy problems
" and not test_add_random_walk_pe" " and not test_gdc"
" and not test_asap" ;; These refuse to be run on CPU and really want a GPU
" and not test_two_hop" " and not test_add_random_walk_pe"
;; Failed when switched to python@3.11 " and not test_asap"
;; typing module internals " and not test_two_hop"
" and not test_type_repr")) ;; Failed when switched to python@3.11
#:phases ;; typing module internals
'(modify-phases %standard-phases " and not test_type_repr"))
(add-after 'unpack 'delete-top-level-directories #:phases
(lambda _ '(modify-phases %standard-phases
;; The presence of these directories confuses the pyproject build (add-after 'unpack 'delete-top-level-directories
;; system. (lambda _
(for-each delete-file-recursively ;; The presence of these directories confuses the pyproject build
'("conda" "docker" "graphgym"))))))) ;; system.
(propagated-inputs (for-each delete-file-recursively
(list onnx '("docker" "graphgym")))))))
python-captum (propagated-inputs
python-graphviz (list onnx
python-h5py python-captum
python-jinja2 python-graphviz
python-matplotlib python-h5py
python-networkx python-jinja2
python-numba python-matplotlib
python-numpy python-networkx
python-opt-einsum python-numba
python-pandas python-numpy
python-protobuf python-opt-einsum
python-psutil python-pandas
python-pyparsing python-protobuf
python-pytorch-lightning python-psutil
python-rdflib python-pyparsing
python-requests python-pytorch-lightning
python-scikit-image python-rdflib
python-scikit-learn python-requests
python-scipy python-scikit-image
python-statsmodels python-scikit-learn
python-sympy python-scipy
python-tabulate python-statsmodels
python-torchmetrics python-sympy
python-tqdm)) python-tabulate
(native-inputs python-torchmetrics
(list python-flit-core python-tqdm
python-pytest python-xxhash))
python-pytest-cov)) (native-inputs
(home-page "https://pyg.org") (list python-flit-core-next
(synopsis "Graph Neural Network library for PyTorch") python-pytest
(description python-pytest-cov))
"PyG is a library built upon PyTorch to easily write and train Graph (home-page "https://pyg.org")
(synopsis "Graph Neural Network library for PyTorch")
(description
"PyG is a library built upon PyTorch to easily write and train Graph
Neural Networks for a wide range of applications related to structured data.") Neural Networks for a wide range of applications related to structured data.")
(license license:expat))) (license license:expat))))
(define-public python-lightning-cloud (define-public python-lightning-cloud
(package (package