summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2025-02-07 15:13:01 +0100
committerRicardo Wurmus <rekado@elephly.net>2025-02-15 12:53:11 +0100
commita82cc47ae408a9a92e1bd038fdb8d46f694ebde3 (patch)
treeec90015acfd3fb545c51e24591d755bf92d368d2
parent7e13c84238b11fd138fbfe2644a9ebf0b8f763c4 (diff)
python: Add python-jaxopt.
* guix-science/packages/python.scm (python-jaxopt): New variable.
-rw-r--r--guix-science/packages/python.scm56
1 files changed, 56 insertions, 0 deletions
diff --git a/guix-science/packages/python.scm b/guix-science/packages/python.scm
index 778c9a7..cfb13b3 100644
--- a/guix-science/packages/python.scm
+++ b/guix-science/packages/python.scm
@@ -769,6 +769,62 @@ as forward-mode differentiation, and the two can be composed
769arbitrarily to any order.") 769arbitrarily to any order.")
770 (license license:asl2.0))) 770 (license license:asl2.0)))
771 771
772(define-public python-jaxopt
773 (package
774 (name "python-jaxopt")
775 (version "0.8.3")
776 (source
777 (origin
778 (method git-fetch)
779 (uri (git-reference
780 (url "https://github.com/google/jaxopt")
781 (commit (string-append "jaxopt-v" version))))
782 (file-name (git-file-name name version))
783 (sha256
784 (base32 "0mak1rpjzw6v8birinrfn1plilgyvdxxqqs05rp89p54gd54gw2g"))))
785 (build-system pyproject-build-system)
786 (arguments
787 (list #:test-flags
788 ;; Differences in output due to strict tolerances.
789 '(list "-k" (string-append
790 "not test_binary_logit_log_likelihood"
791 " and not test_compare_with_sklearn0"
792 " and not test_compare_with_sklearn1"
793 " and not test_against_scipy0"
794 " and not test_against_scipy1"))))
795 (propagated-inputs
796 (list python-dm-tree
797 python-jax
798 python-jaxlib
799 python-optax
800 python-numpy
801 python-scipy))
802 (native-inputs
803 (list python-absl-py
804 python-cvxopt
805 python-cvxpy
806 python-pytest
807 python-pytest-xdist
808 python-scikit-learn
809 python-setuptools
810 python-wheel))
811 (home-page "https://github.com/google/jaxopt")
812 (synopsis "Hardware accelerated, batchable and differentiable optimizers in JAX")
813 (description "JAXopt provides hardware accelerated, batchable and
814differentiable optimizers in JAX.
815
816@enumerate
817@item Hardware accelerated: the implementations run on GPU and TPU, in
818 addition to CPU.
819@item Batchable: multiple instances of the same optimization problem
820 can be automatically vectorized using JAX’s @code{vmap}.
821@item Differentiable: optimization problem solutions can be
822 differentiated with respect to their inputs either implicitly or via
823 autodiff of unrolled algorithm iterations.
824@end enumerate
825")
826 (license license:asl2.0)))
827
772(define tensorflow-system-libs 828(define tensorflow-system-libs
773 (list 829 (list
774 ;;"absl_py" 830 ;;"absl_py"