class_docstr: Proposes uniform sharding plans, plans that have the same sharding type for all
  sharding options.
class_docstr_tok: ["Proposes","uniform","sharding","plans",",","plans","that","have","the","same","sharding","type","for","all","sharding","options","."]
code: def load(
      self,
      search_space: List[ShardingOption],
      enumerator: Optional[Enumerator] = None,
  ) -> None:
      self._reset()
      all_fqns = set()
      sharding_options_by_type_and_fqn: Dict[
          str, Dict[str, List[ShardingOption]]
      ] = {}
  
      for sharding_option in search_space:
          sharding_type = sharding_option.sharding_type
          fqn = sharding_option.fqn
          all_fqns.add(fqn)
  
          if sharding_type not in sharding_options_by_type_and_fqn:
              sharding_options_by_type_and_fqn[sharding_type] = {}
          if fqn not in sharding_options_by_type_and_fqn[sharding_type]:
              sharding_options_by_type_and_fqn[sharding_type][fqn] = []
  
          sharding_options_by_type_and_fqn[sharding_type][fqn].append(
              sharding_option
          )
  
      for (
          sharding_options_by_fqn
      ) in sharding_options_by_type_and_fqn.values():
          for sharding_options in sharding_options_by_fqn.values():
              sharding_options.sort(
                  key=lambda x: _sharding_option_score(
                      x, self._use_depth
                  )
              )
  
      for (
          sharding_options_by_fqn
      ) in sharding_options_by_type_and_fqn.values():
          if sharding_options_by_fqn.keys() == all_fqns:
              self._grouped_sharding_options.append(
                  [
                      sorted_sharding_options[0]
                      for sorted_sharding_options in sharding_options_by_fqn.values()
                  ]
              )
  
imports: import copy
  import itertools
  import logging
  from decimal import Decimal
  from typing import cast, Dict, List, Optional, Set, Tuple, Union
  import torch
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel
  from torchrec.distributed.planner.types import Enumerator, Perf, Proposer, ShardingOption, Topology
  from torchrec.distributed.planner.utils import BinarySearchPredicate, bytes_to_gb, prod
label_desc: Use image node_id 2 for calling the UniformProposer obj's underlying member method code with example usage: obj.load(search_space, enumerator) without return types