1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 jaxtyping,
6 linear-operator,
7 mpmath,
8 scikit-learn,
9 scipy,
10 setuptools,
11 setuptools-scm,
12 torch,
13 pytestCheckHook,
14}:
15
16buildPythonPackage rec {
17 pname = "gpytorch";
18 version = "1.14";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "cornellius-gp";
23 repo = "gpytorch";
24 tag = "v${version}";
25 hash = "sha256-whZjqAs3nyjKMzAGi+OnyBtboq0UuV8m11A4IzkWtec=";
26 };
27
28 build-system = [
29 setuptools
30 setuptools-scm
31 ];
32
33 pythonRelaxDeps = [ "jaxtyping" ];
34
35 dependencies = [
36 jaxtyping
37 linear-operator
38 mpmath
39 scikit-learn
40 scipy
41 torch
42 ];
43
44 nativeCheckInputs = [ pytestCheckHook ];
45
46 pythonImportsCheck = [ "gpytorch" ];
47
48 disabledTests = [
49 # AssertionError on number of warnings emitted
50 "test_deprecated_methods"
51 # flaky numerical tests
52 "test_classification_error"
53 "test_matmul_matrix_broadcast"
54 "test_optimization_optimal_error"
55 # https://github.com/cornellius-gp/gpytorch/issues/2396
56 "test_t_matmul_matrix"
57 ];
58
59 meta = with lib; {
60 description = "Highly efficient and modular implementation of Gaussian Processes, with GPU acceleration";
61 homepage = "https://gpytorch.ai";
62 license = licenses.mit;
63 maintainers = with maintainers; [ veprbl ];
64 };
65}