torchrl-nightly 2025.8.12__cp39-cp39-win_amd64.whl → 2025.8.13__cp39-cp39-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -42,13 +42,13 @@ _dtype_conversion = {
42
42
 
43
43
 
44
44
  def _ndarray_to_tensor(value: jnp.ndarray | np.ndarray) -> torch.Tensor: # noqa: F821
45
- from jax import dlpack as jax_dlpack, numpy as jnp
45
+ from jax import numpy as jnp
46
46
 
47
47
  # JAX arrays generated by jax.vmap would have Numpy dtypes.
48
48
  if value.dtype in _dtype_conversion:
49
49
  value = value.view(_dtype_conversion[value.dtype])
50
50
  if isinstance(value, jnp.ndarray):
51
- dlpack_tensor = jax_dlpack.to_dlpack(value)
51
+ dlpack_tensor = value.__dlpack__()
52
52
  elif isinstance(value, np.ndarray):
53
53
  dlpack_tensor = value.__dlpack__()
54
54
  else:
@@ -61,7 +61,9 @@ def _ndarray_to_tensor(value: jnp.ndarray | np.ndarray) -> torch.Tensor: # noqa
61
61
  def _tensor_to_ndarray(value: torch.Tensor) -> jnp.ndarray: # noqa: F821
62
62
  from jax import dlpack as jax_dlpack
63
63
 
64
- return jax_dlpack.from_dlpack(torch_dlpack.to_dlpack(value.contiguous()))
64
+ # Detach the tensor to remove gradients before converting to DLPack
65
+ value = value.contiguous().detach()
66
+ return jax_dlpack.from_dlpack(value)
65
67
 
66
68
 
67
69
  def _get_object_fields(obj) -> dict:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: torchrl-nightly
3
- Version: 2025.8.12
3
+ Version: 2025.8.13
4
4
  Summary: A modular, primitive-first, python-first PyTorch library for Reinforcement Learning
5
5
  Author-email: torchrl contributors <vmoens@fb.com>
6
6
  Maintainer-email: torchrl contributors <vmoens@fb.com>
@@ -33,6 +33,9 @@ Requires-Dist: cloudpickle
33
33
  Requires-Dist: tensordict-nightly
34
34
  Provides-Extra: atari
35
35
  Requires-Dist: gymnasium[atari]; extra == "atari"
36
+ Provides-Extra: brax
37
+ Requires-Dist: jax[cuda12]>=0.7.0; extra == "brax"
38
+ Requires-Dist: brax; extra == "brax"
36
39
  Provides-Extra: checkpointing
37
40
  Requires-Dist: torchsnapshot; extra == "checkpointing"
38
41
  Provides-Extra: dev
@@ -92,7 +92,7 @@ sota-implementations/td3_bc/td3_bc.py,sha256=GUGzbGkaR7MDbmhvMCs69Ewd-iCVjaQCEt6
92
92
  sota-implementations/td3_bc/utils.py,sha256=ZMMYehJP6KZaiiwTRlJRFKC528M49QhfEb_RAxaBj-U,6951
93
93
  torchrl/__init__.py,sha256=NjAWriDfFsQIxAUG6lvmqJnZE2olvHF2LDN9ZE1WT9M,3065
94
94
  torchrl/_extension.py,sha256=5DqUOUHZJPLqcSvGztUUBy4rJFAzznuJCAu5c84OJo8,2981
95
- torchrl/_torchrl.cp39-win_amd64.pyd,sha256=qhYN9yg8Nf-78WrcGTgXn0zw4kChL8GdHujCWBOIZM0,452608
95
+ torchrl/_torchrl.cp39-win_amd64.pyd,sha256=D1Hf5b_m4RGxiUAJlNXDdc0MvAWLjNtLCfiesTL6pu4,452608
96
96
  torchrl/_utils.py,sha256=9s4EpAZlaUVhWb7Llvg86Pex0sRv48DDQia30VbvKvo,42339
97
97
  torchrl/collectors/__init__.py,sha256=LzTyfxmkNGPSa5-3rS5unQK7HfT5ZEdr2NV291rAOlU,832
98
98
  torchrl/collectors/collectors.py,sha256=XsfSHhSPWi_Czt-Olpgr6hgukXJM-1oVuWJ1m4yfZX4,182174
@@ -180,7 +180,7 @@ torchrl/envs/libs/gym.py,sha256=4hWb06j5DFSU7S6k9wsXmuwtCsUVK3WtGYqsHregEcg,8255
180
180
  torchrl/envs/libs/habitat.py,sha256=w_B1VQQRcjH0kbynu6H9zcimjoluEqVcsH1P0WuQguM,5525
181
181
  torchrl/envs/libs/isaac_lab.py,sha256=lD3PVhuco2mncgSK-714yPQ9EjxdLOKRfDRR__eARec,3523
182
182
  torchrl/envs/libs/isaacgym.py,sha256=C9fY_gLTRm1qk0TGMFMQKXNS27HBpIqRz2rjdJ0Lg7k,7336
183
- torchrl/envs/libs/jax_utils.py,sha256=j63ti4q7owJf73C-h5Wi9AoglVlQrTyABJ9fCV9RfbM,6201
183
+ torchrl/envs/libs/jax_utils.py,sha256=q06IOxSX0jCfm1JnVGj-SldYHtUrlVoKtZj8U1zDJcI,6247
184
184
  torchrl/envs/libs/jumanji.py,sha256=6C9NmILOt3wbgoEB4oHaDU-4lBRzJGQKJ62hYU8GLTg,41234
185
185
  torchrl/envs/libs/meltingpot.py,sha256=5IT7Kj5C6u1CWDAdb1SimCgEv33ti1Y7hVsJy5Nf8bA,26695
186
186
  torchrl/envs/libs/openml.py,sha256=DDG5qbBe7ipjQ8nJUg6pBVja8w9zsRJFY6n_m10zItg,5866
@@ -322,8 +322,8 @@ torchrl/trainers/helpers/losses.py,sha256=HwrovwbMOhY-5-hlOz-YHclKnoJhMijVjDNuAT
322
322
  torchrl/trainers/helpers/models.py,sha256=VujBq9H92sEzpCtU1iTrJQNlwvyOO-Rho4bzsMonX6s,22465
323
323
  torchrl/trainers/helpers/replay_buffer.py,sha256=RaZqXnHimmadiibvDBcLbtIhpPaVMTPhYMOBvX4v3CA,2060
324
324
  torchrl/trainers/helpers/trainers.py,sha256=hB1FtHtP-S0PBQ4LF6WPy37caaLpacyaLThj1BNl5Ho,12372
325
- torchrl_nightly-2025.8.12.dist-info/LICENSE,sha256=PGO-oZsq4EzhE1-WQS2xGiEF3UCVb9YawfQ09cIMV_8,1119
326
- torchrl_nightly-2025.8.12.dist-info/METADATA,sha256=k896JgYWNPyT4FIriOiAYTlQ-56mzdVKRO8zGJhYhYw,42540
327
- torchrl_nightly-2025.8.12.dist-info/WHEEL,sha256=yA7mxgqX2UV73NtJdMh2AAmdb628loM81912H3s5r00,100
328
- torchrl_nightly-2025.8.12.dist-info/top_level.txt,sha256=-5FcSdmJ9DwdHF8aOIaofsPbz4Gm8G1eo7r7Sc2CHgE,59
329
- torchrl_nightly-2025.8.12.dist-info/RECORD,,
325
+ torchrl_nightly-2025.8.13.dist-info/LICENSE,sha256=PGO-oZsq4EzhE1-WQS2xGiEF3UCVb9YawfQ09cIMV_8,1119
326
+ torchrl_nightly-2025.8.13.dist-info/METADATA,sha256=WPKgQIOQ9ox9gxi54abdpV03Bi-d9ppl58i9vKZVqmk,42652
327
+ torchrl_nightly-2025.8.13.dist-info/WHEEL,sha256=yA7mxgqX2UV73NtJdMh2AAmdb628loM81912H3s5r00,100
328
+ torchrl_nightly-2025.8.13.dist-info/top_level.txt,sha256=-5FcSdmJ9DwdHF8aOIaofsPbz4Gm8G1eo7r7Sc2CHgE,59
329
+ torchrl_nightly-2025.8.13.dist-info/RECORD,,