guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 9919afc96543b63f839b1a4f267932c5881bd20a
Author: Ayan Das <[email protected]>
AuthorDate: Thu Jan 29 17:10:46 2026 +0530
gnu: python-pytorch-lightning: Update to 2.6.0.
* gnu/packages/machine-learning.scm (python-pytorch-lightning): Update to
2.6.0.
[source]: Update hash.
[arguments]: Fix LeafSpec deprecation with PyTorch 2.10.
Change-Id: I7db724fd269e6b171293c3d2258440f01d2ea2b6
Signed-off-by: Ludovic Courtès <[email protected]>
---
gnu/packages/machine-learning.scm | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/machine-learning.scm
b/gnu/packages/machine-learning.scm
index e66660b992..a937054e18 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -5717,7 +5717,7 @@ feedback.")
(define-public python-pytorch-lightning
(package
(name "python-pytorch-lightning")
- (version "2.5.5")
+ (version "2.6.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -5726,7 +5726,7 @@ feedback.")
(file-name (git-file-name name version))
(sha256
(base32
- "1xjib19kk8nfncr7cmd0j1czazvjzrprayarw275b75i0szda87h"))))
+ "0fqzjs3k55n2sp1kz8wxf82687d1vq0yydv45qx2vl3kzgvl0qff"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -5744,14 +5744,21 @@ feedback.")
;; These need tensorboard
" and not test_property_logger"
" and not test_property_loggers"))
- #:phases
- '(modify-phases %standard-phases
+ #:phases
+ '(modify-phases %standard-phases
(add-after 'unpack 'patch-version-detection
(lambda _
;; We do have pytorch 2.4.0, but the version comparison fails.
(substitute* "src/lightning/fabric/utilities/imports.py"
(("_TORCH_GREATER_EQUAL_2_4 =.*")
"_TORCH_GREATER_EQUAL_2_4 = True\n"))))
+ (add-after 'patch-version-detection 'fix-leafspec-deprecation
+ (lambda _
+ ;; `LeafSpec' is deprecated starting with PyTorch 2.10.
+ (substitute* "src/lightning/pytorch/utilities/_pytree.py"
+ (("SUPPORTED_NODES, LeafSpec, PyTree, TreeSpec,
_get_node_type, tree_unflatten")
+ "SUPPORTED_NODES, PyTree, TreeSpec, _get_node_type,
tree_unflatten, treespec_leaf")
+ (("LeafSpec\\(\\)") "treespec_leaf()"))))
(add-before 'build 'pre-build
(lambda _ (setenv "PACKAGE_NAME" "lightning")))
(add-after 'install 'pre-build-pytorch