@@ 2971,6 2971,8 @@ interactive learning.")
(license license:bsd-3)))
(define-public python-hyperopt
+ ;; XXX: No releases since 2021, see:
+ ;; <https://github.com/hyperopt/hyperopt/issues/943>.
(package
(name "python-hyperopt")
(version "0.2.7")
@@ 2981,39 2983,44 @@ interactive learning.")
(sha256
(base32 "0jd1ghmm423kbhjvd6pxq92y5vkz25390687fcnd7fshh3jrmy0v"))))
(build-system pyproject-build-system)
+ ;; tests: 219 passed, 2 skipped, 7 deselected, 35331 warnings
(arguments
(list
- #:phases
- '(modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "python" "-m" "pytest"
- ;; Needs python-pyspark.
- "--ignore" "hyperopt/tests/integration/test_spark.py"
- ;; Needs both python-scikit-learn and python-lightgbm.
- "--ignore" "hyperopt/tests/unit/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"
- ;; XXX Type error with this version of scipy
- " and not test_distribution_rvs"))))))))
+ #:test-flags
+ #~(list "--ignore=hyperopt/tests/integration/"
+ #$@(map (lambda (test) (string-append "--deselect="
+ "hyperopt/tests/unit/"
+ test))
+ ;; ImportError: You must install lightgbm and sklearn in
+ ;; order to use the ATPE algorithm. Please run `pip
+ ;; install lightgbm scikit-learn` and try again. These
+ ;; are not built in dependencies of hyperopt.
+ (list "test_tpe.py::TestSuggestAtpe::test_branin"
+ "test_tpe.py::TestSuggestAtpe::test_distractor"
+ "test_tpe.py::TestSuggestAtpe::test_q1lognormal"
+ "test_tpe.py::TestSuggestAtpe::test_quadratic1"
+ "test_tpe.py::TestSuggestAtpe::test_twoarms"
+ "test_atpe_basic.py::test_run_basic_search"
+ ;; TypeError: unsupported operand type(s) for -:
+ ;; 'method' and 'int'
+ "test_rdists.py::TestLogUniform::test_distribution_rvs")))))
+ (native-inputs
+ (list python-pymongo
+ python-pynose ;fails more without extra test runner
+ python-pytest))
(propagated-inputs
(list python-cloudpickle
python-future
python-py4j
python-networkx
- python-numpy
+ python-numpy-1
python-scipy
python-setuptools ; For pkg_resources.
python-six
- python-tqdm))
- (native-inputs
- (list python-pymongo python-pynose python-pytest))
+ python-tqdm
+ ;; [optional]
+ ;; python-lightgbm
+ python-scikit-learn))
(home-page "https://hyperopt.github.io/hyperopt/")
(synopsis "Library for hyperparameter optimization")
(description "Hyperopt is a Python library for serial and parallel