class_docstr: Samples from every dataset according to its size.  This will have essentially the same effect as
  using all of the data at every epoch, but it lets you control for number of instances per epoch,
  if you want to do that.  This requires that all data loaders have a `__len__` (which means no
  lazy loading).  If you need this functionality with lazy loading, implement your own sampler
  that takes dataset sizes as a constructor parameter.
  
  Registered as a `MultiTaskEpochSampler` with name "proportional".
class_docstr_tok: ["Samples","from","every","dataset","according","to","its","size",".","This","will","have","essentially","the","same","effect","as","using","all","of","the","data","at","every","epoch",",","but","it","lets","you","control","for","number","of","instances","per","epoch",",","if","you","want","to","do","that",".","This","requires","that","all","data","loaders","have","a","`","__len__","`","(","which","means","no","lazy","loading",")",".","If","you","need","this","functionality","with","lazy","loading",",","implement","your","own","sampler","that","takes","dataset","sizes","as","a","constructor","parameter",".","Registered","as","a","`","MultiTaskEpochSampler","`","with","name","``","proportional","''","."]
code: def get_task_proportions(
      self, data_loaders: Mapping[str, DataLoader]
  ) -> Dict[str, float]:
      try:
          sizes = {
              key: len(loader) for key, loader in data_loaders.items()
          }
      except TypeError:
          raise ValueError(
              "ProportionalSampler got passed a data loader without a length"
          )
      total_size = sum(sizes.values())
      return {key: size / total_size for key, size in sizes.items()}
  
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 for calling the ProportionalSampler obj's underlying member method code with example usage: obj.get_task_proportions(data_loaders) and returns: unknown