summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorVinicius Monego <monego@posteo.net>2021-07-08 23:20:57 +0000
committerMathieu Othacehe <othacehe@gnu.org>2021-07-25 17:56:58 +0200
commit8854acd434bbac7ed569add2b930658f1fc8d70c (patch)
tree27cd3ca923f3af92384bd75df9f713ec9b43a58b /gnu
parentaaf94ec750a4e91ceea4427ba3edd45c94efa16f (diff)
downloadguix-8854acd434bbac7ed569add2b930658f1fc8d70c.tar.gz
gnu: Add python-hyperopt.
* gnu/packages/machine-learning.scm (python-hyperopt): New variable.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/machine-learning.scm51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 504cabc11d..952872e468 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1204,6 +1204,57 @@ Models, is a program for performing both single-SNP and SNP-set genome-wide
 association studies (GWAS) on extremely large data sets.")
     (license license:asl2.0)))
 
+(define-public python-hyperopt
+  (package
+    (name "python-hyperopt")
+    (version "0.2.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "hyperopt" version))
+       (sha256
+        (base32 "1k4ma8ci0bxghw7g4ms944zak1pi83yv2d6bxd7fcslm1zalfq5w"))))
+    (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" "--ignore"
+                       ;; Needs python-pyspark.
+                       "hyperopt/tests/test_spark.py"
+                       ;; Needs both python-scikit-learn and python-lightgbm.
+                       "--ignore" "hyperopt/tests/test_atpe_basic.py"
+                       ;; The tests below need python-lightgbm.
+                       "-k" (string-append "not test_branin"
+                                           " and not test_distractor"
+                                           " and not test_q1lognormal"
+                                           " and not test_quadratic1"
+                                           " and not test_twoarms"))))))))
+    (propagated-inputs
+     `(("python-cloudpickle" ,python-cloudpickle)
+       ("python-future" ,python-future)
+       ("python-networkx" ,python-networkx)
+       ("python-numpy" ,python-numpy)
+       ("python-scipy" ,python-scipy)
+       ("python-six" ,python-six)
+       ("python-tqdm" ,python-tqdm)))
+    (native-inputs
+     `(("python-black" ,python-black)
+       ("python-ipython" ,python-ipython)
+       ("python-ipyparallel" ,python-ipyparallel)
+       ("python-nose" ,python-nose)
+       ("python-pymongo" ,python-pymongo)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://hyperopt.github.io/hyperopt/")
+    (synopsis "Library for hyperparameter optimization")
+    (description "Hyperopt is a Python library for serial and parallel
+optimization over awkward search spaces, which may include real-valued,
+discrete, and conditional dimensions.")
+    (license license:bsd-3)))
+
 ;; There have been no proper releases yet.
 (define-public kaldi
   (let ((commit "d4791c0f3fc1a09c042dac365e120899ee2ad21e")