summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAyan Das <bvits@riseup.net>2026-01-29 17:10:46 +0530
committerLudovic Courtès <ludo@gnu.org>2026-02-22 18:41:11 +0100
commit9919afc96543b63f839b1a4f267932c5881bd20a (patch)
tree4c992a7c026519396ec54ebc42d45d1bbe9040b9 /gnu
parentcb5934e85efffc494f5b980703e7de585004174c (diff)
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 <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/machine-learning.scm15
1 files changed, 11 insertions, 4 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index e66660b992e..a937054e18f 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