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
|
{ buildPythonPackage
, fetchFromGitHub
, keras
, lib
, matplotlib
, msgpack
, numpy
, optax
, pytestCheckHook
, tensorflow
}:
buildPythonPackage rec {
pname = "flax";
version = "0.3.6";
src = fetchFromGitHub {
owner = "google";
repo = pname;
rev = "v${version}";
sha256 = "0zvq0vl88hiwmss49bnm7gdmndr1dfza2bcs1fj88a9r7w9dmlsr";
};
propagatedBuildInputs = [
matplotlib
msgpack
numpy
optax
];
pythonImportsCheck = [
"flax"
];
checkInputs = [
keras
pytestCheckHook
tensorflow
];
disabledTestPaths = [
# Docs test, needs extra deps + we're not interested in it.
"docs/_ext/codediff_test.py"
# The tests in `examples` are not designed to be executed from a single test
# session and thus either have the modules that conflict with each other or
# wrong import paths, depending on how they're invoked. Many tests also have
# dependencies that are not packaged in `nixpkgs` (`clu`, `jgraph`,
# `tensorflow_datasets`, `vocabulary`) so the benefits of trying to run them
# would be limited anyway.
"examples/*"
];
meta = with lib; {
description = "Neural network library for JAX";
homepage = "https://github.com/google/flax";
license = licenses.asl20;
maintainers = with maintainers; [ ndl ];
};
}
|