3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/bayesian-optimization/default.nix

41 lines
899 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, scikit-learn
, 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 = [
scikit-learn
scipy
];
2020-08-25 03:07:09 +01:00
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 ];
};
}