2022-04-15 01:41:22 +00:00
|
|
|
{ config, lib, buildPythonPackage, fetchFromGitHub, isPy3k
|
2021-02-05 17:12:51 +00:00
|
|
|
, filelock, protobuf, numpy, pytestCheckHook, mock, typing-extensions
|
2022-04-15 01:41:22 +00:00
|
|
|
, cupy, cudaSupport ? config.cudaSupport or false
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "chainer";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "7.8.1.post1";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = !isPy3k; # python2.7 abandoned upstream
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chainer";
|
|
|
|
repo = "chainer";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-epwnExmyCWmwaOz+mJnAl1peEeHLBdQGC62BlLfSTQQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
filelock
|
|
|
|
protobuf
|
|
|
|
numpy
|
|
|
|
typing-extensions
|
|
|
|
] ++ lib.optionals cudaSupport [ cupy ];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
mock
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pytestFlagsArray = [ "tests/chainer_tests/utils_tests" ];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
preCheck = ''
|
|
|
|
# cf. https://github.com/chainer/chainer/issues/8621
|
|
|
|
export CHAINER_WARN_VERSION_MISMATCH=0
|
|
|
|
|
|
|
|
# ignore pytest warnings not listed
|
|
|
|
rm setup.cfg
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
"gpu"
|
|
|
|
"cupy"
|
|
|
|
"ideep"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A flexible framework of neural networks for deep learning";
|
|
|
|
homepage = "https://chainer.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hyphon81 ];
|
|
|
|
};
|
|
|
|
}
|