2022-05-29 09:10:09 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-02-13 12:31:08 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-05-14 18:46:36 +00:00
|
|
|
, scikit-learn
|
2020-02-13 12:31:08 +00:00
|
|
|
, scipy
|
2022-09-06 17:38:23 +00:00
|
|
|
, pytestCheckHook
|
2020-11-18 16:39:33 +00:00
|
|
|
, isPy27
|
2022-09-06 17:38:23 +00:00
|
|
|
, fetchpatch
|
2020-02-13 12:31:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bayesian-optimization";
|
2020-10-16 05:41:18 +00: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 05:41:18 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "01mg9npiqh1qmq5ldnbpjmr8qkiw827msiv3crpkhbj4bdzasbfm";
|
2020-02-13 12:31:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-05-14 18:46:36 +00:00
|
|
|
scikit-learn
|
2020-02-13 12:31:08 +00:00
|
|
|
scipy
|
|
|
|
];
|
2020-08-25 02:07:09 +00:00
|
|
|
|
2022-09-06 17:38:23 +00:00
|
|
|
patches = [
|
|
|
|
# TypeError with scipy >= 1.8
|
|
|
|
# https://github.com/fmfn/BayesianOptimization/issues/300
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/fmfn/BayesianOptimization/commit/b4e09a25842985a4a0acea0c0f5c8789b7be125e.patch";
|
|
|
|
sha256 = "sha256-PfcifCFd4GRNTA+4+T+6A760QAgyZxhDCTyzNn2crdM=";
|
|
|
|
name = "scipy_18_fix.patch";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-06 17:38:23 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# New sklearn broke one test
|
|
|
|
# https://github.com/fmfn/BayesianOptimization/issues/243
|
|
|
|
"test_suggest_with_one_observation"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "bayes_opt" ];
|
2020-02-13 12:31:08 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-05-29 20:45:48 +00:00
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
2022-09-06 17:38:23 +00:00
|
|
|
description = ''
|
|
|
|
A Python implementation of global optimization with gaussian processes
|
|
|
|
'';
|
2020-02-13 12:31:08 +00:00
|
|
|
homepage = "https://github.com/fmfn/BayesianOptimization";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.juliendehos ];
|
|
|
|
};
|
|
|
|
}
|