(train_datasets='',
                                  eval_datasets='',
                                  use_dumped_episodes=False,
                                  restrict_classes=None,
                                  restrict_num_per_class=None)
return train_datasets, eval_datasets, restrict_classes, restrict_num_per_class
Gets the list of dataset names and possible restrictions on their classes.

  Args:
    train_datasets: A string of comma-separated dataset names for training.
    eval_datasets: A string of comma-separated dataset names for evaluation.
    use_dumped_episodes: bool, if True `eval_datasets` are prefixed with
      `dumped` to trigger evaluation on dumped episodes instead of on the fly
      sampling.
    restrict_classes: If provided, a dict that maps dataset names to a dict that
      specifies for each of `TRAIN_SPLIT`, `VALID_SPLIT` and `TEST_SPLIT` the
      number of classes to restrict to. This can lead to some classes of a
      particular split of a particular dataset never participating in episode
      creation.
    restrict_num_per_class: If provided, a dict that maps dataset names to a
      dict that specifies for each of `meta_dataset.trainer.TRAIN_SPLIT`,
      `meta_dataset.trainer.VALID_SPLIT` and `meta_dataset.trainer.TEST_SPLIT`
      the number of examples per class to restrict to. For datasets / splits
      that are not specified, no restriction is applied.

  Returns:
    Two lists of dataset names and two possibly empty dictionaries.
Gets the list of dataset names and possible restrictions on their classes.
Gets the list of dataset names and possible restrictions on their classes .
def get_datasets_and_restrictions(train_datasets='',
                                  eval_datasets='',
                                  use_dumped_episodes=False,
                                  restrict_classes=None,
                                  restrict_num_per_class=None):
  """Gets the list of dataset names and possible restrictions on their classes.

  Args:
    train_datasets: A string of comma-separated dataset names for training.
    eval_datasets: A string of comma-separated dataset names for evaluation.
    use_dumped_episodes: bool, if True `eval_datasets` are prefixed with
      `dumped` to trigger evaluation on dumped episodes instead of on the fly
      sampling.
    restrict_classes: If provided, a dict that maps dataset names to a dict that
      specifies for each of `TRAIN_SPLIT`, `VALID_SPLIT` and `TEST_SPLIT` the
      number of classes to restrict to. This can lead to some classes of a
      particular split of a particular dataset never participating in episode
      creation.
    restrict_num_per_class: If provided, a dict that maps dataset names to a
      dict that specifies for each of `meta_dataset.trainer.TRAIN_SPLIT`,
      `meta_dataset.trainer.VALID_SPLIT` and `meta_dataset.trainer.TEST_SPLIT`
      the number of examples per class to restrict to. For datasets / splits
      that are not specified, no restriction is applied.

  Returns:
    Two lists of dataset names and two possibly empty dictionaries.
  """
  if restrict_classes is None:
    restrict_classes = {}
  if restrict_num_per_class is None:
    restrict_num_per_class = {}

  train_datasets = [d.strip() for d in train_datasets.split(',')]
  eval_datasets = [d.strip() for d in eval_datasets.split(',')]
  if use_dumped_episodes:
    eval_datasets = ['dumped_%s' % ds for ds in eval_datasets]
  return train_datasets, eval_datasets, restrict_classes, restrict_num_per_class
def get_datasets_and_restrictions ( train_datasets = '' , eval_datasets = '' , use_dumped_episodes = False , restrict_classes = None , restrict_num_per_class = None ) : if restrict_classes is None : restrict_classes = { } if restrict_num_per_class is None : restrict_num_per_class = { } train_datasets = [ d . strip ( ) for d in train_datasets . split ( ',' ) ] eval_datasets = [ d . strip ( ) for d in eval_datasets . split ( ',' ) ] if use_dumped_episodes : eval_datasets = [ 'dumped_%s' % ds for ds in eval_datasets ] return train_datasets , eval_datasets , restrict_classes , restrict_num_per_class