at master 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 numpy, 6 pytestCheckHook, 7 pythonOlder, 8 scipy, 9 setuptools, 10}: 11 12buildPythonPackage rec { 13 pname = "tensorly"; 14 version = "0.9.0"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "tensorly"; 21 repo = "tensorly"; 22 tag = version; 23 hash = "sha256-A6Zlp8fa7XFgf4qpg7SEtNLlYSNtDGLuRUEfzD+crQc="; 24 }; 25 26 build-system = [ setuptools ]; 27 28 dependencies = [ 29 numpy 30 scipy 31 ]; 32 33 nativeCheckInputs = [ pytestCheckHook ]; 34 35 pythonImportsCheck = [ 36 "tensorly" 37 "tensorly.base" 38 "tensorly.cp_tensor" 39 "tensorly.tucker_tensor" 40 "tensorly.tt_tensor" 41 "tensorly.tt_matrix" 42 "tensorly.parafac2_tensor" 43 "tensorly.tenalg" 44 "tensorly.decomposition" 45 "tensorly.regression" 46 "tensorly.solvers" 47 "tensorly.metrics" 48 "tensorly.random" 49 "tensorly.datasets" 50 "tensorly.plugins" 51 "tensorly.contrib" 52 ]; 53 54 enabledTestPaths = [ "tensorly" ]; 55 56 disabledTests = [ 57 # this can fail on hydra and other peoples machines, check with others before re-enabling 58 # AssertionError: Partial_SVD took too long, maybe full_matrices set wrongly 59 "test_svd_time" 60 ]; 61 62 meta = with lib; { 63 description = "Tensor learning in Python"; 64 homepage = "https://tensorly.org/"; 65 changelog = "https://github.com/tensorly/tensorly/releases/tag/${version}"; 66 license = licenses.bsd3; 67 maintainers = with maintainers; [ bcdarwin ]; 68 }; 69}