class_docstr: This is a distributed event logger class essentially based on :class:`logging`.
  
  Args:
      name (str): The name of the logger.
  
  Note:
      The parallel_mode used in ``info``, ``warning``, ``debug`` and ``error``
      should be concluded in ``ParallelMode``. More details about ``ParallelMode`` could be found
      in `parallel_mode <https://github.com/hpcaitech/ColossalAI/blob/main/colossalai/context/parallel_mode.py>`_.
class_docstr_tok: ["This","is","a","distributed","event","logger","class","essentially","based","on",":","class",":","`","logging","`",".","Args",":","name","(","str",")",":","The","name","of","the","logger",".","Note",":","The","parallel_mode","used","in","``","info","``",",","``","warning","``",",","``","debug","``","and","``","error","``","should","be","concluded","in","``","ParallelMode","``",".","More","details","about","``","ParallelMode","``","could","be","found","in","`","parallel_mode","<","https",":","\/\/github.com\/hpcaitech\/ColossalAI\/blob\/main\/colossalai\/context\/parallel_mode.py",">","`","_","."]
docstr: Log a warning message.
  
  Args:
      message (str): The message to be logged.
      ranks (List[int]): List of parallel ranks.
docstr_tok: ["Log","a","warning","message",".","Args",":","message","(","str",")",":","The","message","to","be","logged",".","ranks","(","List","[","int","]",")",":","List","of","parallel","ranks","."]
code: def warning(self, message: str, ranks: List[int] = None) -> None:
      """Log a warning message.
  
      Args:
          message (str): The message to be logged.
          ranks (List[int]): List of parallel ranks.
      """
      message_prefix = "{}:{} {}".format(*self.__get_call_info())
      self._log("warning", message_prefix, ranks)
      self._log("warning", message, ranks)
  
file_path: colossalai/colossalai/logging/logger.py
imports: import inspect
  import logging
  from pathlib import Path
  from typing import List, Union
  import torch.distributed
label_desc: Use image node_id 9 for calling the DistributedLogger obj's underlying member method code with example usage: obj.warning(message, ranks) without return types