torchrl-nightly 2025.6.24__cp312-cp312-macosx_10_13_universal2.whl → 2025.6.25__cp312-cp312-macosx_10_13_universal2.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.
- torchrl/_torchrl.cpython-312-darwin.so +0 -0
- torchrl/objectives/value/advantages.py +13 -2
- torchrl/version.py +2 -2
- {torchrl_nightly-2025.6.24.dist-info → torchrl_nightly-2025.6.25.dist-info}/METADATA +1 -1
- {torchrl_nightly-2025.6.24.dist-info → torchrl_nightly-2025.6.25.dist-info}/RECORD +8 -8
- {torchrl_nightly-2025.6.24.dist-info → torchrl_nightly-2025.6.25.dist-info}/WHEEL +0 -0
- {torchrl_nightly-2025.6.24.dist-info → torchrl_nightly-2025.6.25.dist-info}/licenses/LICENSE +0 -0
- {torchrl_nightly-2025.6.24.dist-info → torchrl_nightly-2025.6.25.dist-info}/top_level.txt +0 -0
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.
|
2
|
-
git_version = '
|
1
|
+
__version__ = '2025.6.25'
|
2
|
+
git_version = '773c366c7b29f5ea26de0215119fb15055714525'
|
@@ -3,9 +3,9 @@ build_tools/setup_helpers/__init__.py,sha256=7l8TvVqxKezgzKCLuRv20mvGLloprFVZYm8
|
|
3
3
|
build_tools/setup_helpers/extension.py,sha256=4-PDLr-pw40bJnd9SfxnTaSjUyuXU_Tg8yOg69Kl0o4,5914
|
4
4
|
torchrl/__init__.py,sha256=mhDBx2UIuBKc0gmi8dVNHokQ6tCbIovruZmyAxcSsy8,2938
|
5
5
|
torchrl/_extension.py,sha256=z7wQ8i1iYWYcnygq_j0nq9sT-koY13tfHhTLNbMk17Q,2353
|
6
|
-
torchrl/_torchrl.cpython-312-darwin.so,sha256=
|
6
|
+
torchrl/_torchrl.cpython-312-darwin.so,sha256=JxENhH-IFEgfGBqJHkj8SEj3A2t5rylGxc3ngwcIEUM,1691072
|
7
7
|
torchrl/_utils.py,sha256=Cw5EG6x5oSZF1iE3YCs1a32VUKp0rTXIs2u67q9zKUI,41078
|
8
|
-
torchrl/version.py,sha256=
|
8
|
+
torchrl/version.py,sha256=sh2m4NXVgN00_2MdNzvxZI_WDPnhYiOejX0at0aKs0k,83
|
9
9
|
torchrl/collectors/__init__.py,sha256=hJ3JD6shRku0BL6SzJQq44FZ5Q1RGR8LealFyU3FRn4,799
|
10
10
|
torchrl/collectors/collectors.py,sha256=CdTerIwhCTr6n5OoJLNad0bNQ5OLliPZFWkU18QBKSA,177625
|
11
11
|
torchrl/collectors/utils.py,sha256=MlXrkYuDmV0Em-tVNQiLL32FWgPNDgceYYG_GgpiviA,11320
|
@@ -202,7 +202,7 @@ torchrl/objectives/llm/sft.py,sha256=zAdVT1CmXJJPjEwPt4SPJNzFUC2m-flcfOsejIuAFkg
|
|
202
202
|
torchrl/objectives/multiagent/__init__.py,sha256=CHxWmq5_3kveLcAdyB7cgSVYVIald7EZo81RRgozxo0,237
|
203
203
|
torchrl/objectives/multiagent/qmixer.py,sha256=JyDcZeV2zv2MqKsyJ-ql9ISYHJ58e3pzb5-0BThswhI,16973
|
204
204
|
torchrl/objectives/value/__init__.py,sha256=AdluF370wYzOAcP_yglUAFnNByKVZzivBYJafkDQbJA,561
|
205
|
-
torchrl/objectives/value/advantages.py,sha256=
|
205
|
+
torchrl/objectives/value/advantages.py,sha256=lVJLZPRw4T56tZaUZNusII7YP87NAnSAJkgWCmUpvqk,84905
|
206
206
|
torchrl/objectives/value/functional.py,sha256=XxM2MrPyZrn2tXP-m1OPAZX6Deu7jc0toi5QvsYkWiY,49707
|
207
207
|
torchrl/objectives/value/utils.py,sha256=R5k45Cx6HQwO4bjeQmmk_d5DTO8Vh-a4DwZUL7ZLEw4,13256
|
208
208
|
torchrl/record/__init__.py,sha256=QdLnwjbnfd3eNsH0p2Zt5HKnAMvYPxNskbtB-pFTw90,506
|
@@ -224,8 +224,8 @@ torchrl/trainers/helpers/losses.py,sha256=qH-2YJwMtDAYAPXTTYy3cOPiq4ILC6xTjfnGUU
|
|
224
224
|
torchrl/trainers/helpers/models.py,sha256=ihTERG2c96E8cS3Tnul6a_ys6iDEEJmHh05p9blQTW8,21807
|
225
225
|
torchrl/trainers/helpers/replay_buffer.py,sha256=ZUZHOa0TILyeWJ3iahzTJ6UvMl_0FdxuZfJEja94Bn8,2001
|
226
226
|
torchrl/trainers/helpers/trainers.py,sha256=j6B5XA7_FFHMQeOIQwjNcO0CGE_4mZKUC9_jH_iqqh4,12071
|
227
|
-
torchrl_nightly-2025.6.
|
228
|
-
torchrl_nightly-2025.6.
|
229
|
-
torchrl_nightly-2025.6.
|
230
|
-
torchrl_nightly-2025.6.
|
231
|
-
torchrl_nightly-2025.6.
|
227
|
+
torchrl_nightly-2025.6.25.dist-info/licenses/LICENSE,sha256=xdjS4_xk-IwnLuIFCvTYTl9Y8aXRejqpmke3dGam_nI,1098
|
228
|
+
torchrl_nightly-2025.6.25.dist-info/METADATA,sha256=vq_at8BE1Jg-gz_41Wt7XWu1Xn9RuNstF32glx-xMXo,39131
|
229
|
+
torchrl_nightly-2025.6.25.dist-info/WHEEL,sha256=9_3tTSxMJq-dgdzMiScNvtT5eTBVd3l6RgHS7HwTzpA,115
|
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,,
|
File without changes
|
{torchrl_nightly-2025.6.24.dist-info → torchrl_nightly-2025.6.25.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
File without changes
|