1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 linear-operator,
6 scikit-learn,
7 setuptools,
8 setuptools-scm,
9 wheel,
10 torch,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "gpytorch";
16 version = "1.11";
17 format = "pyproject";
18
19 src = fetchFromGitHub {
20 owner = "cornellius-gp";
21 repo = pname;
22 rev = "v${version}";
23 hash = "sha256-cpkfjx5G/4duL1Rr4nkHTHi03TDcYbcx3bKP2Ny7Ijo=";
24 };
25
26 nativeBuildInputs = [
27 setuptools
28 setuptools-scm
29 wheel
30 ];
31
32 propagatedBuildInputs = [
33 linear-operator
34 scikit-learn
35 torch
36 ];
37
38 checkInputs = [ pytestCheckHook ];
39
40 pythonImportsCheck = [ "gpytorch" ];
41
42 disabledTests = [
43 # AssertionError on number of warnings emitted
44 "test_deprecated_methods"
45 # flaky numerical tests
46 "test_classification_error"
47 "test_matmul_matrix_broadcast"
48 # https://github.com/cornellius-gp/gpytorch/issues/2396
49 "test_t_matmul_matrix"
50 ];
51
52 meta = with lib; {
53 description = "A highly efficient and modular implementation of Gaussian Processes, with GPU acceleration";
54 homepage = "https://gpytorch.ai";
55 license = licenses.mit;
56 maintainers = with maintainers; [ veprbl ];
57 };
58}