code: def _setup_ludwig_config(
      dataset_fp: str, model_type: str = MODEL_ECD
  ) -> Tuple[Dict, str]:
      input_features = [category_feature(encoder={"vocab_size": 3})]
      output_features = [category_feature(decoder={"vocab_size": 3})]
  
      rel_path = generate_data(
          input_features, output_features, dataset_fp
      )
  
      trainer_cfg = {"learning_rate": 0.001}
      if model_type == MODEL_ECD:
          trainer_cfg["epochs"] = 2
      else:
          trainer_cfg["num_boost_round"] = 2
          # Disable feature filtering to avoid having no features due to small test dataset,
          # see https://stackoverflow.com/a/66405983/5222402
          trainer_cfg["feature_pre_filter"] = False
  
      config = {
          MODEL_TYPE: model_type,
          INPUT_FEATURES: input_features,
          OUTPUT_FEATURES: output_features,
          COMBINER: {TYPE: "concat"},
          TRAINER: trainer_cfg,
      }
  
      config = ModelConfig.from_dict(config).to_dict()
  
      return config, rel_path
  
imports: import json
  import os
  import os.path
  import uuid
  from typing import Dict, Tuple
  import pytest
  from ludwig.backend import initialize_backend
  from ludwig.constants import ACCURACY, AUTO, BATCH_SIZE, CATEGORY, COMBINER, EXECUTOR, HYPEROPT, INPUT_FEATURES, MAX_CONCURRENT_TRIALS, MODEL_ECD, MODEL_GBM, MODEL_TYPE, NAME, OUTPUT_FEATURES, RAY, TEST, TEXT, TRAINER, TRAINING, TYPE, VALIDATION
  from ludwig.globals import HYPEROPT_STATISTICS_FILE_NAME
  from ludwig.hyperopt.results import HyperoptResults
  from ludwig.hyperopt.run import hyperopt
  from ludwig.hyperopt.utils import update_hyperopt_params_with_defaults
  from ludwig.schema.model_config import ModelConfig
  from ludwig.utils import fs_utils
  from ludwig.utils.data_utils import load_json, use_credentials
  from tests.integration_tests.utils import category_feature, generate_data, minio_test_creds, private_param, remote_tmpdir, text_feature
  from ludwig.hyperopt.execution import get_build_hyperopt_executor, RayTuneExecutor
label_desc: Use image node_id 1 for calling a global function with example usage: _setup_ludwig_config(dataset_fp, model_type) and returns: config,  rel_path