class_docstr: Builder class for the BlendedDataset and MegatronDataset classes
  
  Args:
      cls (Type[MegatronDataset]): The class to instantiate, must inherit from MegatronDataset
  
      sizes (List[int]): The minimum number of total samples to draw from each split, varies
      with blend
  
      config (BlendedMegatronDatasetConfig): The config object which informs dataset creation
class_docstr_tok: ["Builder","class","for","the","BlendedDataset","and","MegatronDataset","classes","Args",":","cls","(","Type","[","MegatronDataset","]",")",":","The","class","to","instantiate",",","must","inherit","from","MegatronDataset","sizes","(","List","[","int","]",")",":","The","minimum","number","of","total","samples","to","draw","from","each","split",",","varies","with","blend","config","(","BlendedMegatronDatasetConfig",")",":","The","config","object","which","informs","dataset","creation"]
docstr: Build all dataset splits according to the provided blend(s)
  
  This method is distributed-aware and must be called on all ranks.
  
  The dataset splits returned can vary according to the config. Supply config.blend and
  config.split to build BlendedDataset and/or MegatronDataset splits from the same
  distribution. Supply config.blend_per_split to build BlendedDataset and/or MegatronDataset
  splits from separate distributions.
  
  Returns:
      List[Optional[Union[BlendedDataset, MegatronDataset]]]: A list of either
      MegatronDataset or BlendedDataset (or None) per split
docstr_tok: ["Build","all","dataset","splits","according","to","the","provided","blend","(","s",")","This","method","is","distributed-aware","and","must","be","called","on","all","ranks",".","The","dataset","splits","returned","can","vary","according","to","the","config",".","Supply","config.blend","and","config.split","to","build","BlendedDataset","and\/or","MegatronDataset","splits","from","the","same","distribution",".","Supply","config.blend_per_split","to","build","BlendedDataset","and\/or","MegatronDataset","splits","from","separate","distributions",".","Returns",":","List","[","Optional","[","Union","[","BlendedDataset",",","MegatronDataset","]","]","]",":","A","list","of","either","MegatronDataset","or","BlendedDataset","(","or","None",")","per","split"]
code: def build(
      self,
  ) -> List[Optional[Union[BlendedDataset, MegatronDataset]]]:
      """Build all dataset splits according to the provided blend(s)
  
      This method is distributed-aware and must be called on all ranks.
  
      The dataset splits returned can vary according to the config. Supply config.blend and
      config.split to build BlendedDataset and/or MegatronDataset splits from the same
      distribution. Supply config.blend_per_split to build BlendedDataset and/or MegatronDataset
      splits from separate distributions.
  
      Returns:
          List[Optional[Union[BlendedDataset, MegatronDataset]]]: A list of either
          MegatronDataset or BlendedDataset (or None) per split
      """
      return self._build_blended_dataset_splits()
  
file_path: megatron-lm/megatron/core/datasets/blended_megatron_dataset_builder.py
imports: import logging
  import math
  from typing import Any, Callable, List, Optional, Tuple, Type, Union
  import numpy
  import torch
  from megatron.core.datasets.blended_dataset import BlendedDataset
  from megatron.core.datasets.blended_megatron_dataset_config import BlendedMegatronDatasetConfig
  from megatron.core.datasets.indexed_dataset import MMapIndexedDataset
  from megatron.core.datasets.megatron_dataset import MegatronDataset
  from megatron.core.datasets.utils import Split, normalize
label_desc: Use image node_id 2 for calling the BlendedMegatronDatasetBuilder obj's underlying member method code with example usage: obj.build() and returns: self