@@ -99,6 +99,7 @@ class ReplayBuffer:
9999 is used with PyTree structures (see example below).
100100 batch_size (int, optional): the batch size to be used when sample() is
101101 called.
102+
102103 .. note::
103104 The batch-size can be specified at construction time via the
104105 ``batch_size`` argument, or at sampling time. The former should
@@ -108,6 +109,7 @@ class ReplayBuffer:
108109 incompatible with prefetching (since this requires to know the
109110 batch-size in advance) as well as with samplers that have a
110111 ``drop_last`` argument.
112+
111113 dim_extend (int, optional): indicates the dim to consider for
112114 extension when calling :meth:`extend`. Defaults to ``storage.ndim-1``.
113115 When using ``dim_extend > 0``, we recommend using the ``ndim``
@@ -128,6 +130,7 @@ class ReplayBuffer:
128130 >>> for d in data.unbind(1):
129131 ... rb.add(d)
130132 >>> rb.extend(data)
133+
131134 generator (torch.Generator, optional): a generator to use for sampling.
132135 Using a dedicated generator for the replay buffer can allow a fine-grained control
133136 over seeding, for instance keeping the global seed different but the RB seed identical
@@ -582,6 +585,7 @@ def register_save_hook(self, hook: Callable[[Any], Any]):
582585
583586 .. note:: Hooks are currently not serialized when saving a replay buffer: they must
584587 be manually re-initialized every time the buffer is created.
588+
585589 """
586590 self ._storage .register_save_hook (hook )
587591
@@ -926,15 +930,16 @@ class PrioritizedReplayBuffer(ReplayBuffer):
926930 construct a tensordict from the non-tensordict content.
927931 batch_size (int, optional): the batch size to be used when sample() is
928932 called.
929- .. note::
930- The batch-size can be specified at construction time via the
933+
934+ .. note:: The batch-size can be specified at construction time via the
931935 ``batch_size`` argument, or at sampling time. The former should
932936 be preferred whenever the batch-size is consistent across the
933937 experiment. If the batch-size is likely to change, it can be
934938 passed to the :meth:`sample` method. This option is
935939 incompatible with prefetching (since this requires to know the
936940 batch-size in advance) as well as with samplers that have a
937941 ``drop_last`` argument.
942+
938943 dim_extend (int, optional): indicates the dim to consider for
939944 extension when calling :meth:`extend`. Defaults to ``storage.ndim-1``.
940945 When using ``dim_extend > 0``, we recommend using the ``ndim``
@@ -1051,6 +1056,7 @@ class TensorDictReplayBuffer(ReplayBuffer):
10511056 construct a tensordict from the non-tensordict content.
10521057 batch_size (int, optional): the batch size to be used when sample() is
10531058 called.
1059+
10541060 .. note::
10551061 The batch-size can be specified at construction time via the
10561062 ``batch_size`` argument, or at sampling time. The former should
@@ -1060,6 +1066,7 @@ class TensorDictReplayBuffer(ReplayBuffer):
10601066 incompatible with prefetching (since this requires to know the
10611067 batch-size in advance) as well as with samplers that have a
10621068 ``drop_last`` argument.
1069+
10631070 priority_key (str, optional): the key at which priority is assumed to
10641071 be stored within TensorDicts added to this ReplayBuffer.
10651072 This is to be used when the sampler is of type
@@ -1085,6 +1092,7 @@ class TensorDictReplayBuffer(ReplayBuffer):
10851092 >>> for d in data.unbind(1):
10861093 ... rb.add(d)
10871094 >>> rb.extend(data)
1095+
10881096 generator (torch.Generator, optional): a generator to use for sampling.
10891097 Using a dedicated generator for the replay buffer can allow a fine-grained control
10901098 over seeding, for instance keeping the global seed different but the RB seed identical
@@ -1394,6 +1402,7 @@ class TensorDictPrioritizedReplayBuffer(TensorDictReplayBuffer):
13941402 construct a tensordict from the non-tensordict content.
13951403 batch_size (int, optional): the batch size to be used when sample() is
13961404 called.
1405+
13971406 .. note::
13981407 The batch-size can be specified at construction time via the
13991408 ``batch_size`` argument, or at sampling time. The former should
@@ -1403,6 +1412,7 @@ class TensorDictPrioritizedReplayBuffer(TensorDictReplayBuffer):
14031412 incompatible with prefetching (since this requires to know the
14041413 batch-size in advance) as well as with samplers that have a
14051414 ``drop_last`` argument.
1415+
14061416 priority_key (str, optional): the key at which priority is assumed to
14071417 be stored within TensorDicts added to this ReplayBuffer.
14081418 This is to be used when the sampler is of type
@@ -1431,6 +1441,7 @@ class TensorDictPrioritizedReplayBuffer(TensorDictReplayBuffer):
14311441 >>> for d in data.unbind(1):
14321442 ... rb.add(d)
14331443 >>> rb.extend(data)
1444+
14341445 generator (torch.Generator, optional): a generator to use for sampling.
14351446 Using a dedicated generator for the replay buffer can allow a fine-grained control
14361447 over seeding, for instance keeping the global seed different but the RB seed identical
@@ -1669,6 +1680,7 @@ class ReplayBufferEnsemble(ReplayBuffer):
16691680 Defaults to ``None`` (global default generator).
16701681
16711682 .. warning:: As of now, the generator has no effect on the transforms.
1683+
16721684 shared (bool, optional): whether the buffer will be shared using multiprocessing or not.
16731685 Defaults to ``False``.
16741686
0 commit comments