0d9fc34957
GitOrigin-RevId: 5ed481943351e9fd354aeb557679624224de38d5
54 lines
1,008 B
Nix
54 lines
1,008 B
Nix
{ buildPythonPackage
|
|
, fetchFromGitHub
|
|
, callPackage
|
|
, lib
|
|
, jmp
|
|
, tabulate
|
|
, jaxlib
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "dm-haiku";
|
|
version = "0.0.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "deepmind";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-d5THbfMRrbBL/2sQ99l2yeaTI9gT+bSkcxmVdRJT5bA=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"testsout"
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
jaxlib
|
|
jmp
|
|
tabulate
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"haiku"
|
|
];
|
|
|
|
postInstall = ''
|
|
mkdir $testsout
|
|
cp -R examples $testsout/examples
|
|
'';
|
|
|
|
# check in passthru.tests.pytest to escape infinite recursion with bsuite
|
|
doCheck = false;
|
|
|
|
passthru.tests = {
|
|
pytest = callPackage ./tests.nix { };
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Haiku is a simple neural network library for JAX developed by some of the authors of Sonnet.";
|
|
homepage = "https://github.com/deepmind/dm-haiku";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ ndl ];
|
|
};
|
|
}
|