From 74c997d02504556f0a3b752f4783af1d78cd7d69 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 4 Oct 2020 10:25:50 -0700 Subject: [PATCH] python3Packages.tensorly: disable resource intensive tests --- pkgs/development/python-modules/tensorly/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/tensorly/default.nix b/pkgs/development/python-modules/tensorly/default.nix index 94acabe78d2d..54f32d182c0c 100644 --- a/pkgs/development/python-modules/tensorly/default.nix +++ b/pkgs/development/python-modules/tensorly/default.nix @@ -22,7 +22,9 @@ buildPythonPackage rec { sha256 = "1ml91yaxwx4msisxbm92yf22qfrscvk58f3z2r1jhi96pw2k4i7x"; }; - propagatedBuildInputs = [ numpy scipy sparse ]; + propagatedBuildInputs = [ numpy scipy sparse ] + ++ lib.optionals (!doCheck) [ nose ]; # upstream added nose to install_requires + checkInputs = [ pytest nose pytorch ]; # also has a cupy backend, but the tests are currently broken # (e.g. attempts to access cupy.qr instead of cupy.linalg.qr) @@ -30,12 +32,16 @@ buildPythonPackage rec { # as well as tensorflow and mxnet backends, but the tests don't # seem to exercise these backend by default + # uses >= 140GB of ram to test + doCheck = false; checkPhase = '' runHook preCheck nosetests -e "test_cupy" runHook postCheck ''; + pythonImportsCheck = [ "tensorly" ]; + meta = with lib; { description = "Tensor learning in Python"; homepage = "https://tensorly.org/";