diff mbox series

[bug#50956,v2,3/4] gnu: Add python-skorch.

Message ID 20211013020035.53000-3-monego@posteo.net
State New
Headers show
Series [bug#50956,v2,1/4] gnu: Add python-scikit-optimize. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego Oct. 13, 2021, 2 a.m. UTC
* gnu/packages/machine-learning.scm (python-skorch): New variable.
---
Swapped order of native and propagated inputs.

 gnu/packages/machine-learning.scm | 42 +++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 6b7736702a..09767584bb 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1050,6 +1050,48 @@  number of threads used in the threadpool-backed of common native libraries used
 for scientific computing and data science (e.g. BLAS and OpenMP).")
     (license license:bsd-3)))
 
+(define-public python-skorch
+  (package
+    (name "python-skorch")
+    (version "0.10.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "skorch" version))
+       (sha256
+        (base32 "196hr0q5nw1nzckwanfv27myasayfdxxhx80iv9whm7675rzj44r"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest" "--pyargs" "skorch" "-k"
+                       (string-append
+                        ;; Errors because of missing weight and pickle files.
+                        "not test_load_cuda_params_to_cpu"
+                        " and not test_pickle_load"))))))))
+    (native-inputs
+     `(("python-flaky" ,python-flaky)
+       ("python-pandas" ,python-pandas)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytorch" ,python-pytorch)))
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)
+       ("python-scikit-learn" ,python-scikit-learn)
+       ("python-scipy" ,python-scipy)
+       ("python-tabulate" ,python-tabulate)
+       ("python-tqdm" ,python-tqdm)))
+    (home-page "https://github.com/skorch-dev/skorch")
+    (synopsis "Scikit-learn compatible neural network library for PyTorch")
+    (description "Skorch is a scikit-learn compatible neural network library
+that wraps PyTorch.  It allows to build and train PyTorch models using a
+scikit-learn-like API.")
+    (license license:bsd-3)))
+
 (define-public python-pynndescent
   (package
     (name "python-pynndescent")