Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 linear-operator, 7 scikit-learn, 8 setuptools, 9 setuptools-scm, 10 wheel, 11 torch, 12 pytestCheckHook, 13}: 14 15buildPythonPackage rec { 16 pname = "gpytorch"; 17 version = "1.12"; 18 format = "pyproject"; 19 20 src = fetchFromGitHub { 21 owner = "cornellius-gp"; 22 repo = pname; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-8W0QSiXl+C86m5yaI9KfGN92uA2VGjGwQt6DI/1NaQE="; 25 }; 26 27 patches = [ 28 (fetchpatch { 29 # https://github.com/cornellius-gp/gpytorch/pull/2545 30 name = "scipy-1.14-compatibility.patch"; 31 url = "https://github.com/cornellius-gp/gpytorch/commit/2562be472521b8aec366de2619e3130a96fab982.patch"; 32 excludes = [ "setup.py" ]; 33 hash = "sha256-znOFpN6go2iIxP24VjJLKF3Laxcr4xV/IyP2y36g4QY="; 34 }) 35 ]; 36 37 nativeBuildInputs = [ 38 setuptools 39 setuptools-scm 40 wheel 41 ]; 42 43 propagatedBuildInputs = [ 44 linear-operator 45 scikit-learn 46 torch 47 ]; 48 49 checkInputs = [ pytestCheckHook ]; 50 51 pythonImportsCheck = [ "gpytorch" ]; 52 53 disabledTests = [ 54 # AssertionError on number of warnings emitted 55 "test_deprecated_methods" 56 # flaky numerical tests 57 "test_classification_error" 58 "test_matmul_matrix_broadcast" 59 # https://github.com/cornellius-gp/gpytorch/issues/2396 60 "test_t_matmul_matrix" 61 ]; 62 63 meta = with lib; { 64 description = "Highly efficient and modular implementation of Gaussian Processes, with GPU acceleration"; 65 homepage = "https://gpytorch.ai"; 66 license = licenses.mit; 67 maintainers = with maintainers; [ veprbl ]; 68 }; 69}