summaryrefslogtreecommitdiff
path: root/gnu/packages/machine-learning.scm
diff options
context:
space:
mode:
authorAyan Das <bvits@riseup.net>2025-10-20 00:33:08 +0530
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-11-04 12:12:56 +0000
commit720d2b57ebf1222cb998acaa46a91f5ee08f2041 (patch)
tree5643b9ea2e852bae4c08b61c9a9f92df8565ee5a /gnu/packages/machine-learning.scm
parent04eeea17f52e94c3df813b814cda2234d2c6ab87 (diff)
gnu: python-pytorch: Update to 2.9.0.
* gnu/packages/machine-learning.scm (python-pytorch): Update to 2.9.0. [source]: Update hash. [arguments]: Add 'skip-pip-redirect' phase to avoid pip redirect in setup.py. Extend concurrentqueue include fix to cover nativert. [native-inputs]: Add python-setuptools. * gnu/packages/patches/python-pytorch-system-libraries.patch: Update for 2.9.0. Change-Id: I26606949da3c36fe8d7b6933ec54cb2c347a1bb9 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r--gnu/packages/machine-learning.scm16
1 files changed, 12 insertions, 4 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 0ab424cb76e..c6840242bd7 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4308,7 +4308,7 @@ PyTorch.")
(base32
"0hdpkhcjry22fjx2zg2r48v7f4ljrclzj0li2pgk76kvyblfbyvm"))))))
-(define %python-pytorch-version "2.8.0")
+(define %python-pytorch-version "2.9.0")
(define %python-pytorch-src
(origin
@@ -4319,7 +4319,7 @@ PyTorch.")
(file-name (git-file-name "python-pytorch" %python-pytorch-version))
(sha256
(base32
- "0am8mx0mq3hqsk1g99a04a4fdf865g93568qr1f247pl11r2jldl"))
+ "005gj27qikkgbibbk00z8xs9a8xms2fxapm53inp31zxm4853myh"))
(patches (search-patches "python-pytorch-system-libraries.patch"
"python-pytorch-runpath.patch"
"python-pytorch-without-kineto.patch"
@@ -4476,8 +4476,14 @@ PyTorch.")
;; the 'sanity-check phase to fail.
(add-after 'unpack 'remove-fr-trace-script
(lambda _
+ (substitute* "setup.py"
+ (("entry_points\\[\"console_scripts\"\\]\\.append\\(") "("))))
+ (add-after 'remove-fr-trace-script 'skip-pip-redirect
+ (lambda _
+ ;; Keep using setup.py directly instead of invoking pip.
(substitute* "setup.py"
- (("entry_points\\[\"console_scripts\"\\]\\.append\\(") "("))))
+ (("if arg == \"install\":")
+ "if False and arg == \"install\":"))))
(add-before 'build 'use-system-libraries
(lambda _
(for-each
@@ -4494,7 +4500,8 @@ PyTorch.")
;; Fix moodycamel/concurrentqueue includes for system package
(substitute* '("c10/util/Semaphore.h"
- "c10/test/util/Semaphore_test.cpp")
+ "c10/test/util/Semaphore_test.cpp"
+ "torch/nativert/executor/ParallelGraphExecutor.cpp")
(("<moodycamel/concurrentqueue\\.h>") "<concurrentqueue.h>")
(("<moodycamel/lightweightsemaphore\\.h>") "<lightweightsemaphore.h>"))
@@ -4655,6 +4662,7 @@ PyTorch.")
python-pytest-shard
python-pytest-xdist
python-hypothesis
+ python-setuptools
python-types-dataclasses
shaderc
valgrind/pinned))