1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, setuptools
6, gym
7, gymnasium
8, torch
9, tensorboard
10, tqdm
11, wandb
12, packaging
13, pytestCheckHook
14}:
15
16buildPythonPackage rec {
17 pname = "skrl";
18 version = "1.0.0";
19 pyproject = true;
20 disabled = pythonOlder "3.6";
21
22 src = fetchFromGitHub {
23 owner = "Toni-SM";
24 repo = pname;
25 rev = "refs/tags/${version}";
26 hash = "sha256-89OoJanmaB74SLF1qMI8WFBdN1czS7Yr7BmojaRdo4M=";
27 };
28
29 nativeBuildInputs = [ setuptools ];
30
31 propagatedBuildInputs = [
32 gym
33 gymnasium
34 torch
35 tensorboard
36 tqdm
37 wandb
38 packaging
39 ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42 doCheck = torch.cudaSupport;
43
44 pythonImportsCheck = [
45 "skrl"
46 "skrl.agents"
47 "skrl.agents.torch"
48 "skrl.envs"
49 "skrl.envs.torch"
50 "skrl.models"
51 "skrl.models.torch"
52 "skrl.resources"
53 "skrl.resources.noises"
54 "skrl.resources.noises.torch"
55 "skrl.resources.schedulers"
56 "skrl.resources.schedulers.torch"
57 "skrl.trainers"
58 "skrl.trainers.torch"
59 "skrl.utils"
60 "skrl.utils.model_instantiators"
61 ];
62
63 meta = with lib; {
64 description = "Reinforcement learning library using PyTorch focusing on readability and simplicity";
65 homepage = "https://skrl.readthedocs.io";
66 license = licenses.mit;
67 maintainers = with maintainers; [ bcdarwin ];
68 };
69}