class_docstr: Sampler that restricts data loading to a subset of the dataset.
  
  It is especially useful in conjunction with
  :class:`torch.nn.parallel.DistributedDataParallel`. In such case, each
  process can pass a DistributedSampler instance as a DataLoader sampler,
  and load a subset of the original dataset that is exclusive to it.
  
  .. note::
      Dataset is assumed to be of constant size.
  
  Arguments:
      dataset: Dataset used for sampling.
      num_replicas (optional): Number of processes participating in
          distributed training.
      rank (optional): Rank of the current process within num_replicas.
class_docstr_tok: ["Sampler","that","restricts","data","loading","to","a","subset","of","the","dataset",".","It","is","especially","useful","in","conjunction","with",":","class",":","`","torch.nn.parallel.DistributedDataParallel","`",".","In","such","case",",","each","process","can","pass","a","DistributedSampler","instance","as","a","DataLoader","sampler",",","and","load","a","subset","of","the","original","dataset","that","is","exclusive","to","it",".","..","note",":",":","Dataset","is","assumed","to","be","of","constant","size",".","Arguments",":","dataset",":","Dataset","used","for","sampling",".","num_replicas","(","optional",")",":","Number","of","processes","participating","in","distributed","training",".","rank","(","optional",")",":","Rank","of","the","current","process","within","num_replicas","."]
code: def set_epoch(self, epoch):
      self.epoch = epoch
  
file_path: insightface/detection/scrfd/mmdet/datasets/samplers/group_sampler.py
imports: from __future__ import division
  import math
  import numpy
  import torch
  from mmcv.runner import get_dist_info
  from torch.utils.data import Sampler
label_desc: Use image node_id 4 for calling the DistributedGroupSampler obj's underlying member method code with example usage: obj.set_epoch(epoch) without return types