Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions pkgs/development/python-modules/dm-haiku/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{ buildPythonPackage
, chex
, cloudpickle
, dill
, dm-tree
, fetchFromGitHub
, jmp
, lib
, pytestCheckHook
, tabulate
, tensorflow
}:

buildPythonPackage rec {
pname = "dm-haiku";
version = "0.0.5";

src = fetchFromGitHub {
owner = "deepmind";
repo = pname;
rev = "v${version}";
sha256 = "1mdqjcka0m1div63ngba8w8z94id4c1h8xqmnq1xpmgkc79224wa";
};

propagatedBuildInputs = [
jmp
tabulate
];

checkInputs = [
chex
cloudpickle
dm-tree
pytestCheckHook
tensorflow
];

pythonImportsCheck = [
"haiku"
];

disabledTestPaths = [
# These tests require `bsuite` which isn't packaged in `nixpkgs`.
"examples/impala_lite_test.py"
"examples/impala/actor_test.py"
"examples/impala/learner_test.py"
# This test breaks on multiple cases with TF-related errors,
# likely that's the reason the upstream uses TF-nightly for tests?
# `nixpkgs` doesn't have the corresponding TF version packaged.
"haiku/_src/integration/jax2tf_test.py"
];

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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2325,6 +2325,8 @@ in {

dmenu-python = callPackage ../development/python-modules/dmenu { };

dm-haiku = callPackage ../development/python-modules/dm-haiku { };

dm-sonnet = callPackage ../development/python-modules/dm-sonnet { };

dm-tree = callPackage ../development/python-modules/dm-tree { };
Expand Down