From ba5d38a69c6133e46917d3e9bb1777c7de3e1e0e Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 24 Feb 2026 23:40:29 +0000 Subject: [PATCH 1/3] python3Packages.gpytorch: fix build --- .../python-modules/gpytorch/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/gpytorch/default.nix b/pkgs/development/python-modules/gpytorch/default.nix index 1e2eb55fe82b..41df6ade307c 100644 --- a/pkgs/development/python-modules/gpytorch/default.nix +++ b/pkgs/development/python-modules/gpytorch/default.nix @@ -20,7 +20,7 @@ pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "gpytorch"; version = "1.15.1"; pyproject = true; @@ -28,10 +28,18 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "cornellius-gp"; repo = "gpytorch"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-ftiAY02K0EwVQZufk8xR+/21A+2ONWchuWPF3a5lRW0="; }; + # AttributeError: module 'numpy' has no attribute 'trapz' + postPatch = '' + substituteInPlace gpytorch/kernels/spectral_mixture_kernel.py \ + --replace-fail \ + "np.trapz(emp_spect, freq)" \ + "np.trapezoid(emp_spect, freq)" + ''; + build-system = [ setuptools setuptools-scm @@ -73,8 +81,8 @@ buildPythonPackage rec { 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/${src.tag}"; + changelog = "https://github.com/cornellius-gp/gpytorch/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ veprbl ]; }; -} +}) From 14abf167cb91e7fc33b89c8665feec26eaee08a0 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 25 Feb 2026 14:38:05 +0000 Subject: [PATCH 2/3] python3Packages.botorch: 0.16.1 -> 0.17.0 Diff: https://github.com/meta-pytorch/botorch/compare/v0.16.1...v0.17.0 Changelog: https://github.com/meta-pytorch/botorch/blob/v0.17.0/CHANGELOG.md --- pkgs/development/python-modules/botorch/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/botorch/default.nix b/pkgs/development/python-modules/botorch/default.nix index 71f90ae67c07..fb297754b330 100644 --- a/pkgs/development/python-modules/botorch/default.nix +++ b/pkgs/development/python-modules/botorch/default.nix @@ -27,16 +27,16 @@ pythonAtLeast, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "botorch"; - version = "0.16.1"; + version = "0.17.0"; pyproject = true; src = fetchFromGitHub { owner = "meta-pytorch"; repo = "botorch"; - tag = "v${version}"; - hash = "sha256-8tmNw1Qa3lXxvndljRijGNN5RMjsYlT8zFFau23yp1U="; + tag = "v${finalAttrs.version}"; + hash = "sha256-NDdXsmVdrTEXMXXVf89EkGXVOYnEcXwtzarB5niTNaw="; }; build-system = [ @@ -102,10 +102,10 @@ buildPythonPackage rec { requiredSystemFeatures = [ "big-parallel" ]; meta = { - changelog = "https://github.com/meta-pytorch/botorch/blob/${src.tag}/CHANGELOG.md"; + changelog = "https://github.com/meta-pytorch/botorch/blob/${finalAttrs.src.tag}/CHANGELOG.md"; description = "Bayesian Optimization in PyTorch"; homepage = "https://botorch.org"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ veprbl ]; }; -} +}) From 21d3a88769ddee6ff284b5e7904f28f38c974399 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 25 Feb 2026 16:10:53 +0000 Subject: [PATCH 3/3] python3Packages.syne-tune: cleanup, fix --- .../python-modules/syne-tune/default.nix | 32 ++++++------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/pkgs/development/python-modules/syne-tune/default.nix b/pkgs/development/python-modules/syne-tune/default.nix index c5cbaf7fc275..21645320fe63 100644 --- a/pkgs/development/python-modules/syne-tune/default.nix +++ b/pkgs/development/python-modules/syne-tune/default.nix @@ -36,7 +36,7 @@ ray, writableTmpDirAsHomeHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "syne-tune"; version = "0.15.0"; pyproject = true; @@ -44,17 +44,10 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "syne-tune"; repo = "syne-tune"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-UNBpfC+aLXhkbyvCG2K00yedJnpYpfldqisZ/wDPtuA="; }; - postPatch = '' - substituteInPlace syne_tune/optimizer/schedulers/synchronous/hyperband.py \ - --replace-fail 'metric_val=np.NAN' 'metric_val=np.nan' - substituteInPlace syne_tune/optimizer/schedulers/synchronous/dehb.py \ - --replace-fail 'result_failed.metric_val = np.NAN' 'result_failed.metric_val = np.nan' - ''; - build-system = [ setuptools ]; @@ -108,12 +101,12 @@ buildPythonPackage rec { writableTmpDirAsHomeHook ] ++ ray.optional-dependencies.tune - ++ optional-dependencies.blackbox-repository - ++ optional-dependencies.bore - ++ optional-dependencies.botorch - ++ optional-dependencies.gpsearchers - ++ optional-dependencies.kde - ++ optional-dependencies.sklearn; + ++ finalAttrs.passthru.optional-dependencies.blackbox-repository + ++ finalAttrs.passthru.optional-dependencies.bore + ++ finalAttrs.passthru.optional-dependencies.botorch + ++ finalAttrs.passthru.optional-dependencies.gpsearchers + ++ finalAttrs.passthru.optional-dependencies.kde + ++ finalAttrs.passthru.optional-dependencies.sklearn; disabledTests = [ # NameError: name 'HV' is not defined @@ -129,11 +122,6 @@ buildPythonPackage rec { "test_cholesky_factorization" ]; - disabledTestPaths = [ - # legacy test - "tst/schedulers/test_legacy_schedulers_api.py" - ]; - pythonImportsCheck = [ "syne_tune" ]; @@ -141,8 +129,8 @@ buildPythonPackage rec { meta = { description = "Large scale asynchronous hyperparameter and architecture optimization library"; homepage = "https://github.com/syne-tune/syne-tune"; - changelog = "https://github.com/syne-tune/syne-tune/releases/tag/${src.tag}"; + changelog = "https://github.com/syne-tune/syne-tune/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ daspk04 ]; }; -} +})