class_docstr: Sharding spec describes how to shard a tensor with dim_size dimensions. The sharding sequence looks like
  [R, R, S0, S1], which means
  
  Argument:
      dim_partition_dict(Dict[int, List[int]], optional): The key is the dimension of tensor to be sharded,
          and the value of the key describe which logical axis will be sharded in that dimension.
      sharding_sequence(List[DimSpec], optional): A straight view of ShardingSpec looks like [R, R, S0, S1].
class_docstr_tok: ["Sharding","spec","describes","how","to","shard","a","tensor","with","dim_size","dimensions",".","The","sharding","sequence","looks","like","[","R",",","R",",","S0",",","S1","]",",","which","means","Argument",":","dim_partition_dict","(","Dict","[","int",",","List","[","int","]","]",",","optional",")",":","The","key","is","the","dimension","of","tensor","to","be","sharded",",","and","the","value","of","the","key","describe","which","logical","axis","will","be","sharded","in","that","dimension",".","sharding_sequence","(","List","[","DimSpec","]",",","optional",")",":","A","straight","view","of","ShardingSpec","looks","like","[","R",",","R",",","S0",",","S1","]","."]
docstr: Convert dim_partition_dict into list of DimSpec, and assign it to sharding_sequence.
docstr_tok: ["Convert","dim_partition_dict","into","list","of","DimSpec",",","and","assign","it","to","sharding_sequence","."]
code: def convert_dict_to_shard_sequence(self):
      """
      Convert dim_partition_dict into list of DimSpec, and assign it to sharding_sequence.
      """
      sharding_sequence = [DimSpec([])] * self.dims
      for dim, shard_list in self.dim_partition_dict.items():
          sharding_sequence[dim] = DimSpec(shard_list)
      return sharding_sequence
  
file_path: colossalai/colossalai/tensor/d_tensor/sharding_spec.py
imports: from copy import deepcopy
  from typing import Dict, List
  from ..utils import merge_same_dim_mesh_list
  from .misc import ShardingOutOfIndexError
label_desc: Use image node_id 4 for calling the ShardingSpec obj's underlying member method code with example usage: obj.convert_dict_to_shard_sequence() and returns: sharding_sequence