Skip to content

python3Packages.pytorch-bin.tests: fix the eval#329511

Merged
SomeoneSerge merged 1 commit intoNixOS:masterfrom
trofi:python3Packages.pytorch-bin.tests-fix-eval
Jul 23, 2024
Merged

python3Packages.pytorch-bin.tests: fix the eval#329511
SomeoneSerge merged 1 commit intoNixOS:masterfrom
trofi:python3Packages.pytorch-bin.tests-fix-eval

Conversation

@trofi
Copy link
Contributor

@trofi trofi commented Jul 23, 2024

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|

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

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|
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jul 23, 2024
@SomeoneSerge SomeoneSerge merged commit 8cdf7e7 into NixOS:master Jul 23, 2024
@trofi trofi deleted the python3Packages.pytorch-bin.tests-fix-eval branch July 23, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants