2023-02-09 11:40:11 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, numpy
|
2022-06-16 17:23:12 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tensorly";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "0.8.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2023-02-09 11:40:11 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-6iZvUgsoYf8fDGEuAODgfr4jCkiJwaJXlQUAsaOF9JU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"tensorly"
|
2023-02-09 11:40:11 +00:00
|
|
|
"tensorly.base"
|
|
|
|
"tensorly.cp_tensor"
|
|
|
|
"tensorly.tucker_tensor"
|
|
|
|
"tensorly.tt_tensor"
|
|
|
|
"tensorly.tt_matrix"
|
|
|
|
"tensorly.parafac2_tensor"
|
|
|
|
"tensorly.tenalg"
|
|
|
|
"tensorly.decomposition"
|
|
|
|
"tensorly.regression"
|
|
|
|
"tensorly.metrics"
|
|
|
|
"tensorly.random"
|
|
|
|
"tensorly.datasets"
|
|
|
|
"tensorly.plugins"
|
|
|
|
"tensorly.contrib"
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tensorly"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabledTests = [
|
2023-02-09 11:40:11 +00:00
|
|
|
# tries to download data:
|
|
|
|
"test_kinetic"
|
2022-06-16 17:23:12 +00:00
|
|
|
# AssertionError: Partial_SVD took too long, maybe full_matrices set wrongly
|
|
|
|
"test_svd_time"
|
|
|
|
];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Tensor learning in Python";
|
|
|
|
homepage = "https://tensorly.org/";
|
|
|
|
license = licenses.bsd3;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
2023-02-09 11:40:11 +00:00
|
|
|
broken = stdenv.isLinux && stdenv.isAarch64; # test failures: test_TTOI and test_validate_tucker_rank
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|