2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
|
|
|
, scikitlearn
|
|
|
|
, scipy
|
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bayesian-optimization";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "1.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fmfn";
|
|
|
|
repo = "BayesianOptimization";
|
2020-10-16 20:44:37 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "01mg9npiqh1qmq5ldnbpjmr8qkiw827msiv3crpkhbj4bdzasbfm";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
scikitlearn
|
|
|
|
scipy
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [ pytest ];
|
|
|
|
checkPhase = ''
|
2020-10-07 09:15:18 +00:00
|
|
|
# New sklearn broke one test: https://github.com/fmfn/BayesianOptimization/issues/243
|
|
|
|
pytest tests -k "not test_suggest_with_one_observation"
|
2020-04-24 23:36:52 +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 ];
|
|
|
|
};
|
|
|
|
}
|