@@ -242,8 +242,8 @@ class Loader(abc.ABC, cebra.io.HasDevice):
242242
243243 num_negatives : int = dataclasses .field (
244244 default = None ,
245- doc = """ The number of negative samples to draw for each reference.
246- If not specified, the batch size is used."""
245+ doc = ( " The number of negative samples to draw for each reference. "
246+ " If not specified, the batch size is used."),
247247 )
248248
249249 def __post_init__ (self ):
@@ -273,23 +273,23 @@ def __iter__(self) -> Iterator[Batch]:
273273 yield self .dataset .load_batch (index )
274274
275275 @abc .abstractmethod
276- def get_indices (self ):
276+ def get_indices (self , num_samples : int = None ):
277277 """Sample and return the specified number of indices.
278278
279279 The elements of the returned `BatchIndex` will be used to index the
280280 `dataset` of this data loader.
281281
282282 Args:
283- num_samples: The size of each of the reference, positive and
284- negative samples .
283+ num_samples: Deprecated. Use ``batch_size`` on the instance level
284+ instead .
285285
286286 Returns:
287287 batch indices for the reference, positive and negative sample.
288288
289-
290289 Note:
291- From version 0.7.0 onwards, specifying the ``num_samples`` and
292- ``num_negatives`` directly was deprecated. Please set these
293- variables via the attributes ``batch_size`` and ``num_negatives``.
290+ From version 0.7.0 onwards, specifying the ``num_samples``
291+ directly is deprecated and will be removed in version 0.8.0.
292+ Please set ``batch_size`` and ``num_negatives`` on the instance
293+ level instead.
294294 """
295295 raise NotImplementedError ()
0 commit comments