[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50956] [PATCH v2 3/4] gnu: Add python-skorch.
From: |
Vinicius Monego |
Subject: |
[bug#50956] [PATCH v2 3/4] gnu: Add python-skorch. |
Date: |
Wed, 13 Oct 2021 02:00:34 +0000 |
* 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 --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")
--
2.30.2