2022-07-18 16:21:45 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
2024-01-13 08:15:51 +00:00
|
|
|
, fetchpatch
|
2022-07-18 16:21:45 +00:00
|
|
|
, frozendict
|
|
|
|
, termcolor
|
|
|
|
, matplotlib
|
|
|
|
, gym
|
|
|
|
, pandas
|
|
|
|
, scipy
|
|
|
|
, absl-py
|
|
|
|
, dm-env
|
|
|
|
, plotnine
|
2023-05-24 13:37:59 +00:00
|
|
|
, scikit-image
|
2022-07-18 16:21:45 +00:00
|
|
|
, dm-tree
|
|
|
|
, patsy
|
|
|
|
, tensorflow-probability
|
|
|
|
, dm-haiku
|
|
|
|
, statsmodels
|
|
|
|
, mizani
|
|
|
|
, trfl
|
|
|
|
, optax
|
|
|
|
, pytestCheckHook
|
2022-08-12 12:06:08 +00:00
|
|
|
, dm-sonnet
|
|
|
|
, rlax
|
|
|
|
, distrax
|
|
|
|
}:
|
2022-07-18 16:21:45 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
let bsuite = buildPythonPackage rec {
|
2022-07-18 16:21:45 +00:00
|
|
|
pname = "bsuite";
|
|
|
|
version = "0.3.5";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-ak9McvXl7Nz5toUaPaRaJek9lurxiQiIW209GnZEjX0=";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch { # Convert np.int -> np.int32 since np.int is deprecated (https://github.com/google-deepmind/bsuite/pull/48)
|
|
|
|
url = "https://github.com/google-deepmind/bsuite/pull/48/commits/f8d81b2f1c27ef2c8c71ae286001ed879ea306ab.patch";
|
|
|
|
hash = "sha256-FXtvVS+U8brulq8Z27+yWIimB+kigGiUOIv1SHb1TA8=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-07-18 16:21:45 +00:00
|
|
|
absl-py
|
|
|
|
dm-env
|
|
|
|
dm-tree
|
|
|
|
frozendict
|
|
|
|
gym
|
|
|
|
matplotlib
|
|
|
|
mizani
|
|
|
|
pandas
|
|
|
|
patsy
|
|
|
|
plotnine
|
2023-05-24 13:37:59 +00:00
|
|
|
scikit-image
|
2022-07-18 16:21:45 +00:00
|
|
|
scipy
|
|
|
|
statsmodels
|
|
|
|
termcolor
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
distrax
|
2022-07-18 16:21:45 +00:00
|
|
|
dm-haiku
|
|
|
|
dm-sonnet
|
|
|
|
optax
|
|
|
|
pytestCheckHook
|
2022-08-12 12:06:08 +00:00
|
|
|
rlax
|
2022-07-18 16:21:45 +00:00
|
|
|
tensorflow-probability
|
|
|
|
trfl
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"bsuite"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network connection
|
|
|
|
"test_run9"
|
|
|
|
"test_longer_action_sequence"
|
|
|
|
"test_reset"
|
|
|
|
"test_step_after_reset"
|
|
|
|
"test_step_on_fresh_environment"
|
|
|
|
"test_longer_action_sequence"
|
|
|
|
"test_reset"
|
|
|
|
"test_step_after_reset"
|
|
|
|
"test_step_on_fresh_environment"
|
|
|
|
"test_longer_action_sequence"
|
|
|
|
"test_reset"
|
|
|
|
"test_step_after_reset"
|
|
|
|
"test_step_on_fresh_environment"
|
|
|
|
"test_logger"
|
|
|
|
"test_episode_truncation"
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
# escape infinite recursion with rlax
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
check = bsuite.overridePythonAttrs (_: { doCheck = true; });
|
|
|
|
};
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = ''
|
|
|
|
Core RL Behaviour Suite. A collection of reinforcement learning
|
|
|
|
experiments
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/deepmind/bsuite";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ onny ];
|
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
}; in bsuite
|