Subject: [PATCH v2 1/4] gnu: Add python-scikit-optimize.

From: Vinicius Monego <[email-masked]>
Date: Wed, 13 Oct 2021 02:00:32 +0000

* gnu/packages/machine-learning.scm (python-scikit-optimize): New variable.
---
scikit-optimize 0.9.0 was released today, added it as a patch in the series.

 gnu/packages/machine-learning.scm | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 029422677a..478e9548e9 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1218,6 +1218,44 @@ main intended application of Autograd is gradient-based optimization.")
 (define-public python2-autograd
   (package-with-python2 python-autograd))
 
+(define-public python-scikit-optimize
+  (package
+    (name "python-scikit-optimize")
+    (version "0.9.0")
+    (source
+     (origin
+       (method git-fetch) ; no tests in PyPI tarball
+       (uri (git-reference
+             (url "https://github.com/scikit-optimize/scikit-optimize")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "0hsq6pmryimxc275yrcy4bv217bx7ma6rz0q6m4138bv4zgq18d1"))
+       (file-name (git-file-name name version))))
+    (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")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-joblib" ,python-joblib)
+       ("python-numpy" ,python-numpy)
+       ("python-pyaml" ,python-pyaml)
+       ("python-scikit-learn" ,python-scikit-learn)
+       ("python-scipy" ,python-scipy)))
+    (home-page "https://scikit-optimize.github.io/")
+    (synopsis "Sequential model-based optimization")
+    (description
+     "Scikit-Optimize, or @code{skopt}, is a library to minimize (very)
+expensive and noisy black-box functions.  It implements several methods
+for sequential model-based optimization.")
+    (license license:bsd-3)))
+
 (define-public lightgbm
   (package
     (name "lightgbm")
-- 
2.30.2