code: def get_mismatched_config_params(ludwig_results_dir, ludwig_model):
      saved_config_dict = load_json(
          os.path.join(
              ludwig_results_dir,
              "model",
              MODEL_HYPERPARAMETERS_FILE_NAME,
          )
      )
      saved_config_obj = ModelConfig.from_dict(saved_config_dict)
  
      mismatches = []
      for (
          input_feature_config
      ) in saved_config_obj.input_features.to_list():
          feature_name = input_feature_config[NAME]
          encoder_config_from_file = input_feature_config[ENCODER]
          encoder_config_from_model = (
              ludwig_model.model.input_features.get(
                  feature_name
              ).encoder_obj.config.to_dict()
          )
          for k, v in encoder_config_from_model.items():
              # Skip saved_weights_in_checkpoint because this value is not yet set when the global config
              # is modified with the final encoder config.
              if k == "saved_weights_in_checkpoint":
                  continue
  
              if encoder_config_from_file[k] != v:
                  mismatch = {
                      "feature_name": feature_name,
                      "param_name": k,
                      "val_from_file": encoder_config_from_file[k],
                      "val_from_model": v,
                  }
                  mismatches.append(mismatch)
      return mismatches
  
imports: import json
  import os
  from typing import Optional, Type, Union
  from unittest import mock
  import pytest
  import torch
  import ludwig.schema.encoders.utils
  from ludwig.api import LudwigModel
  from ludwig.constants import ENCODER, ENCODER_OUTPUT, MODEL_ECD, NAME, TEXT, TRAINER
  from ludwig.encoders import text_encoders
  from ludwig.error import ConfigValidationError
  from ludwig.globals import MODEL_HYPERPARAMETERS_FILE_NAME
  from ludwig.schema.model_config import ModelConfig
  from ludwig.utils.data_utils import load_json
  from ludwig.utils.torch_utils import get_torch_device
  from tests.integration_tests.parameter_update_utils import check_module_parameters_updated
  from tests.integration_tests.utils import category_feature, clear_huggingface_cache, generate_data, HF_ENCODERS, LocalTestBackend, text_feature
label_desc: Use image node_id 2 for calling a global function with example usage: get_mismatched_config_params(ludwig_results_dir, ludwig_model) and returns: mismatches