From f84f1c2744a004fa1c3c7f6ea98327495cd52a18 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 23 Jul 2024 22:10:35 +0100 Subject: [PATCH] python3Packages.pytorch-bin.tests: fix the eval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without the change the eval fails as: $ nix-instantiate -A python3Packages.pytorch-bin.tests error: … while calling a functor (an attribute set with a '__functor' attribute) at lib/customisation.nix:264:13: 263| in if missingArgs == {} 264| then makeOverridable f allArgs | ^ 265| # This needs to be an abort so it can't be caught with `builtins.tryEval`, … while evaluating a branch condition at lib/customisation.nix:148:7: 147| in 148| if isAttrs result then | ^ 149| result // { (stack trace truncated; use '--show-trace' to show the full, detailed trace) error: function 'anonymous lambda' called with unexpected argument 'torchWithCuda' at pkgs/development/python-modules/torch/tests.nix:1:1: 1| { callPackage }: | ^ 2| --- pkgs/development/python-modules/torch/bin.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/torch/bin.nix b/pkgs/development/python-modules/torch/bin.nix index ec6843deac98..b2d627381c8b 100644 --- a/pkgs/development/python-modules/torch/bin.nix +++ b/pkgs/development/python-modules/torch/bin.nix @@ -121,10 +121,7 @@ buildPythonPackage { pythonImportsCheck = [ "torch" ]; - passthru.tests = callPackage ./tests.nix { - torchWithCuda = torch-bin; - torchWithRocm = torch-bin; - }; + passthru.tests = callPackage ./tests.nix {}; meta = { description = "PyTorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration";