2020-02-13 12:31:08 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
|
|
|
, scikitlearn
|
|
|
|
, scipy
|
|
|
|
, pytest
|
2020-11-18 16:39:33 +00:00
|
|
|
, isPy27
|
2020-02-13 12:31:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bayesian-optimization";
|
2020-10-16 06:41:18 +01:00
|
|
|
version = "1.2.0";
|
2020-11-18 16:39:33 +00:00
|
|
|
disabled = isPy27;
|
2020-02-13 12:31:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fmfn";
|
|
|
|
repo = "BayesianOptimization";
|
2020-10-16 06:41:18 +01:00
|
|
|
rev = version;
|
|
|
|
sha256 = "01mg9npiqh1qmq5ldnbpjmr8qkiw827msiv3crpkhbj4bdzasbfm";
|
2020-02-13 12:31:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
scikitlearn
|
|
|
|
scipy
|
|
|
|
];
|
2020-08-25 03:07:09 +01:00
|
|
|
|
2020-02-13 12:31:08 +00:00
|
|
|
checkInputs = [ pytest ];
|
|
|
|
checkPhase = ''
|
2020-09-23 19:52:04 +01:00
|
|
|
# New sklearn broke one test: https://github.com/fmfn/BayesianOptimization/issues/243
|
|
|
|
pytest tests -k "not test_suggest_with_one_observation"
|
2020-02-13 12:31:08 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|