code: def test_torchscript_preproc_vector_alternative_type(
      tmpdir, csv_filename, vector_type
  ):
      data_csv_path = os.path.join(tmpdir, csv_filename)
      feature = vector_feature()
      input_features = [
          feature,
      ]
      output_features = [
          binary_feature(),
      ]
      backend = LocalTestBackend()
      config = {
          "input_features": input_features,
          "output_features": output_features,
          TRAINER: {"epochs": 2, BATCH_SIZE: 128},
      }
      training_data_csv_path = generate_data(
          input_features, output_features, data_csv_path
      )
  
      # Initialize Ludwig model
      ludwig_model, script_module = initialize_torchscript_module(
          tmpdir, config, backend, training_data_csv_path
      )
  
      # Obtain preprocessed inputs from Python model
      preproc_inputs_expected, _ = preprocess_for_prediction(
          ludwig_model.config_obj.to_dict(),
          training_data_csv_path,
          ludwig_model.training_set_metadata,
          backend=backend,
          include_outputs=False,
      )
  
      df = pd.read_csv(training_data_csv_path)
      inputs = to_inference_module_input_from_dataframe(
          df, config, load_paths=True
      )
  
      def transform_vector_list(vector_list, vector_type):
          vectors = []
          for vector_str in vector_list:
              vectors.append(
                  torch.tensor([float(x) for x in vector_str.split()])
              )
  
          if vector_type == torch.Tensor:
              vectors = torch.stack(vectors)
          return vectors
  
      inputs[feature[NAME]] = transform_vector_list(
          inputs[feature[NAME]], vector_type
      )
  
      preproc_inputs = script_module.preprocessor_forward(inputs)
  
      # Check that preproc_inputs is the same as preproc_inputs_expected.
      for (
          feature_name_expected,
          feature_values_expected,
      ) in preproc_inputs_expected.dataset.items():
          feature_name = feature_name_expected[
              : feature_name_expected.rfind("_")
          ]  # remove proc suffix
          if feature_name not in preproc_inputs.keys():
              continue
  
          feature_values = preproc_inputs[feature_name]
          assert utils.is_all_close(
              feature_values, feature_values_expected
          ), f"feature: {feature_name}"
  
imports: import os
  import shutil
  from copy import deepcopy
  from typing import List
  import numpy
  import pandas
  import pytest
  import torch
  import torchtext
  from ludwig.api import LudwigModel
  from ludwig.backend import RAY
  from ludwig.constants import BATCH_SIZE, COMBINER, EVAL_BATCH_SIZE, LOGITS, NAME, PREDICTIONS, PROBABILITIES, TRAINER
  from ludwig.data.preprocessing import preprocess_for_prediction
  from ludwig.features.number_feature import numeric_transformation_registry
  from ludwig.globals import TRAIN_SET_METADATA_FILE_NAME
  from ludwig.models.inference import to_inference_module_input_from_dataframe
  from ludwig.utils import output_feature_utils
  from ludwig.utils.tokenizers import TORCHSCRIPT_COMPATIBLE_TOKENIZERS
  from tests.integration_tests import utils
  from tests.integration_tests.utils import audio_feature, bag_feature, binary_feature, category_feature, date_feature, generate_data, h3_feature, image_feature, LocalTestBackend, number_feature, sequence_feature, set_feature, text_feature, timeseries_feature, vector_feature
label_desc: Use image node_id 14 for calling a global function with example usage: test_torchscript_preproc_vector_alternative_type(tmpdir, csv_filename, vector_type) and returns: vectors