(
    md_sources,
    md_version,
    meta_split,
    shuffle_seed=None,
    source_sampling_seed=None,
    data_dir=None,
    version=None,
    **as_dataset_kwargs)
return tf.data.Dataset.sample_from_datasets(
      episode_datasets, seed=source_sampling_seed)
Creates a Meta-Dataset dataset.

  This function creates an episode dataset for all sources in `md_sources`. For
  single-source pipelines, use the `episode_dataset` function.

  Args:
    md_sources: data sources from which to draw episodes.
    md_version: Meta-Dataset md_version in {'v1', 'v2'}.
    meta_split: meta-split (case-insensitive) in {'train', 'valid', 'test'}.
    shuffle_seed: class dataset shuffle buffer seed.
    source_sampling_seed: random seed for source sampling.
    data_dir: TFDS data directory.
    version: dataset version at which to load the data. Note that this refers
      to the dataset implementation version, and is **not** the same as
      the benchmark verion (either 'v1' or 'v2').
    **as_dataset_kwargs: kwargs passed to the `as_dataset` method.

  Returns:
    The episode dataset.
Creates a Meta-Dataset dataset.
Creates a Meta - Dataset dataset .
def meta_dataset(
    md_sources,
    md_version,
    meta_split,
    shuffle_seed=None,
    source_sampling_seed=None,
    data_dir=None,
    version=None,
    **as_dataset_kwargs):
  """Creates a Meta-Dataset dataset.

  This function creates an episode dataset for all sources in `md_sources`. For
  single-source pipelines, use the `episode_dataset` function.

  Args:
    md_sources: data sources from which to draw episodes.
    md_version: Meta-Dataset md_version in {'v1', 'v2'}.
    meta_split: meta-split (case-insensitive) in {'train', 'valid', 'test'}.
    shuffle_seed: class dataset shuffle buffer seed.
    source_sampling_seed: random seed for source sampling.
    data_dir: TFDS data directory.
    version: dataset version at which to load the data. Note that this refers
      to the dataset implementation version, and is **not** the same as
      the benchmark verion (either 'v1' or 'v2').
    **as_dataset_kwargs: kwargs passed to the `as_dataset` method.

  Returns:
    The episode dataset.
  """
  episode_datasets = []
  # If a shuffle seed is passed, we split it into `len(md_sources)` independent
  # shufle seeds so that each episode dataset's randomness shuffle buffer is
  # seeded differently.
  shuffle_seeds = ([None] * len(md_sources) if shuffle_seed is None else
                   tfre.stateless_split(create_rng_state(shuffle_seed),
                                        len(md_sources)))
  for source_id, (source, seed) in enumerate(zip(md_sources, shuffle_seeds)):
    seed = None if seed is None else seed[0]
    episode_datasets.append(
        episode_dataset(
            builder=meta_dataset_lib.MetaDataset(
                data_dir=data_dir,
                config=source,
                version=version),
            md_version=md_version,
            meta_split=meta_split,
            source_id=source_id,
            shuffle_seed=seed,
            **as_dataset_kwargs)
    )
  return tf.data.Dataset.sample_from_datasets(
      episode_datasets, seed=source_sampling_seed)
def meta_dataset ( md_sources , md_version , meta_split , shuffle_seed = None , source_sampling_seed = None , data_dir = None , version = None , * * as_dataset_kwargs ) : episode_datasets = [ ] # If a shuffle seed is passed, we split it into `len(md_sources)` independent # shufle seeds so that each episode dataset's randomness shuffle buffer is # seeded differently. shuffle_seeds = ( [ None ] * len ( md_sources ) if shuffle_seed is None else tfre . stateless_split ( create_rng_state ( shuffle_seed ) , len ( md_sources ) ) ) for source_id , ( source , seed ) in enumerate ( zip ( md_sources , shuffle_seeds ) ) : seed = None if seed is None else seed [ 0 ] episode_datasets . append ( episode_dataset ( builder = meta_dataset_lib . MetaDataset ( data_dir = data_dir , config = source , version = version ) , md_version = md_version , meta_split = meta_split , source_id = source_id , shuffle_seed = seed , * * as_dataset_kwargs ) ) return tf . data . Dataset . sample_from_datasets ( episode_datasets , seed = source_sampling_seed )