code: def get_configurable_parameters(
      model_name: str | None = None,
      config_path: Path | str | None = None,
      weight_file: str | None = None,
      config_filename: str | None = "config",
      config_file_extension: str | None = "yaml",
  ) -> DictConfig | ListConfig:
      """Get configurable parameters.
  
      Args:
          model_name: str | None:  (Default value = None)
          config_path: Path | str | None:  (Default value = None)
          weight_file: Path to the weight file
          config_filename: str | None:  (Default value = "config")
          config_file_extension: str | None:  (Default value = "yaml")
  
      Returns:
          DictConfig | ListConfig: Configurable parameters in DictConfig object.
      """
      if model_name is None is config_path:
          raise ValueError(
              "Both model_name and model config path cannot be None! "
              "Please provide a model name or path to a config file!"
          )
  
      if model_name == "efficientad":
          warnings.warn(
              "`efficientad` is deprecated as --model. Please use `efficient_ad` instead.",
              DeprecationWarning,
          )
          model_name = "efficient_ad"
  
      if config_path is None:
          config_path = Path(
              f"src/anomalib/models/{model_name}/{config_filename}.{config_file_extension}"
          )
  
      config = OmegaConf.load(config_path)
  
      # keep track of the original config file because it will be modified
      config_original: DictConfig = config.copy()
  
      # if the seed value is 0, notify a user that the behavior of the seed value zero has been changed.
      if config.project.get("seed") == 0:
          warn(
              "The seed value is now fixed to 0. "
              "Up to v0.3.7, the seed was not fixed when the seed value was set to 0. "
              "If you want to use the random seed, please select `None` for the seed value "
              "(`null` in the YAML file) or remove the `seed` key from the YAML file."
          )
  
      config = update_datasets_config(config)
      config = update_input_size_config(config)
  
      # Project Configs
      project_path = (
          Path(config.project.path)
          / config.model.name
          / config.dataset.name
      )
  
      if config.dataset.format == "folder":
          if "mask" in config.dataset:
              warn(
                  DeprecationWarning(
                      "mask will be deprecated in favor of mask_dir in config.dataset in a future release."
                  )
              )
              config.dataset.mask_dir = config.dataset.mask
          if "path" in config.dataset:
              warn(
                  DeprecationWarning(
                      "path will be deprecated in favor of root in config.dataset in a future release."
                  )
              )
              config.dataset.root = config.dataset.path
  
      # add category subfolder if needed
      if config.dataset.format.lower() in ("btech", "mvtec", "visa"):
          project_path = project_path / config.dataset.category
  
      # set to False by default for backward compatibility
      config.project.setdefault("unique_dir", False)
  
      if config.project.unique_dir:
          project_path = (
              project_path / f"run.{_get_now_str(time.time())}"
          )
  
      else:
          project_path = project_path / "run"
          warn(
              "config.project.unique_dir is set to False. "
              "This does not ensure that your results will be written in an empty directory and you may overwrite files."
          )
  
      (project_path / "weights").mkdir(parents=True, exist_ok=True)
      (project_path / "images").mkdir(parents=True, exist_ok=True)
      # write the original config for eventual debug (modified config at the end of the function)
      (project_path / "config_original.yaml").write_text(
          OmegaConf.to_yaml(config_original)
      )
  
      config.project.path = str(project_path)
  
      # loggers should write to results/model/dataset/category/ folder
      config.trainer.default_root_dir = str(project_path)
  
      if weight_file:
          config.trainer.resume_from_checkpoint = weight_file
  
      config = update_nncf_config(config)
  
      # thresholding
      if "metrics" in config.keys():
          # NOTE: Deprecate this once the new CLI is implemented.
          if "adaptive" in config.metrics.threshold.keys():
              warn(
                  DeprecationWarning(
                      "adaptive will be deprecated in favor of method in config.metrics.threshold in a future release"
                  )
              )
              config.metrics.threshold.method = (
                  "adaptive"
                  if config.metrics.threshold.adaptive
                  else "manual"
              )
          if "image_default" in config.metrics.threshold.keys():
              warn(
                  DeprecationWarning(
                      "image_default will be deprecated in favor of manual_image in config.metrics.threshold in a future "
                      "release."
                  )
              )
              config.metrics.threshold.manual_image = (
                  None
                  if config.metrics.threshold.adaptive
                  else config.metrics.threshold.image_default
              )
          if "pixel_default" in config.metrics.threshold.keys():
              warn(
                  DeprecationWarning(
                      "pixel_default will be deprecated in favor of manual_pixel in config.metrics.threshold in a future "
                      "release."
                  )
              )
              config.metrics.threshold.manual_pixel = (
                  None
                  if config.metrics.threshold.adaptive
                  else config.metrics.threshold.pixel_default
              )
  
      (project_path / "config.yaml").write_text(
          OmegaConf.to_yaml(config)
      )
  
      return config
  
file_path: anomalib/src/anomalib/config/config.py
imports: from __future__ import annotations
  import time
  import warnings
  from datetime import datetime
  from pathlib import Path
  from warnings import warn
  from omegaconf import DictConfig, ListConfig, OmegaConf
  from anomalib.data.utils import TestSplitMode, ValSplitMode
label_desc: Use image node_id 6 for calling a global function with example usage: get_configurable_parameters(model_name, config_path, weight_file, config_filename, config_file_extension) and returns: config