2022-01-07 04:07:37 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, chex
|
|
|
|
, cloudpickle
|
|
|
|
, dill
|
|
|
|
, dm-tree
|
|
|
|
, fetchFromGitHub
|
2022-02-10 20:34:41 +00:00
|
|
|
, jaxlib
|
2022-01-07 04:07:37 +00:00
|
|
|
, jmp
|
|
|
|
, lib
|
2022-04-03 18:54:34 +00:00
|
|
|
, pytest-xdist
|
2022-01-07 04:07:37 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, tabulate
|
|
|
|
, tensorflow
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dm-haiku";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "0.0.6";
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepmind";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-04-15 01:41:22 +00:00
|
|
|
hash = "sha256-qvKMeGPiWXvvyV+GZdTWdsC6Wp08AmP8nDtWk7sZtqM=";
|
2022-01-07 04:07:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jmp
|
|
|
|
tabulate
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
chex
|
|
|
|
cloudpickle
|
2022-04-15 01:41:22 +00:00
|
|
|
dill
|
2022-01-07 04:07:37 +00:00
|
|
|
dm-tree
|
2022-02-10 20:34:41 +00:00
|
|
|
jaxlib
|
2022-04-03 18:54:34 +00:00
|
|
|
pytest-xdist
|
2022-01-07 04:07:37 +00:00
|
|
|
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"
|
2022-04-27 09:35:20 +00:00
|
|
|
# `TypeError: lax.conv_general_dilated requires arguments to have the same dtypes, got float32, float16`.
|
|
|
|
"haiku/_src/integration/numpy_inputs_test.py"
|
2022-01-07 04:07:37 +00:00
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
disabledTests = [
|
|
|
|
# See https://github.com/deepmind/dm-haiku/issues/366.
|
|
|
|
"test_jit_Recurrent"
|
|
|
|
];
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|