2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-05-20 23:08:51 +00:00
|
|
|
, scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
|
|
|
, pytest
|
2020-11-21 19:51:51 +00:00
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bayesian-optimization";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "1.2.0";
|
2020-11-21 19:51:51 +00:00
|
|
|
disabled = isPy27;
|
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 = [
|
2021-05-20 23:08:51 +00:00
|
|
|
scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|