2022-01-03 16:56:52 +00:00
|
|
|
{ absl-py
|
|
|
|
, buildPythonPackage
|
2023-03-30 22:05:00 +00:00
|
|
|
, cloudpickle
|
2022-01-03 16:56:52 +00:00
|
|
|
, dm-tree
|
|
|
|
, fetchFromGitHub
|
|
|
|
, jax
|
|
|
|
, jaxlib
|
|
|
|
, lib
|
|
|
|
, numpy
|
|
|
|
, pytestCheckHook
|
|
|
|
, toolz
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "chex";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.1.6";
|
2022-01-03 16:56:52 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepmind";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-VolRlLLgKga9S17ByVrYya9VPtu9yiOnvt/WmlE1DOc=";
|
2022-01-03 16:56:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
absl-py
|
2023-03-30 22:05:00 +00:00
|
|
|
cloudpickle
|
2022-01-03 16:56:52 +00:00
|
|
|
dm-tree
|
|
|
|
jax
|
|
|
|
numpy
|
|
|
|
toolz
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"chex"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-03 16:56:52 +00:00
|
|
|
jaxlib
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# See https://github.com/deepmind/chex/issues/204.
|
|
|
|
"test_uninspected_checks"
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
# These tests started failing at some point after upgrading to 0.1.5
|
|
|
|
"test_useful_failure"
|
|
|
|
"TreeAssertionsTest"
|
|
|
|
"PmapFakeTest"
|
|
|
|
"WithDeviceTest"
|
2022-10-30 15:09:59 +00:00
|
|
|
];
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Chex is a library of utilities for helping to write reliable JAX code.";
|
|
|
|
homepage = "https://github.com/deepmind/chex";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ndl ];
|
|
|
|
};
|
|
|
|
}
|