2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-05-20 23:08:51 +00:00
|
|
|
, scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
2022-09-09 14:08:57 +00:00
|
|
|
, pytestCheckHook
|
2020-11-21 19:51:51 +00:00
|
|
|
, isPy27
|
2022-09-09 14:08:57 +00:00
|
|
|
, fetchpatch
|
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
|
|
|
|
2022-09-09 14:08:57 +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";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-PfcifCFd4GRNTA+4+T+6A760QAgyZxhDCTyzNn2crdM=";
|
2022-09-09 14:08:57 +00:00
|
|
|
name = "scipy_18_fix.patch";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# New sklearn broke one test
|
|
|
|
# https://github.com/fmfn/BayesianOptimization/issues/243
|
|
|
|
"test_suggest_with_one_observation"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "bayes_opt" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
2022-09-09 14:08:57 +00:00
|
|
|
description = ''
|
|
|
|
A Python implementation of global optimization with gaussian processes
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/fmfn/BayesianOptimization";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.juliendehos ];
|
|
|
|
};
|
|
|
|
}
|