python3Packages.tensordict: 0.8.3 -> 0.9.0 (#423963)

authored by Gaétan Lepage and committed by GitHub 0bdc43c9 df0503c8

+80 -13
+10
pkgs/development/python-modules/gymnasium/default.nix
··· 15 15 pythonOlder, 16 16 importlib-metadata, 17 17 18 + # optional-dependencies 19 + # atari 20 + ale-py, 21 + 18 22 # tests 19 23 array-api-compat, 20 24 dill, ··· 53 57 numpy 54 58 typing-extensions 55 59 ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; 60 + 61 + optional-dependencies = { 62 + atari = [ 63 + ale-py 64 + ]; 65 + }; 56 66 57 67 pythonImportsCheck = [ "gymnasium" ]; 58 68
+2 -2
pkgs/development/python-modules/tensordict/default.nix
··· 28 28 29 29 buildPythonPackage rec { 30 30 pname = "tensordict"; 31 - version = "0.8.3"; 31 + version = "0.9.0"; 32 32 pyproject = true; 33 33 34 34 src = fetchFromGitHub { 35 35 owner = "pytorch"; 36 36 repo = "tensordict"; 37 37 tag = "v${version}"; 38 - hash = "sha256-d/6JKGFcFLXY9pxsnP27uwnAnIQ9EKvfTS30DCwQrCM="; 38 + hash = "sha256-actBFzWb2JBPsLhRZiD6zRpk7eyX2OHUPMU9JpJ90Wc="; 39 39 }; 40 40 41 41 build-system = [
+68 -11
pkgs/development/python-modules/torchrl/default.nix
··· 17 17 torch, 18 18 19 19 # optional-dependencies 20 - ale-py, 21 - gym, 22 - pygame, 23 - torchsnapshot, 20 + # atari 24 21 gymnasium, 22 + # checkpointing 23 + torchsnapshot, 24 + # gym-continuous 25 25 mujoco, 26 + # llm 27 + accelerate, 28 + datasets, 29 + einops, 30 + immutabledict, 31 + langdetect, 32 + nltk, 33 + playwright, 34 + protobuf, 35 + safetensors, 36 + sentencepiece, 37 + transformers, 38 + vllm, 39 + # offline-data 26 40 h5py, 27 41 huggingface-hub, 28 42 minari, ··· 32 46 scikit-learn, 33 47 torchvision, 34 48 tqdm, 49 + # rendering 35 50 moviepy, 51 + # utils 36 52 git, 37 53 hydra-core, 38 54 tensorboard, ··· 48 64 49 65 buildPythonPackage rec { 50 66 pname = "torchrl"; 51 - version = "0.8.1"; 67 + version = "0.9.1"; 52 68 pyproject = true; 53 69 54 70 src = fetchFromGitHub { 55 71 owner = "pytorch"; 56 72 repo = "rl"; 57 73 tag = "v${version}"; 58 - hash = "sha256-ANoqIAVKSq023hG83Q71t8oLzud1LeVN5WVPYL3nOks="; 74 + hash = "sha256-afaWDX5lIAoGTfrBSqrktYoA1S4hv6ogBaKYHc8dQ6E="; 59 75 }; 60 76 61 77 build-system = [ ··· 73 89 ]; 74 90 75 91 optional-dependencies = { 76 - atari = [ 77 - ale-py 78 - gym 79 - pygame 80 - ]; 92 + atari = gymnasium.optional-dependencies.atari; 81 93 checkpointing = [ torchsnapshot ]; 82 94 gym-continuous = [ 83 95 gymnasium 84 96 mujoco 85 97 ]; 98 + llm = [ 99 + accelerate 100 + datasets 101 + einops 102 + immutabledict 103 + langdetect 104 + nltk 105 + playwright 106 + protobuf 107 + safetensors 108 + sentencepiece 109 + transformers 110 + vllm 111 + ]; 86 112 offline-data = [ 87 113 h5py 88 114 huggingface-hub ··· 131 157 ] 132 158 ++ optional-dependencies.atari 133 159 ++ optional-dependencies.gym-continuous 160 + ++ optional-dependencies.llm 134 161 ++ optional-dependencies.rendering; 135 162 136 163 disabledTests = 137 164 [ 165 + # Require network 166 + "test_create_or_load_dataset" 167 + "test_from_text_env_tokenizer" 168 + "test_from_text_env_tokenizer_catframes" 169 + "test_from_text_rb_slicesampler" 170 + "test_generate" 171 + "test_get_dataloader" 172 + "test_get_scores" 173 + "test_preproc_data" 174 + "test_prompt_tensordict_tokenizer" 175 + "test_reward_model" 176 + "test_tensordict_tokenizer" 177 + "test_transform_compose" 178 + "test_transform_model" 179 + "test_transform_no_env" 180 + "test_transform_rb" 181 + 182 + # ray.exceptions.RuntimeEnvSetupError: Failed to set up runtime environment 183 + "TestRayCollector" 184 + 138 185 # torchrl is incompatible with gymnasium>=1.0 139 186 # https://github.com/pytorch/rl/discussions/2483 140 187 "test_resetting_strategies" ··· 193 240 # AssertionError: assert tensor([51.]) == ((5 * 11) + 2) 194 241 "test_vecnorm_parallel_auto" 195 242 ]; 243 + 244 + disabledTestPaths = [ 245 + # ERROR collecting test/smoke_test.py 246 + # import file mismatch: 247 + # imported module 'smoke_test' has this __file__ attribute: 248 + # /build/source/test/llm/smoke_test.py 249 + # which is not the same as the test file we want to collect: 250 + # /build/source/test/smoke_test.py 251 + "test/llm" 252 + ]; 196 253 197 254 meta = { 198 255 description = "Modular, primitive-first, python-first PyTorch library for Reinforcement Learning";