about summary refs log tree commit diff
path: root/pkgs/development/python-modules/trfl/default.nix
blob: 8538b47598edeb93afb96dc0068329a166fcd9db (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
{ lib
, fetchFromGitHub
, buildPythonPackage
, numpy
, absl-py
, dm-tree
, wrapt
, tensorflow
, tensorflow-probability
, pytestCheckHook
, nose }:

buildPythonPackage rec {
  pname = "trfl";
  version = "1.2.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "deepmind";
    repo = pname;
    rev = "ed6eff5b79ed56923bcb102e152c01ea52451d4c";
    hash = "sha256-UsDUKJCHSJ4gP+P95Pm7RsPpqTJqJhrsW47C7fTZ77I=";
  };

  buildInputs = [
    absl-py
    dm-tree
    numpy
    wrapt
  ];

  propagatedBuildInputs = [
    tensorflow
    tensorflow-probability
  ];

  nativeCheckInputs = [
    nose
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "trfl"
  ];

  # Tests currently fail with assertion errors
  doCheck = false;

  disabledTestPaths = [
    # AssertionErrors
    "trfl/indexing_ops_test.py"
    "trfl/vtrace_ops_test.py"
    "trfl/value_ops_test.py"
    "trfl/target_update_ops_test.py"
    "trfl/sequence_ops_test.py"
    "trfl/retrace_ops_test.py"
    "trfl/policy_ops_test.py"
    "trfl/policy_gradient_ops_test.py"
    "trfl/pixel_control_ops_test.py"
    "trfl/periodic_ops_test.py"
    "trfl/dpg_ops_test.py"
    "trfl/distribution_ops_test.py"
    "trfl/dist_value_ops_test.py"
    "trfl/discrete_policy_gradient_ops_test.py"
    "trfl/continuous_retrace_ops_test.py"
    "trfl/clipping_ops_test.py"
    "trfl/action_value_ops_test.py"
  ];

  meta = with lib; {
    description = "TensorFlow Reinforcement Learning";
    homepage = "https://github.com/deepmind/trfl";
    license = licenses.asl20;
    maintainers = with maintainers; [ onny ];
  };
}