class_docstr: The ``HfTrainerDeepSpeedConfig`` object is meant to be created during ``TrainingArguments`` object creation and has
  the same lifespan as the latter.
class_docstr_tok: ["The","``","HfTrainerDeepSpeedConfig","``","object","is","meant","to","be","created","during","``","TrainingArguments","``","object","creation","and","has","the","same","lifespan","as","the","latter","."]
docstr: A utility method that massages the config file and can optionally verify that the values match.
  
  1. Replace "auto" values with ``TrainingArguments`` value.
  
  2. If it wasn't "auto" and ``must_match`` is true, then check that DS config matches Trainer
  config values and if mismatched add the entry to ``self.mismatched`` - will assert during
  ``trainer_config_finalize`` for one or more mismatches.
docstr_tok: ["A","utility","method","that","massages","the","config","file","and","can","optionally","verify","that","the","values","match",".","1",".","Replace","``","auto","''","values","with","``","TrainingArguments","``","value",".","2",".","If","it","was","n't","``","auto","''","and","``","must_match","``","is","true",",","then","check","that","DS","config","matches","Trainer","config","values","and","if","mismatched","add","the","entry","to","``","self.mismatched","``","-","will","assert","during","``","trainer_config_finalize","``","for","one","or","more","mismatches","."]
code: def fill_match(
      self, ds_key_long, hf_val, hf_key=None, must_match=True
  ):
      """
      A utility method that massages the config file and can optionally verify that the values match.
  
      1. Replace "auto" values with ``TrainingArguments`` value.
  
      2. If it wasn't "auto" and ``must_match`` is true, then check that DS config matches Trainer
      config values and if mismatched add the entry to ``self.mismatched`` - will assert during
      ``trainer_config_finalize`` for one or more mismatches.
  
      """
      config, ds_key = self.find_config_node(ds_key_long)
      if config is None:
          return
  
      if config.get(ds_key) == "auto":
          config[ds_key] = hf_val
          return
  
      if not must_match:
          return
  
      ds_val = config.get(ds_key)
      if ds_val is not None and ds_val != hf_val:
          self.mismatches.append(
              f"- ds {ds_key_long}={ds_val} vs hf {hf_key}={hf_val}"
          )
  
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 3 for calling the HfTrainerDeepSpeedConfig obj's underlying member method code with example usage: obj.fill_match(ds_key_long, hf_val, hf_key, must_match) without return types