28 dm-haiku = buildPythonPackage rec {
33 src = fetchFromGitHub {
37 hash = "sha256-RJpQ9BzlbQ4X31XoJFnsZASiaC9fP2AdyuTAGINhMxs=";
41 # https://github.com/deepmind/dm-haiku/pull/672
43 name = "fix-find-namespace-packages.patch";
44 url = "https://github.com/deepmind/dm-haiku/commit/728031721f77d9aaa260bba0eddd9200d107ba5d.patch";
45 hash = "sha256-qV94TdJnphlnpbq+B0G3KTx5CFGPno+8FvHyu/aZeQE=";
49 build-system = [ setuptools ];
53 jaxlib # implicit runtime dependency
59 optional-dependencies = {
67 pythonImportsCheck = [ "haiku" ];
86 # See https://github.com/deepmind/dm-haiku/issues/366.
93 # This test requires a more recent version of tensorflow. The current one (2.13) is not enough.
94 "test_reshape_convert"
96 # This test requires JAX support for double precision (64bit), but enabling this causes several
97 # other tests to fail.
98 # https://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.html#double-64bit-precision
99 "test_doctest_haiku.experimental"
102 disabledTestPaths = [
103 # Those tests requires a more recent version of tensorflow. The current one (2.13) is not enough.
104 "haiku/_src/integration/jax2tf_test.py"
109 # check in passthru.tests.pytest to escape infinite recursion with bsuite
110 passthru.tests.pytest = dm-haiku.overridePythonAttrs (_: {
111 pname = "${pname}-tests";
114 # We don't have to install because the only purpose
115 # of this passthru test is to, well, test.
116 # This fixes having to set `catchConflicts` to false.
121 description = "Haiku is a simple neural network library for JAX developed by some of the authors of Sonnet";
122 homepage = "https://github.com/deepmind/dm-haiku";
123 license = licenses.asl20;
124 maintainers = with maintainers; [ ndl ];