docstr: Tests that the default value for max_new_tokens is respected when explicitly set in the config.
docstr_tok: ["Tests","that","the","default","value","for","max_new_tokens","is","respected","when","explicitly","set","in","the","config","."]
code: def test_max_new_tokens_override_no_changes_to_max_new_tokens(self):
      """Tests that the default value for max_new_tokens is respected when explicitly set in the config."""
      config = {
          MODEL_TYPE: MODEL_LLM,
          BASE_MODEL: "HuggingFaceH4/tiny-random-LlamaForCausalLM",
          INPUT_FEATURES: [{NAME: "text_input", TYPE: "text"}],
          # Default value for generation.max_sequence_length is 32
          OUTPUT_FEATURES: [{NAME: "text_output", TYPE: "text"}],
          "generation": {"max_new_tokens": 64},
      }
  
      config_obj = ModelConfig.from_dict(config)
      assert config_obj.generation.max_new_tokens == 64
  
imports: import os
  from tempfile import TemporaryDirectory
  from typing import Any, Dict, Optional, Union
  import pytest
  import yaml
  from ludwig.constants import ACTIVE, BASE_MODEL, CLIP, COLUMN, COMBINER, DECODER, DEFAULT_VALIDATION_METRIC, DEFAULTS, DEPENDENCIES, ENCODER, HYPEROPT, INPUT_FEATURES, INPUT_SIZE, LOSS, MODEL_ECD, MODEL_GBM, MODEL_LLM, MODEL_TYPE, NAME, NUM_CLASSES, OPTIMIZER, OUTPUT_FEATURES, PREPROCESSING, PROC_COLUMN, REDUCE_DEPENDENCIES, REDUCE_INPUT, TIED, TRAINER, TYPE
  from ludwig.error import ConfigValidationError
  from ludwig.schema.decoders.base import ClassifierConfig
  from ludwig.schema.encoders.text_encoders import BERTConfig
  from ludwig.schema.features.augmentation.image import RandomBlurConfig, RandomRotateConfig
  from ludwig.schema.features.image_feature import AUGMENTATION_DEFAULT_OPERATIONS
  from ludwig.schema.features.number_feature import NumberOutputFeatureConfig
  from ludwig.schema.features.text_feature import TextOutputFeatureConfig
  from ludwig.schema.llms.quantization import QuantizationConfig
  from ludwig.schema.model_config import ModelConfig
  from ludwig.schema.utils import BaseMarshmallowConfig, convert_submodules
label_desc: Use image node_id 1 for calling the TestMaxNewTokensOverride obj's underlying member method code with example usage: obj.test_max_new_tokens_override_no_changes_to_max_new_tokens() without return types