tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python312Packages.bsuite: refactor
- use nixfmt
Fabian Affolter
2 years ago
dbf899ad
cebee4c5
+116
-108
1 changed file
expand all
collapse all
unified
split
pkgs
development
python-modules
bsuite
default.nix
+116
-108
pkgs/development/python-modules/bsuite/default.nix
···
1
1
-
{ lib
2
2
-
, fetchPypi
3
3
-
, buildPythonPackage
4
4
-
, fetchpatch
5
5
-
, frozendict
6
6
-
, termcolor
7
7
-
, matplotlib
8
8
-
, gym
9
9
-
, pandas
10
10
-
, scipy
11
11
-
, absl-py
12
12
-
, dm-env
13
13
-
, plotnine
14
14
-
, scikit-image
15
15
-
, dm-tree
16
16
-
, patsy
17
17
-
, tensorflow-probability
18
18
-
, dm-haiku
19
19
-
, statsmodels
20
20
-
, mizani
21
21
-
, trfl
22
22
-
, optax
23
23
-
, pytestCheckHook
24
24
-
, dm-sonnet
25
25
-
, rlax
26
26
-
, distrax
1
1
+
{
2
2
+
lib,
3
3
+
absl-py,
4
4
+
buildPythonPackage,
5
5
+
distrax,
6
6
+
dm-env,
7
7
+
dm-haiku,
8
8
+
dm-sonnet,
9
9
+
dm-tree,
10
10
+
fetchpatch,
11
11
+
fetchPypi,
12
12
+
frozendict,
13
13
+
gym,
14
14
+
matplotlib,
15
15
+
mizani,
16
16
+
optax,
17
17
+
pandas,
18
18
+
patsy,
19
19
+
plotnine,
20
20
+
pytestCheckHook,
21
21
+
pythonOlder,
22
22
+
rlax,
23
23
+
scikit-image,
24
24
+
scipy,
25
25
+
setuptools,
26
26
+
statsmodels,
27
27
+
tensorflow-probability,
28
28
+
termcolor,
29
29
+
trfl,
27
30
}:
28
31
29
29
-
let bsuite = buildPythonPackage rec {
30
30
-
pname = "bsuite";
31
31
-
version = "0.3.5";
32
32
-
format = "setuptools";
32
32
+
let
33
33
+
bsuite = buildPythonPackage rec {
34
34
+
pname = "bsuite";
35
35
+
version = "0.3.5";
36
36
+
pyproject = true;
33
37
34
34
-
src = fetchPypi {
35
35
-
inherit pname version;
36
36
-
hash = "sha256-ak9McvXl7Nz5toUaPaRaJek9lurxiQiIW209GnZEjX0=";
37
37
-
};
38
38
+
disabled = pythonOlder "3.7";
38
39
39
39
-
patches = [
40
40
-
# Convert np.int -> np.int32 since np.int is deprecated, https://github.com/google-deepmind/bsuite/pull/48
41
41
-
(fetchpatch {
42
42
-
url = "https://github.com/google-deepmind/bsuite/pull/48/commits/f8d81b2f1c27ef2c8c71ae286001ed879ea306ab.patch";
43
43
-
hash = "sha256-FXtvVS+U8brulq8Z27+yWIimB+kigGiUOIv1SHb1TA8=";
44
44
-
})
45
45
-
# Replace imp with importlib, https://github.com/google-deepmind/bsuite/pull/50
46
46
-
(fetchpatch {
47
47
-
name = "replace-imp.patch";
48
48
-
url = "https://github.com/google-deepmind/bsuite/commit/d08b63655c7efa5b5bb0f35e825e17549d23e812.patch";
49
49
-
hash = "sha256-V5p/6edNXTpEckuSuxJ/mvfJng5yE/pfeMoYbvlNpEo=";
50
50
-
})
51
51
-
];
40
40
+
src = fetchPypi {
41
41
+
inherit pname version;
42
42
+
hash = "sha256-ak9McvXl7Nz5toUaPaRaJek9lurxiQiIW209GnZEjX0=";
43
43
+
};
52
44
53
53
-
propagatedBuildInputs = [
54
54
-
absl-py
55
55
-
dm-env
56
56
-
dm-tree
57
57
-
frozendict
58
58
-
gym
59
59
-
matplotlib
60
60
-
mizani
61
61
-
pandas
62
62
-
patsy
63
63
-
plotnine
64
64
-
scikit-image
65
65
-
scipy
66
66
-
statsmodels
67
67
-
termcolor
68
68
-
];
45
45
+
patches = [
46
46
+
# Convert np.int -> np.int32 since np.int is deprecated, https://github.com/google-deepmind/bsuite/pull/48
47
47
+
(fetchpatch {
48
48
+
url = "https://github.com/google-deepmind/bsuite/pull/48/commits/f8d81b2f1c27ef2c8c71ae286001ed879ea306ab.patch";
49
49
+
hash = "sha256-FXtvVS+U8brulq8Z27+yWIimB+kigGiUOIv1SHb1TA8=";
50
50
+
})
51
51
+
# Replace imp with importlib, https://github.com/google-deepmind/bsuite/pull/50
52
52
+
(fetchpatch {
53
53
+
name = "replace-imp.patch";
54
54
+
url = "https://github.com/google-deepmind/bsuite/commit/d08b63655c7efa5b5bb0f35e825e17549d23e812.patch";
55
55
+
hash = "sha256-V5p/6edNXTpEckuSuxJ/mvfJng5yE/pfeMoYbvlNpEo=";
56
56
+
})
57
57
+
];
69
58
70
70
-
nativeCheckInputs = [
71
71
-
distrax
72
72
-
dm-haiku
73
73
-
dm-sonnet
74
74
-
optax
75
75
-
pytestCheckHook
76
76
-
rlax
77
77
-
tensorflow-probability
78
78
-
trfl
79
79
-
];
59
59
+
build-system = [ setuptools ];
80
60
81
81
-
pythonImportsCheck = [
82
82
-
"bsuite"
83
83
-
];
61
61
+
dependencies = [
62
62
+
absl-py
63
63
+
dm-env
64
64
+
dm-tree
65
65
+
frozendict
66
66
+
gym
67
67
+
matplotlib
68
68
+
mizani
69
69
+
pandas
70
70
+
patsy
71
71
+
plotnine
72
72
+
scikit-image
73
73
+
scipy
74
74
+
statsmodels
75
75
+
termcolor
76
76
+
];
84
77
85
85
-
disabledTests = [
86
86
-
# Tests require network connection
87
87
-
"test_run9"
88
88
-
"test_longer_action_sequence"
89
89
-
"test_reset"
90
90
-
"test_step_after_reset"
91
91
-
"test_step_on_fresh_environment"
92
92
-
"test_longer_action_sequence"
93
93
-
"test_reset"
94
94
-
"test_step_after_reset"
95
95
-
"test_step_on_fresh_environment"
96
96
-
"test_longer_action_sequence"
97
97
-
"test_reset"
98
98
-
"test_step_after_reset"
99
99
-
"test_step_on_fresh_environment"
100
100
-
"test_logger"
101
101
-
"test_episode_truncation"
102
102
-
];
78
78
+
nativeCheckInputs = [
79
79
+
distrax
80
80
+
dm-haiku
81
81
+
dm-sonnet
82
82
+
optax
83
83
+
pytestCheckHook
84
84
+
rlax
85
85
+
tensorflow-probability
86
86
+
trfl
87
87
+
];
103
88
104
104
-
# escape infinite recursion with rlax
105
105
-
doCheck = false;
89
89
+
pythonImportsCheck = [ "bsuite" ];
106
90
107
107
-
passthru.tests = {
108
108
-
check = bsuite.overridePythonAttrs (_: { doCheck = true; });
109
109
-
};
91
91
+
disabledTests = [
92
92
+
# Tests require network connection
93
93
+
"test_run9"
94
94
+
"test_longer_action_sequence"
95
95
+
"test_reset"
96
96
+
"test_step_after_reset"
97
97
+
"test_step_on_fresh_environment"
98
98
+
"test_longer_action_sequence"
99
99
+
"test_reset"
100
100
+
"test_step_after_reset"
101
101
+
"test_step_on_fresh_environment"
102
102
+
"test_longer_action_sequence"
103
103
+
"test_reset"
104
104
+
"test_step_after_reset"
105
105
+
"test_step_on_fresh_environment"
106
106
+
"test_logger"
107
107
+
"test_episode_truncation"
108
108
+
];
110
109
111
111
-
meta = with lib; {
112
112
-
description = ''
113
113
-
Core RL Behaviour Suite. A collection of reinforcement learning
114
114
-
experiments
115
115
-
'';
116
116
-
homepage = "https://github.com/deepmind/bsuite";
117
117
-
license = licenses.asl20;
118
118
-
maintainers = with maintainers; [ onny ];
110
110
+
# Escape infinite recursion with rlax
111
111
+
doCheck = false;
112
112
+
113
113
+
passthru.tests = {
114
114
+
check = bsuite.overridePythonAttrs (_: {
115
115
+
doCheck = true;
116
116
+
});
117
117
+
};
118
118
+
119
119
+
meta = with lib; {
120
120
+
description = "Collection of experiments that investigate core capabilities of a reinforcement learning (RL) agent";
121
121
+
homepage = "https://github.com/deepmind/bsuite";
122
122
+
changelog = "https://github.com/google-deepmind/bsuite/releases/tag/${version}";
123
123
+
license = licenses.asl20;
124
124
+
maintainers = with maintainers; [ onny ];
125
125
+
};
119
126
};
120
120
-
}; in bsuite
127
127
+
in
128
128
+
bsuite