diff options
Diffstat (limited to 'pkgs/development/python-modules/botorch/default.nix')
-rw-r--r-- | pkgs/development/python-modules/botorch/default.nix | 74 |
1 files changed, 47 insertions, 27 deletions
diff --git a/pkgs/development/python-modules/botorch/default.nix b/pkgs/development/python-modules/botorch/default.nix index e81609908758..9970378d3741 100644 --- a/pkgs/development/python-modules/botorch/default.nix +++ b/pkgs/development/python-modules/botorch/default.nix @@ -1,39 +1,37 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, gpytorch -, linear-operator -, multipledispatch -, pyro-ppl -, setuptools -, setuptools-scm -, wheel -, torch -, scipy -, pytestCheckHook -, pythonRelaxDepsHook +{ + lib, + stdenv, + buildPythonPackage, + fetchFromGitHub, + gpytorch, + linear-operator, + multipledispatch, + pyro-ppl, + setuptools, + setuptools-scm, + torch, + scipy, + pytestCheckHook, }: buildPythonPackage rec { pname = "botorch"; - version = "0.10.0"; - format = "pyproject"; + version = "0.12.0"; + pyproject = true; src = fetchFromGitHub { owner = "pytorch"; - repo = pname; + repo = "botorch"; rev = "refs/tags/v${version}"; - hash = "sha256-IaFtQWrgOhVHDOiPQ4oG8l+Q0igWamYVWEReGccbVoI="; + hash = "sha256-CKlerCUadObpPq4jQAiFDBOZMHZ4QccAKQz30OFe64E="; }; - nativeBuildInputs = [ - pythonRelaxDepsHook + build-system = [ setuptools setuptools-scm - wheel ]; - propagatedBuildInputs = [ + dependencies = [ gpytorch linear-operator multipledispatch @@ -43,18 +41,40 @@ buildPythonPackage rec { ]; pythonRelaxDeps = [ + "gpytorch" "linear-operator" ]; - checkInputs = [ - pytestCheckHook + nativeCheckInputs = [ pytestCheckHook ]; + + 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" + ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.isAarch64) [ + # Numerical error slightly above threshold + # AssertionError: Tensor-likes are not close! + "test_model_list_gpytorch_model" + ]; + pythonImportsCheck = [ "botorch" ]; - meta = with lib; { + # needs lots of undisturbed CPU time or prone to getting stuck + requiredSystemFeatures = [ "big-parallel" ]; + + meta = { + changelog = "https://github.com/pytorch/botorch/blob/${src.rev}/CHANGELOG.md"; description = "Bayesian Optimization in PyTorch"; homepage = "https://botorch.org"; - license = licenses.mit; - maintainers = with maintainers; [ veprbl ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ veprbl ]; }; } |