2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-09-19 14:19:46 +00:00
|
|
|
stdenv,
|
2024-06-05 15:53:02 +00:00
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gpytorch,
|
|
|
|
linear-operator,
|
|
|
|
multipledispatch,
|
|
|
|
pyro-ppl,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
torch,
|
|
|
|
scipy,
|
|
|
|
pytestCheckHook,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "botorch";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.11.3";
|
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytorch";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "botorch";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-AtRU5KC8KlkxMCU0OUAHDFK7BsPO3TbRmmzDGV7+yVk=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [
|
2023-08-10 07:59:29 +00:00
|
|
|
setuptools
|
2023-05-24 13:37:59 +00:00
|
|
|
setuptools-scm
|
|
|
|
];
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
dependencies = [
|
2023-05-24 13:37:59 +00:00
|
|
|
gpytorch
|
2024-01-13 08:15:51 +00:00
|
|
|
linear-operator
|
2023-05-24 13:37:59 +00:00
|
|
|
multipledispatch
|
|
|
|
pyro-ppl
|
|
|
|
scipy
|
|
|
|
torch
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"gpytorch"
|
|
|
|
"linear-operator"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# tests tend to get stuck on busy hosts, increase verbosity to find out
|
|
|
|
# which specific tests get stuck
|
|
|
|
"-vvv"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests =
|
|
|
|
[ "test_all_cases_covered" ]
|
|
|
|
++ lib.optionals (stdenv.buildPlatform.system == "x86_64-linux") [
|
|
|
|
# stuck tests on hydra
|
|
|
|
"test_moo_predictive_entropy_search"
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonImportsCheck = [ "botorch" ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
# needs lots of undisturbed CPU time or prone to getting stuck
|
|
|
|
requiredSystemFeatures = [ "big-parallel" ];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
meta = with lib; {
|
2024-09-19 14:19:46 +00:00
|
|
|
changelog = "https://github.com/pytorch/botorch/blob/${src.rev}/CHANGELOG.md";
|
2023-05-24 13:37:59 +00:00
|
|
|
description = "Bayesian Optimization in PyTorch";
|
|
|
|
homepage = "https://botorch.org";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|