Commit f84f1c27 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

python3Packages.pytorch-bin.tests: fix the eval

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|
parent 65f98a68
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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";