1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, scikit-learn
5, scipy
6, pytest
7, isPy27
8}:
9
10buildPythonPackage rec {
11 pname = "bayesian-optimization";
12 version = "1.2.0";
13 disabled = isPy27;
14
15 src = fetchFromGitHub {
16 owner = "fmfn";
17 repo = "BayesianOptimization";
18 rev = version;
19 sha256 = "01mg9npiqh1qmq5ldnbpjmr8qkiw827msiv3crpkhbj4bdzasbfm";
20 };
21
22 propagatedBuildInputs = [
23 scikit-learn
24 scipy
25 ];
26
27 checkInputs = [ pytest ];
28 checkPhase = ''
29 # New sklearn broke one test: https://github.com/fmfn/BayesianOptimization/issues/243
30 pytest tests -k "not test_suggest_with_one_observation"
31 '';
32
33 meta = with lib; {
34 description = "A Python implementation of global optimization with gaussian processes";
35 homepage = "https://github.com/fmfn/BayesianOptimization";
36 license = licenses.mit;
37 maintainers = [ maintainers.juliendehos ];
38 };
39}