Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.6 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, pythonOlder 6, pytestCheckHook 7, gym 8, gymnasium 9, torch 10, tensorboard 11, tqdm 12, wandb 13, packaging 14}: 15 16buildPythonPackage rec { 17 pname = "skrl"; 18 version = "0.10.2"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.6"; 22 23 src = fetchFromGitHub { 24 owner = "Toni-SM"; 25 repo = pname; 26 rev = "refs/tags/${version}"; 27 hash = "sha256-OY5+bUPg+G1eKFMvHlXSHwc2WWHTpyoyCKjY3MvlLyM="; 28 }; 29 30 patches = [ 31 # remove after next release: 32 (fetchpatch { 33 name = "fix-python_requires-specification"; 34 url = "https://github.com/Toni-SM/skrl/pull/62/commits/9b554adfe2da6cd97cccbbcd418a349cc8f1de80.patch"; 35 hash = "sha256-GeASMU1Pgy8U1zaIAVroBDjYaY+n93XP5uFyP4U9lok="; 36 }) 37 ]; 38 39 propagatedBuildInputs = [ 40 gym 41 gymnasium 42 torch 43 tensorboard 44 tqdm 45 wandb 46 packaging 47 ]; 48 49 nativeCheckInputs = [ pytestCheckHook ]; 50 doCheck = torch.cudaSupport; 51 52 pythonImportsCheck = [ 53 "skrl" 54 "skrl.agents" 55 "skrl.agents.torch" 56 "skrl.envs" 57 "skrl.envs.torch" 58 "skrl.models" 59 "skrl.models.torch" 60 "skrl.resources" 61 "skrl.resources.noises" 62 "skrl.resources.noises.torch" 63 "skrl.resources.schedulers" 64 "skrl.resources.schedulers.torch" 65 "skrl.trainers" 66 "skrl.trainers.torch" 67 "skrl.utils" 68 "skrl.utils.model_instantiators" 69 ]; 70 71 meta = with lib; { 72 description = "Reinforcement learning library using PyTorch focusing on readability and simplicity"; 73 homepage = "https://skrl.readthedocs.io"; 74 license = licenses.mit; 75 maintainers = with maintainers; [ bcdarwin ]; 76 }; 77}