2022-07-18 16:21:45 +00:00
|
|
|
{ lib
|
2022-11-21 17:40:18 +00:00
|
|
|
, absl-py
|
2022-07-18 16:21:45 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, dm-tree
|
|
|
|
, docutils
|
2022-11-21 17:40:18 +00:00
|
|
|
, etils
|
|
|
|
, fetchFromGitHub
|
|
|
|
, numpy
|
|
|
|
, pythonOlder
|
|
|
|
, tabulate
|
2022-07-18 16:21:45 +00:00
|
|
|
, tensorflow
|
2022-11-21 17:40:18 +00:00
|
|
|
, tensorflow-datasets
|
|
|
|
, wrapt
|
|
|
|
}:
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dm-sonnet";
|
|
|
|
version = "2.0.0";
|
2022-11-21 17:40:18 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepmind";
|
|
|
|
repo = "sonnet";
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-YSMeH5ZTfP1OdLBepsxXAVczBG/ghSjCWjoz/I+TFl8=";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-07-18 16:21:45 +00:00
|
|
|
dm-tree
|
2022-11-21 17:40:18 +00:00
|
|
|
etils
|
2022-07-18 16:21:45 +00:00
|
|
|
numpy
|
|
|
|
tabulate
|
|
|
|
wrapt
|
2022-11-21 17:40:18 +00:00
|
|
|
] ++ etils.optional-dependencies.epath;
|
2022-07-18 16:21:45 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
tensorflow = [
|
|
|
|
tensorflow
|
|
|
|
];
|
|
|
|
};
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
docutils
|
|
|
|
tensorflow-datasets
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"sonnet"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for building neural networks in TensorFlow";
|
|
|
|
homepage = "https://github.com/deepmind/sonnet";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ onny ];
|
|
|
|
};
|
|
|
|
}
|