aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/bayesian-optimization/default.nix
blob: c41181ca7b04424383538ee2a2d24b42e14e1a95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, scikitlearn
, scipy
, pytest
, isPy27
}:

buildPythonPackage rec {
  pname = "bayesian-optimization";
  version = "1.2.0";
  disabled = isPy27;

  src = fetchFromGitHub {
    owner = "fmfn";
    repo = "BayesianOptimization";
    rev = version;
    sha256 = "01mg9npiqh1qmq5ldnbpjmr8qkiw827msiv3crpkhbj4bdzasbfm";
  };

  propagatedBuildInputs = [
    scikitlearn
    scipy
  ];

  checkInputs = [ pytest ];
  checkPhase = ''
    # New sklearn broke one test: https://github.com/fmfn/BayesianOptimization/issues/243
    pytest tests -k "not test_suggest_with_one_observation"
  '';

  meta = with lib; {
    description = "A Python implementation of global optimization with gaussian processes";
    homepage = "https://github.com/fmfn/BayesianOptimization";
    license = licenses.mit;
    maintainers = [ maintainers.juliendehos ];
  };
}