about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/orbax-checkpoint/default.nix
blob: 0f9d467335ce2ab65112c9636d23ebf72bf13e3f (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{ lib
, absl-py
, buildPythonPackage
, cached-property
, etils
, fetchPypi
, flit-core
, importlib-resources
, jax
, jaxlib
, msgpack
, nest-asyncio
, numpy
, protobuf
, pytest-xdist
, pytestCheckHook
, pythonOlder
, pyyaml
, tensorstore
, typing-extensions
}:

buildPythonPackage rec {
  pname = "orbax-checkpoint";
  version = "0.5.3";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchPypi {
    pname = "orbax_checkpoint";
    inherit version;
    hash = "sha256-FXKQTLv+hROSfg2A+AtzDg7y9oAzLTwoENhENTKTi0U=";
  };

  nativeBuildInputs = [
    flit-core
  ];

  propagatedBuildInputs = [
    absl-py
    cached-property
    etils
    importlib-resources
    jax
    jaxlib
    msgpack
    nest-asyncio
    numpy
    protobuf
    pyyaml
    tensorstore
    typing-extensions
  ];

  nativeCheckInputs = [
    pytest-xdist
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "orbax"
  ];

  disabledTestPaths = [
    # Circular dependency flax
    "orbax/checkpoint/transform_utils_test.py"
    "orbax/checkpoint/utils_test.py"
  ];

  meta = with lib; {
    description = "Orbax provides common utility libraries for JAX users";
    homepage = "https://github.com/google/orbax/tree/main/checkpoint";
    changelog = "https://github.com/google/orbax/blob/${version}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [fab ];
  };
}