@@ -339,10 +339,12 @@ class SyncDataCollector(DataCollectorBase):
339339 instances) it will be wrapped in a `nn.Module` first.
340340 Then, the collector will try to assess if these
341341 modules require wrapping in a :class:`~tensordict.nn.TensorDictModule` or not.
342+
342343 - If the policy forward signature matches any of ``forward(self, tensordict)``,
343344 ``forward(self, td)`` or ``forward(self, <anything>: TensorDictBase)`` (or
344345 any typing with a single argument typed as a subclass of ``TensorDictBase``)
345346 then the policy won't be wrapped in a :class:`~tensordict.nn.TensorDictModule`.
347+
346348 - In all other cases an attempt to wrap it will be undergone as such: ``TensorDictModule(policy, in_keys=env_obs_key, out_keys=env.action_keys)``.
347349
348350 Keyword Args:
@@ -1462,6 +1464,7 @@ class _MultiDataCollector(DataCollectorBase):
14621464 ``forward(self, td)`` or ``forward(self, <anything>: TensorDictBase)`` (or
14631465 any typing with a single argument typed as a subclass of ``TensorDictBase``)
14641466 then the policy won't be wrapped in a :class:`~tensordict.nn.TensorDictModule`.
1467+
14651468 - In all other cases an attempt to wrap it will be undergone as such:
14661469 ``TensorDictModule(policy, in_keys=env_obs_key, out_keys=env.action_keys)``.
14671470
@@ -1548,7 +1551,7 @@ class _MultiDataCollector(DataCollectorBase):
15481551 reset_when_done (bool, optional): if ``True`` (default), an environment
15491552 that return a ``True`` value in its ``"done"`` or ``"truncated"``
15501553 entry will be reset at the corresponding indices.
1551- update_at_each_batch (boolm optional): if ``True``, :meth:`~. update_policy_weight_()`
1554+ update_at_each_batch (boolm optional): if ``True``, :meth:`update_policy_weight_()`
15521555 will be called before (sync) or after (async) each data collection.
15531556 Defaults to ``False``.
15541557 preemptive_threshold (:obj:`float`, optional): a value between 0.0 and 1.0 that specifies the ratio of workers
@@ -2774,10 +2777,12 @@ class aSyncDataCollector(MultiaSyncDataCollector):
27742777 instances) it will be wrapped in a `nn.Module` first.
27752778 Then, the collector will try to assess if these
27762779 modules require wrapping in a :class:`~tensordict.nn.TensorDictModule` or not.
2780+
27772781 - If the policy forward signature matches any of ``forward(self, tensordict)``,
27782782 ``forward(self, td)`` or ``forward(self, <anything>: TensorDictBase)`` (or
27792783 any typing with a single argument typed as a subclass of ``TensorDictBase``)
27802784 then the policy won't be wrapped in a :class:`~tensordict.nn.TensorDictModule`.
2785+
27812786 - In all other cases an attempt to wrap it will be undergone as such: ``TensorDictModule(policy, in_keys=env_obs_key, out_keys=env.action_keys)``.
27822787
27832788 Keyword Args:
@@ -2863,7 +2868,7 @@ class aSyncDataCollector(MultiaSyncDataCollector):
28632868 reset_when_done (bool, optional): if ``True`` (default), an environment
28642869 that return a ``True`` value in its ``"done"`` or ``"truncated"``
28652870 entry will be reset at the corresponding indices.
2866- update_at_each_batch (boolm optional): if ``True``, :meth:`~. update_policy_weight_()`
2871+ update_at_each_batch (boolm optional): if ``True``, :meth:`update_policy_weight_()`
28672872 will be called before (sync) or after (async) each data collection.
28682873 Defaults to ``False``.
28692874 preemptive_threshold (:obj:`float`, optional): a value between 0.0 and 1.0 that specifies the ratio of workers
0 commit comments