Files
nixpkgs/pkgs/development/python-modules/gpytorch/default.nix
Ihar Hrachyshka dabcce9f72 treewide: remove obsolete x86_64-darwin code
26.11 no longer supports x86_64-darwin. Hence:

- simplify: darwin && aarch64 -> darwin
- remove: darwin && x86_64

Assisted-by: Codex, GPT-6.1-Sol medium
2026-10-26 20:13:33 -04:00

78 lines
1.7 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
setuptools-scm,
# dependencies
linear-operator,
mpmath,
scikit-learn,
scipy,
torch,
# tests
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "gpytorch";
version = "1.15.2";
pyproject = true;
src = fetchFromGitHub {
owner = "cornellius-gp";
repo = "gpytorch";
tag = "v${finalAttrs.version}";
hash = "sha256-1CavS+qrV8YqnsT87GjmJV2LOtvExFYQE5YpYZEw9ts=";
};
pythonRelaxDeps = [ "mpmath" ];
build-system = [
setuptools
setuptools-scm
];
dependencies = [
linear-operator
mpmath
scikit-learn
scipy
torch
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "gpytorch" ];
disabledTests = [
# AssertionError on number of warnings emitted
"test_deprecated_methods"
# flaky numerical tests
"test_classification_error"
"test_matmul_matrix_broadcast"
"test_optimization_optimal_error"
# https://github.com/cornellius-gp/gpytorch/issues/2396
"test_t_matmul_matrix"
]
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
# RuntimeError: Failed to initialize cpuinfo!
"test_dtype_value_context"
"test_half"
];
meta = {
description = "Highly efficient and modular implementation of Gaussian Processes, with GPU acceleration";
homepage = "https://gpytorch.ai";
downloadPage = "https://github.com/cornellius-gp/gpytorch";
changelog = "https://github.com/cornellius-gp/gpytorch/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ veprbl ];
};
})