2021-09-22 15:38:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, chainer
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, jupyter
|
2021-12-19 01:06:50 +00:00
|
|
|
, keras
|
2022-06-16 17:23:12 +00:00
|
|
|
#, mxnet
|
|
|
|
, nbconvert
|
|
|
|
, nbformat
|
|
|
|
, nose
|
|
|
|
, numpy
|
|
|
|
, parameterized
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-09-22 15:38:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "einops";
|
2022-04-03 18:54:34 +00:00
|
|
|
version = "0.4.1";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arogozhnikov";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-04-03 18:54:34 +00:00
|
|
|
hash = "sha256-n4R4lcRimuOncisCTs2zJWPlqZ+W2yPkvkWAnx4R91s=";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
chainer
|
|
|
|
jupyter
|
|
|
|
keras
|
|
|
|
# mxnet (has issues with some CPUs, segfault)
|
|
|
|
nbconvert
|
|
|
|
nbformat
|
2021-09-22 15:38:15 +00:00
|
|
|
nose
|
|
|
|
numpy
|
2022-04-03 18:54:34 +00:00
|
|
|
parameterized
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestCheckHook
|
2021-09-22 15:38:15 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# No CUDA in sandbox
|
|
|
|
EINOPS_SKIP_CUPY = 1;
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
|
|
|
'';
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"einops"
|
|
|
|
];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests are failing as mxnet is not pulled-in
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/174872
|
|
|
|
"test_all_notebooks"
|
|
|
|
"test_dl_notebook_with_all_backends"
|
|
|
|
"test_backends_installed"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_layers.py"
|
|
|
|
];
|
2021-09-22 15:38:15 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
meta = with lib; {
|
2021-09-22 15:38:15 +00:00
|
|
|
description = "Flexible and powerful tensor operations for readable and reliable code";
|
|
|
|
homepage = "https://github.com/arogozhnikov/einops";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ yl3dy ];
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
}
|
2022-06-16 17:23:12 +00:00
|
|
|
|