torchrl-nightly 2025.6.23__cp39-cp39-win_amd64.whl → 2025.6.25__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
@@ -1252,7 +1252,9 @@ class GAE(ValueEstimatorBase):
1252
1252
  Args:
1253
1253
  gamma (scalar): exponential mean discount.
1254
1254
  lmbda (scalar): trajectory discount.
1255
- value_network (TensorDictModule): value operator used to retrieve the value estimates.
1255
+ value_network (TensorDictModule, optional): value operator used to retrieve the value estimates.
1256
+ If ``None``, this module will expect the ``"state_value"`` keys to be already filled, and
1257
+ will not call the value network to produce it.
1256
1258
  average_gae (bool): if ``True``, the resulting GAE values will be standardized.
1257
1259
  Default is ``False``.
1258
1260
  differentiable (bool, optional): if ``True``, gradients are propagated through
@@ -1327,7 +1329,7 @@ class GAE(ValueEstimatorBase):
1327
1329
  *,
1328
1330
  gamma: float | torch.Tensor,
1329
1331
  lmbda: float | torch.Tensor,
1330
- value_network: TensorDictModule,
1332
+ value_network: TensorDictModule | None,
1331
1333
  average_gae: bool = False,
1332
1334
  differentiable: bool = False,
1333
1335
  vectorized: bool | None = None,
@@ -1499,6 +1501,15 @@ class GAE(ValueEstimatorBase):
1499
1501
  value = tensordict.get(self.tensor_keys.value)
1500
1502
  next_value = tensordict.get(("next", self.tensor_keys.value))
1501
1503
 
1504
+ if value is None:
1505
+ raise ValueError(
1506
+ f"The tensor with key {self.tensor_keys.value} is missing, and no value network was provided."
1507
+ )
1508
+ if next_value is None:
1509
+ raise ValueError(
1510
+ f"The tensor with key {('next', self.tensor_keys.value)} is missing, and no value network was provided."
1511
+ )
1512
+
1502
1513
  done = tensordict.get(("next", self.tensor_keys.done))
1503
1514
  terminated = tensordict.get(("next", self.tensor_keys.terminated), default=done)
1504
1515
  time_dim = self._get_time_dim(time_dim, tensordict)
torchrl/version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = '2025.6.23'
2
- git_version = 'ed051bc3e5b33d00f64f2a785023bca9a6c72c9b'
1
+ __version__ = '2025.6.25'
2
+ git_version = '773c366c7b29f5ea26de0215119fb15055714525'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: torchrl-nightly
3
- Version: 2025.6.23
3
+ Version: 2025.6.25
4
4
  Summary: UNKNOWN
5
5
  Home-page: https://github.com/pytorch/rl
6
6
  Author: torchrl contributors
@@ -3,9 +3,9 @@ build_tools/setup_helpers/__init__.py,sha256=l9zlK7Nm5bT7P_onQx-hZeIGzKKyCFm1PFk
3
3
  build_tools/setup_helpers/extension.py,sha256=ihV8jz8kqOvpqzuD006XqF1oNX5ukKGlwIOJRb1Vd-o,6075
4
4
  torchrl/__init__.py,sha256=76lKYwYKmAKORhyVt2tURmYAIRTifxxO3gWsskrHAXU,3054
5
5
  torchrl/_extension.py,sha256=x6Nqj2brF3VhlEwxmNA2fYbmpxq1HHGrHMnP0YnQwdc,2412
6
- torchrl/_torchrl.cp39-win_amd64.pyd,sha256=CdGPWEiXu9y8lGYipukrs-bjmmWiF7CqCIzsPcLvgJs,474112
6
+ torchrl/_torchrl.cp39-win_amd64.pyd,sha256=uX6Z3NEyJzcObRGwdlW0XNvIBmsY6KCcHwhkpxyXakw,474112
7
7
  torchrl/_utils.py,sha256=2N35rdD65U1khMi5gVIz8-nMjlZsoVq0kCiQftVRSxw,42297
8
- torchrl/version.py,sha256=V-OcCRVF-ZOOnOqJQNw9QLD7nJNFPXBF_DXkUa6Umn4,85
8
+ torchrl/version.py,sha256=rwzoyoJp3zigsp4bigQ1NTemEr4czzCGDXB6TUTJedA,85
9
9
  torchrl/collectors/__init__.py,sha256=LzTyfxmkNGPSa5-3rS5unQK7HfT5ZEdr2NV291rAOlU,832
10
10
  torchrl/collectors/collectors.py,sha256=Pz6VYYrekjBiVBQiyzp6zIyZrBdjSv4-FqlfrGYQz3E,181469
11
11
  torchrl/collectors/utils.py,sha256=aBmBLpphhfplqQjRCyn1jtWWJ-Wtc7TWvM0rOBN8SsE,11579
@@ -202,7 +202,7 @@ torchrl/objectives/llm/sft.py,sha256=9fzX9Qo0Goyjxuwca6eLN1PUQ24F0LZGRpjzTDLFfs4
202
202
  torchrl/objectives/multiagent/__init__.py,sha256=5uebDe5KrvlzeYV_BSd5vdmfruJQYMeDVVbU4iHErEg,245
203
203
  torchrl/objectives/multiagent/qmixer.py,sha256=yttOxc5FNylKw4iMnYSG1qO8EbHvx8imAhxNxW9_iLw,17362
204
204
  torchrl/objectives/value/__init__.py,sha256=QkSnenYVqe_3FVtwGr_D86N52unnpBvRXfcC5JFTBOw,589
205
- torchrl/objectives/value/advantages.py,sha256=sobRLEHMovd9ZEAqQ4IMD9eEtQ-zMq5UTg4DT3k-3qc,86248
205
+ torchrl/objectives/value/advantages.py,sha256=CUqSW8ZMfn33Nar1jPQgMf8jv2aMOk428PAuUGoPztU,86847
206
206
  torchrl/objectives/value/functional.py,sha256=ac7joxgPclDOiD6m509GJUw9KdM9BLM6WA5uerw9YCI,51137
207
207
  torchrl/objectives/value/utils.py,sha256=EQV-JnWspJcclHssgGXjvVWhgFmlJzep8E_SIPgA6qQ,13616
208
208
  torchrl/record/__init__.py,sha256=ktfH9AgjJ4NnTSR7FXAEcXRYtZHkPtwcxlGNDkLLEOw,523
@@ -224,8 +224,8 @@ torchrl/trainers/helpers/losses.py,sha256=rWKure02dl8hLBzLUs-jhNJV8L3QHWtFbl3HbX
224
224
  torchrl/trainers/helpers/models.py,sha256=VujBq9H92sEzpCtU1iTrJQNlwvyOO-Rho4bzsMonX6s,22465
225
225
  torchrl/trainers/helpers/replay_buffer.py,sha256=RaZqXnHimmadiibvDBcLbtIhpPaVMTPhYMOBvX4v3CA,2060
226
226
  torchrl/trainers/helpers/trainers.py,sha256=hB1FtHtP-S0PBQ4LF6WPy37caaLpacyaLThj1BNl5Ho,12372
227
- torchrl_nightly-2025.6.23.dist-info/LICENSE,sha256=PGO-oZsq4EzhE1-WQS2xGiEF3UCVb9YawfQ09cIMV_8,1119
228
- torchrl_nightly-2025.6.23.dist-info/METADATA,sha256=DvZZn_nBWGSXgiB80_U6TbQzOV8oEkRZCE9qnCSc_Iw,40044
229
- torchrl_nightly-2025.6.23.dist-info/WHEEL,sha256=yA7mxgqX2UV73NtJdMh2AAmdb628loM81912H3s5r00,100
230
- torchrl_nightly-2025.6.23.dist-info/top_level.txt,sha256=JeTJ1jV7QJwLcUS1nr21aPn_wb-XlAZ9c-z_EH472JA,20
231
- torchrl_nightly-2025.6.23.dist-info/RECORD,,
227
+ torchrl_nightly-2025.6.25.dist-info/LICENSE,sha256=PGO-oZsq4EzhE1-WQS2xGiEF3UCVb9YawfQ09cIMV_8,1119
228
+ torchrl_nightly-2025.6.25.dist-info/METADATA,sha256=rbe5EmVy2F48h2HOIHjCa03DVGsG5ZhWMZ6rznPFZRc,40044
229
+ torchrl_nightly-2025.6.25.dist-info/WHEEL,sha256=yA7mxgqX2UV73NtJdMh2AAmdb628loM81912H3s5r00,100
230
+ torchrl_nightly-2025.6.25.dist-info/top_level.txt,sha256=JeTJ1jV7QJwLcUS1nr21aPn_wb-XlAZ9c-z_EH472JA,20
231
+ torchrl_nightly-2025.6.25.dist-info/RECORD,,