at 25.11-pre 2.1 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 gpytorch, 7 linear-operator, 8 multipledispatch, 9 pyre-extensions, 10 pyro-ppl, 11 setuptools, 12 setuptools-scm, 13 torch, 14 scipy, 15 pytestCheckHook, 16 pythonAtLeast, 17}: 18 19buildPythonPackage rec { 20 pname = "botorch"; 21 version = "0.14.0"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "pytorch"; 26 repo = "botorch"; 27 tag = "v${version}"; 28 hash = "sha256-IyRi5kXePnDv2q6SrXLtdltQ1/2/zQ3EBx5phtuX8sE="; 29 }; 30 31 build-system = [ 32 setuptools 33 setuptools-scm 34 ]; 35 36 dependencies = [ 37 gpytorch 38 linear-operator 39 multipledispatch 40 pyre-extensions 41 pyro-ppl 42 scipy 43 torch 44 ]; 45 46 nativeCheckInputs = [ 47 pytestCheckHook 48 ]; 49 50 disabledTests = 51 [ 52 "test_all_cases_covered" 53 54 # Skip tests that take too much time 55 "TestQMultiObjectivePredictiveEntropySearch" 56 "TestQPredictiveEntropySearch" 57 ] 58 ++ lib.optionals (pythonAtLeast "3.13") [ 59 # RuntimeError: Boolean value of Tensor with more than one value is ambiguous 60 "test_optimize_acqf_mixed_binary_only" 61 ] 62 ++ lib.optionals (stdenv.buildPlatform.system == "x86_64-linux") [ 63 # stuck tests on hydra 64 "test_moo_predictive_entropy_search" 65 ] 66 ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ 67 # RuntimeError: required keyword attribute 'value' has the wrong type 68 "test_posterior_in_trace_mode" 69 ] 70 ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ 71 # Numerical error slightly above threshold 72 # AssertionError: Tensor-likes are not close! 73 "test_model_list_gpytorch_model" 74 ]; 75 76 pythonImportsCheck = [ "botorch" ]; 77 78 # needs lots of undisturbed CPU time or prone to getting stuck 79 requiredSystemFeatures = [ "big-parallel" ]; 80 81 meta = { 82 changelog = "https://github.com/pytorch/botorch/blob/${src.tag}/CHANGELOG.md"; 83 description = "Bayesian Optimization in PyTorch"; 84 homepage = "https://botorch.org"; 85 license = lib.licenses.mit; 86 maintainers = with lib.maintainers; [ veprbl ]; 87 }; 88}