class_docstr: This object contains a DeepSpeed configuration dictionary and can be quickly queried for things like zero stage.
  
  A ``weakref`` of this object is stored in the module's globals to be able to access the config from areas where
  things like the Trainer object is not available (e.g. ``from_pretrained`` and ``_get_resized_embeddings``).
  Therefore it's important that this object remains alive while the program is still running.
  
  :class:`~transformers.Trainer` uses the ``HfTrainerDeepSpeedConfig`` subclass instead. That subclass has logic to
  sync the configuration with values of :class:`~transformers.TrainingArguments` by replacing special placeholder
  values: ``"auto"``. Without this special logic the DeepSpeed configuration is not modified in any way.
  
  Args:
      config_file_or_dict (:obj:`Union[str, Dict]`): path to DeepSpeed config file or dict.
class_docstr_tok: ["This","object","contains","a","DeepSpeed","configuration","dictionary","and","can","be","quickly","queried","for","things","like","zero","stage",".","A","``","weakref","``","of","this","object","is","stored","in","the","module","'s","globals","to","be","able","to","access","the","config","from","areas","where","things","like","the","Trainer","object","is","not","available","(","e.g",".","``","from_pretrained","``","and","``","_get_resized_embeddings","``",")",".","Therefore","it","'s","important","that","this","object","remains","alive","while","the","program","is","still","running",".",":","class",":","`","~transformers.Trainer","`","uses","the","``","HfTrainerDeepSpeedConfig","``","subclass","instead",".","That","subclass","has","logic","to","sync","the","configuration","with","values","of",":","class",":","`","~transformers.TrainingArguments","`","by","replacing","special","placeholder","values",":","``","``","auto","''","``",".","Without","this","special","logic","the","DeepSpeed","configuration","is","not","modified","in","any","way",".","Args",":","config_file_or_dict","(",":","obj",":","`","Union","[","str",",","Dict","]","`",")",":","path","to","DeepSpeed","config","file","or","dict","."]
code: def is_zero2(self):
      return self._stage == 2
  
imports: import importlib.util
  import io
  import json
  import weakref
  from copy import deepcopy
  from functools import partialmethod
  from .utils.versions import require_version
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP.core.log import logger
label_desc: Use image node_id 6 for calling the HfDeepSpeedConfig obj's underlying member method code with example usage: obj.is_zero2() and returns: unknown