depot/third_party/nixpkgs/pkgs/development/python-modules/chex/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

59 lines
1.1 KiB
Nix

{ absl-py
, buildPythonPackage
, dm-tree
, fetchFromGitHub
, jax
, jaxlib
, lib
, numpy
, pytestCheckHook
, toolz
}:
buildPythonPackage rec {
pname = "chex";
version = "0.1.5";
format = "setuptools";
src = fetchFromGitHub {
owner = "deepmind";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-FYB0IhokM74HBY2wOJYE6xJrHxHHWhDSAZpWFs6HFu0=";
};
propagatedBuildInputs = [
absl-py
dm-tree
jax
numpy
toolz
];
pythonImportsCheck = [
"chex"
];
nativeCheckInputs = [
jaxlib
pytestCheckHook
];
disabledTests = [
# See https://github.com/deepmind/chex/issues/204.
"test_uninspected_checks"
# These tests started failing at some point after upgrading to 0.1.5
"test_useful_failure"
"TreeAssertionsTest"
"PmapFakeTest"
"WithDeviceTest"
];
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 ];
};
}