class_docstr: Implementation of a model for inference composable with ragged batching.
class_docstr_tok: ["Implementation","of","a","model","for","inference","composable","with","ragged","batching","."]
docstr: The rank of the current process.
  
  # TODO(cmikeh2): Kind of a hack right now, but this is too verbose to use at
  the frequency we need.
docstr_tok: ["The","rank","of","the","current","process",".","#","TODO","(","cmikeh2",")",":","Kind","of","a","hack","right","now",",","but","this","is","too","verbose","to","use","at","the","frequency","we","need","."]
code: def tp_rank(self) -> int:
      """
      The rank of the current process.
  
      # TODO(cmikeh2): Kind of a hack right now, but this is too verbose to use at
      the frequency we need.
      """
      return dist.get_rank(group=self._base_mp_group)
  
imports: from abc import ABC, abstractmethod
  from typing import Iterable, Optional, Tuple, Type
  import torch
  import deepspeed.comm
  from ..ragged import DSStateManager, RaggedBatchWrapper
  from ..ragged.manager_configs import KVCacheConfig
  from ..ragged import DSSequenceDescriptor
  from ..model_implementations.layer_container_base import LayerContainer
  from ..config_v2 import RaggedInferenceEngineConfig
  from .flat_model_helpers import ModelMetadata
label_desc: Use image node_id 5 for calling the DSInferenceModelBase obj's underlying member method code with example usage: obj.tp_rank() and returns: dist