nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 63 lines 1.1 kB view raw
1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, numpy 5, nose 6, nbformat 7, nbconvert 8, jupyter 9, chainer 10, parameterized 11, pytorch 12, mxnet 13, tensorflow 14, keras 15}: 16 17buildPythonPackage rec { 18 pname = "einops"; 19 version = "0.4.1"; 20 21 src = fetchFromGitHub { 22 owner = "arogozhnikov"; 23 repo = pname; 24 rev = "v${version}"; 25 hash = "sha256-n4R4lcRimuOncisCTs2zJWPlqZ+W2yPkvkWAnx4R91s="; 26 }; 27 28 checkInputs = [ 29 nose 30 numpy 31 # For notebook tests 32 nbformat 33 nbconvert 34 jupyter 35 # For backend tests 36 chainer 37 parameterized 38 pytorch 39 mxnet 40 tensorflow 41 keras 42 ]; 43 44 # No CUDA in sandbox 45 EINOPS_SKIP_CUPY = 1; 46 47 checkPhase = '' 48 export HOME=$TMPDIR 49 50 # Prevent hangs on PyTorch-related tests, see 51 # https://discuss.pytorch.org/t/pytorch-cpu-hangs-on-nn-linear/17748/4 52 export OMP_NUM_THREADS=1 53 54 nosetests -v -w tests 55 ''; 56 57 meta = { 58 description = "Flexible and powerful tensor operations for readable and reliable code"; 59 homepage = "https://github.com/arogozhnikov/einops"; 60 license = lib.licenses.mit; 61 maintainers = with lib.maintainers; [ yl3dy ]; 62 }; 63}