about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/chex/default.nix
blob: b93d3baddcc4a76a5fd05c9a0588a9f4c2f42024 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ absl-py
, buildPythonPackage
, cloudpickle
, dm-tree
, fetchFromGitHub
, jax
, jaxlib
, lib
, numpy
, pytestCheckHook
, toolz
}:

buildPythonPackage rec {
  pname = "chex";
  version = "0.1.6";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "deepmind";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-VolRlLLgKga9S17ByVrYya9VPtu9yiOnvt/WmlE1DOc=";
  };

  propagatedBuildInputs = [
    absl-py
    cloudpickle
    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 ];
  };
}