[PATCH 0/6] Add PyTorch-related statistics libraries.

  • Open
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Vinicius Monego
Owner
unassigned
Submitted by
Vinicius Monego
Severity
normal
V
V
Vinicius Monego wrote on 21 May 2023 04:59
(address . guix-patches@gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230521025911.1278475-1-monego@posteo.net
This patchset adds gpytorch, botorch and Ax.

Vinicius Monego (6):
gnu: Add python-linear-operator.
gnu: Add python-gpytorch.
gnu: python-pyro-ppl: Update to 1.8.4.
gnu: Add python-botorch.
gnu: Add python-yappi.
gnu: Add python-ax-platform.

gnu/packages/machine-learning.scm | 134 +++++++++++++++++++++++++++++-
gnu/packages/python-xyz.scm | 24 ++++++
2 files changed, 156 insertions(+), 2 deletions(-)

--
2.34.1
V
V
Vinicius Monego wrote on 21 May 2023 05:02
[PATCH 1/6] gnu: Add python-linear-operator.
(address . 63621@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230521030210.1282819-1-monego@posteo.net
* gnu/packages/machine-learning.scm (python-linear-operator): New variable.
---
gnu/packages/machine-learning.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 694b050e86..de06b4988a 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4080,6 +4080,25 @@ (define-public python-pyro-ppl
inference.")
(license license:asl2.0)))
+(define-public python-linear-operator
+ (package
+ (name "python-linear-operator")
+ (version "0.4.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "linear_operator" version))
+ (sha256
+ (base32
+ "1ipm154n8cxnl35i8wrx650a60yxyhjpdpdl1mf7ijaqybwcjmvw"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-pytorch python-scipy))
+ (native-inputs (list python-flake8 python-flake8-print python-twine))
+ (home-page "https://github.com/cornellius-gp/linear_operator/")
+ (synopsis "Linear operator implementation")
+ (description "LinearOperator is a PyTorch package for abstracting away the
+linear algebra routines needed for structured matrices (or operators).")
+ (license license:expat)))
+
(define-public vosk-api
(let* ((openfst openfst-for-vosk)
(kaldi kaldi-for-vosk))
--
2.34.1
V
V
Vinicius Monego wrote on 21 May 2023 05:02
[PATCH 2/6] gnu: Add python-gpytorch.
(address . 63621@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230521030210.1282819-2-monego@posteo.net
* gnu/packages/machine-learning.scm (python-gpytorch): New variable.
---
gnu/packages/machine-learning.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index de06b4988a..f4b59556bc 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4099,6 +4099,33 @@ (define-public python-linear-operator
linear algebra routines needed for structured matrices (or operators).")
(license license:expat)))
+(define-public python-gpytorch
+ (package
+ (name "python-gpytorch")
+ (version "1.10")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "gpytorch" version))
+ (sha256
+ (base32
+ "063zzc515xip3d11y21ld47ca3qq0hqs27jgba20l8mzkympijbd"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; This test failed.
+ (list #:test-flags #~'("-k" "not test_deprecated_methods")))
+ (propagated-inputs (list python-linear-operator python-scikit-learn))
+ (native-inputs (list python-coverage
+ python-flake8
+ python-flake8-print
+ python-nbval
+ python-pytest
+ python-twine))
+ (home-page "https://gpytorch.ai")
+ (synopsis "Implementation of Gaussian Processes in Pytorch")
+ (description
+ "GPyTorch is a Gaussian process library implemented using PyTorch.")
+ (license license:expat)))
+
(define-public vosk-api
(let* ((openfst openfst-for-vosk)
(kaldi kaldi-for-vosk))
--
2.34.1
V
V
Vinicius Monego wrote on 21 May 2023 05:02
[PATCH 3/6] gnu: python-pyro-ppl: Update to 1.8.4.
(address . 63621@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230521030210.1282819-3-monego@posteo.net
* gnu/packages/machine-learning.scm (python-pyro-ppl): Update to 1.8.4.
---
gnu/packages/machine-learning.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index f4b59556bc..90bfe283a2 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4009,7 +4009,7 @@ (define-public python-pyro-api
(define-public python-pyro-ppl
(package
(name "python-pyro-ppl")
- (version "1.8.1")
+ (version "1.8.4")
;; The sources on pypi don't include tests.
(source
(origin
@@ -4019,7 +4019,7 @@ (define-public python-pyro-ppl
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0ns20mr8qgjshzbplrfzaz1xhb9ldbgvrj2rzlsxvns2bi1ddyl5"))))
+ (base32 "1h00i847dsggiw9mmvjbi4nacpjbyqi5wjqg5gbfnmzimhdrgp77"))))
(build-system python-build-system)
(arguments
`(#:phases
--
2.34.1
V
V
Vinicius Monego wrote on 21 May 2023 05:02
[PATCH 4/6] gnu: Add python-botorch.
(address . 63621@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230521030210.1282819-4-monego@posteo.net
* gnu/packages/machine-learning.scm (python-botorch): New variable.
---
gnu/packages/machine-learning.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 90bfe283a2..1e34e5fd5e 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4126,6 +4126,34 @@ (define-public python-gpytorch
"GPyTorch is a Gaussian process library implemented using PyTorch.")
(license license:expat)))
+(define-public python-botorch
+ (package
+ (name "python-botorch")
+ (version "0.8.5")
+ (source (origin
+ (method git-fetch) ;no tests in PyPI
+ (uri (git-reference
+ (url "https://github.com/pytorch/botorch")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1xa98xy5wx0mf6fx62lx5cy84svi695iwcg4n74z4f9wz60lghsm"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-gpytorch
+ python-linear-operator
+ python-multipledispatch
+ python-pyro-ppl
+ python-scipy
+ python-pytorch))
+ (native-inputs (list python-black python-flake8 python-pytest
+ python-pytest-cov python-sphinx))
+ (home-page "https://botorch.org")
+ (synopsis "Bayesian Optimization in PyTorch")
+ (description
+ "BoTorch is a library for Bayesian Optimization built on PyTorch.")
+ (license license:expat)))
+
(define-public vosk-api
(let* ((openfst openfst-for-vosk)
(kaldi kaldi-for-vosk))
--
2.34.1
V
V
Vinicius Monego wrote on 21 May 2023 05:02
[PATCH 5/6] gnu: Add python-yappi.
(address . 63621@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230521030210.1282819-5-monego@posteo.net
* gnu/packages/python-xyz.scm (python-yappi): New variable.
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9ee45ab525..c7a31e40a1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3299,6 +3299,30 @@ (define-public python-openpyxl
standard.")
(license license:expat)))
+(define-public python-yappi
+ (package
+ (name "python-yappi")
+ (version "1.4.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "yappi" version))
+ (sha256
+ (base32
+ "1h3zl60pi57ynb3sw7sg2wcn157jwz992y95bv5kcds3qy7msjsh"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-gevent))
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "run_tests.py")))))))
+ (home-page "https://github.com/sumerc/yappi")
+ (synopsis "Yet Another Python Profiler")
+ (description "Yappi is a tracing profiler that is multithreading, asyncio
+and gevent aware.")
+ (license license:expat)))
+
(define-public python-eventlet
(package
(name "python-eventlet")
--
2.34.1
V
V
Vinicius Monego wrote on 21 May 2023 05:02
[PATCH 6/6] gnu: Add python-ax-platform.
(address . 63621@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230521030210.1282819-6-monego@posteo.net
* gnu/packages/machine-learning.scm (python-ax-platform): New variable.
---
gnu/packages/machine-learning.scm | 56 +++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)

Toggle diff (69 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 1e34e5fd5e..384c980478 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4154,6 +4154,62 @@ (define-public python-botorch
"BoTorch is a library for Bayesian Optimization built on PyTorch.")
(license license:expat)))
+(define-public python-ax-platform
+ (package
+ (name "python-ax-platform")
+ (version "0.3.2")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "ax-platform" version))
+ (sha256
+ (base32
+ "1spyp8wjf0jyh7yf002sl4lc1rwbnzdki9ql9a3nzsyyx602flj8"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; Ignore tests for tensorboard and torchx, which we don't have.
+ (list #:test-flags
+ #~(list "--ignore" "ax/metrics/tests/test_tensorboard.py"
+ "--ignore" "ax/runners/tests/test_torchx.py"
+ ;; This test tries to download online data.
+ "-k" "not test_torchvision_encode_decode")
+ ;; Ax checks for typeguard==2.13.3 which is the version we have,
+ ;; but the version report in typeguard is fault and displays 0.0.0.
+ #:phases #~(modify-phases %standard-phases
+ (delete 'sanity-check))))
+ (propagated-inputs (list python-botorch
+ python-ipywidgets
+ python-jinja2
+ python-pandas
+ python-plotly
+ python-scikit-learn
+ python-scipy
+ python-typeguard))
+ (native-inputs (list jupyter
+ python-beautifulsoup4
+ python-black
+ python-flake8
+ python-hypothesis
+ python-jinja2
+ python-jupyter-client
+ python-mypy
+ python-nbconvert
+ python-pyfakefs
+ python-pyre-extensions
+ python-pytest
+ python-pytest-cov
+ python-sqlalchemy
+ python-torchvision
+ python-yappi))
+ (home-page "https://ax.dev/")
+ (synopsis "Adaptive Experimentation Platform")
+ (description
+ "Ax is an accessible, general-purpose platform for
+understanding, managing, deploying, and automating adaptive experiments.
+Adaptive experimentation is the machine-learning guided process of
+iteratively exploring a (possibly infinite) parameter space in order to
+identify optimal configurations in a resource-efficient manner.")
+ (license license:expat)))
+
(define-public vosk-api
(let* ((openfst openfst-for-vosk)
(kaldi kaldi-for-vosk))
--
2.34.1
L
L
Ludovic Courtès wrote on 7 Aug 2023 16:06
Re: bug#63621: [PATCH 0/6] Add PyTorch-related statistics libraries.
(name . Vinicius Monego)(address . monego@posteo.net)(address . 63621@debbugs.gnu.org)
87y1inrlou.fsf@gnu.org
Hi Vinicius,

Vinicius Monego <monego@posteo.net> skribis:

Toggle quote (10 lines)
> This patchset adds gpytorch, botorch and Ax.
>
> Vinicius Monego (6):
> gnu: Add python-linear-operator.
> gnu: Add python-gpytorch.
> gnu: python-pyro-ppl: Update to 1.8.4.
> gnu: Add python-botorch.
> gnu: Add python-yappi.
> gnu: Add python-ax-platform.

https://qa.guix.gnu.org/issue/63621 currently says “Yet to process
revision” (perhaps erroneously) but the patch set LGTM, so if the
dependent of python-pyto-ppl still builds fine, I think you can push.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 21 Aug 2023 15:03
(name . Vinicius Monego)(address . monego@posteo.net)(address . 63621@debbugs.gnu.org)
87bkf0bl9k.fsf_-_@gnu.org
Hi!

Friendly reminder. :-)

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (20 lines)
> Hi Vinicius,
>
> Vinicius Monego <monego@posteo.net> skribis:
>
>> This patchset adds gpytorch, botorch and Ax.
>>
>> Vinicius Monego (6):
>> gnu: Add python-linear-operator.
>> gnu: Add python-gpytorch.
>> gnu: python-pyro-ppl: Update to 1.8.4.
>> gnu: Add python-botorch.
>> gnu: Add python-yappi.
>> gnu: Add python-ax-platform.
>
> <https://qa.guix.gnu.org/issue/63621> currently says “Yet to process
> revision” (perhaps erroneously) but the patch set LGTM, so if the
> dependent of python-pyto-ppl still builds fine, I think you can push.
>
> Thanks,
> Ludo’.
V
V
Vinicius Monego wrote on 24 Aug 2023 04:25
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 63621@debbugs.gnu.org)
c420c297a0b527216718ca387cc62e8d917ba1d1.camel@posteo.net
Em seg, 2023-08-21 às 15:03 +0200, Ludovic Courtès escreveu:
Toggle quote (4 lines)
> Hi!
>
> Friendly reminder.  :-)

Hi Ludo,

Could you take another look at https://issues.guix.gnu.org/63980?It
doesn't feel right to delete sanity checks in this series or having to
work around it because of typeguard.

I updated the packages to their latest version and had to introduce a
new package (python-jaxtyping). But now some tests are failing in
gpytorch, so I'm taking a look at that.

Vinicius
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 63621@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 63621
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch