class_docstr: A class that determines how to order instances within an epoch.
  This is used by the `MultiTaskDataLoader`. The main operation performed by this class is to
  take a dictionary of instance iterators, one for each dataset, and combine them into an
  iterator of batches, based on some scheduling algorithm (such as round robin, randomly choosing
  between available datasets, etc.). To control this behavior as training progresses, there is an
  `update_from_epoch_metrics` method available, which should be called from a `Callback` during
  training.  Not all `MultiTaskSchedulers` will implement this method.
class_docstr_tok: ["A","class","that","determines","how","to","order","instances","within","an","epoch",".","This","is","used","by","the","`","MultiTaskDataLoader","`",".","The","main","operation","performed","by","this","class","is","to","take","a","dictionary","of","instance","iterators",",","one","for","each","dataset",",","and","combine","them","into","an","iterator","of","batches",",","based","on","some","scheduling","algorithm","(","such","as","round","robin",",","randomly","choosing","between","available","datasets",",","etc.",")",".","To","control","this","behavior","as","training","progresses",",","there","is","an","`","update_from_epoch_metrics","`","method","available",",","which","should","be","called","from","a","`","Callback","`","during","training",".","Not","all","`","MultiTaskSchedulers","`","will","implement","this","method","."]
docstr: In case you want to set the behavior of the scheduler based on current epoch metrics, you
  can do that by calling this method from a `Callback`.  If your scheduling technique does not
  depend on epoch metrics, you do not need to implement this method.
docstr_tok: ["In","case","you","want","to","set","the","behavior","of","the","scheduler","based","on","current","epoch","metrics",",","you","can","do","that","by","calling","this","method","from","a","`","Callback","`",".","If","your","scheduling","technique","does","not","depend","on","epoch","metrics",",","you","do","not","need","to","implement","this","method","."]
code: def update_from_epoch_metrics(
      self, epoch_metrics: Dict[str, Any]
  ) -> None:
      """
      In case you want to set the behavior of the scheduler based on current epoch metrics, you
      can do that by calling this method from a `Callback`.  If your scheduling technique does not
      depend on epoch metrics, you do not need to implement this method.
      """
      raise NotImplementedError
  
imports: from collections import defaultdict
  from typing import Any, Dict, Iterable, Union, List, Mapping
  import more_itertools
  from allennlp.common.registrable import Registrable
  from allennlp.data.instance import Instance
label_desc: Use image node_id 2 for calling the MultiTaskScheduler obj's underlying member method code with example usage: obj.update_from_epoch_metrics(epoch_metrics) without return types