class_docstr: Returns a weighted distribution over datasets at every epoch, where every
  task has a weight.
  
  Registered as a `MultiTaskEpochSampler` with name "weighted".
class_docstr_tok: ["Returns","a","weighted","distribution","over","datasets","at","every","epoch",",","where","every","task","has","a","weight",".","Registered","as","a","`","MultiTaskEpochSampler","`","with","name","``","weighted","''","."]
code: def __init__(self, weights: Dict[str, float]):
      self.weights = weights
  
file_path: allennlp/allennlp/data/data_loaders/multitask_epoch_sampler.py
imports: from typing import Any, Dict, Mapping
  from allennlp.common.registrable import Registrable
  from allennlp.data.data_loaders.data_loader import DataLoader
label_desc: Use image node_id 1 to create a new WeightedSampler object from inherited base classes: MultiTaskEpochSampler with example: obj = WeightedSampler(weights)