class_docstr: Call local models
class_docstr_tok: ["Call","local","models"]
docstr: Op inputs -> triton_model_inputs -> call_model -> triton_outputs -> op_outputs
  
  Args:
      model_name: str
      request_data: List[any]
         towhee_types data
  
      output_schema: List[any]
         the outputs of model, describe the towhee types.
  returns:
      Op results: List
docstr_tok: ["Op","inputs","-",">","triton_model_inputs","-",">","call_model","-",">","triton_outputs","-",">","op_outputs","Args",":","model_name",":","str","request_data",":","List","[","any","]","towhee_types","data","output_schema",":","List","[","any","]","the","outputs","of","model",",","describe","the","towhee","types",".","returns",":","Op","results",":","List"]
code: def call_model(
      self,
      model_name: str,
      request_data: List[any],
      output_schema: List[any],
  ) -> any:
      """
      Op inputs -> triton_model_inputs -> call_model -> triton_outputs -> op_outputs
  
      Args:
          model_name: str
          request_data: List[any]
             towhee_types data
  
          output_schema: List[any]
             the outputs of model, describe the towhee types.
      returns:
          Op results: List
      """
      # op inputs to triton model inputs
      nps = []
      for item in request_data:
          nps.extend(type_util.to_numpy_data(item))
      infers = self.gen_inputs(nps, "INPUT")
  
      # call model
      result = self._client.infer(model_name, infers)
  
      # triton_outputs to op_outputs
      return type_util.client_result_to_op_data(result, output_schema)
  
file_path: towhee/towhee/serve/triton/bls/caller/local_caller.py
imports: from typing import List
  import queue
  from towhee.serve.triton.bls.utils import type_util
  from towhee.serve.triton.bls.mock import mock_triton_client
  from towhee.utils.tritonclient_utils import np_to_triton_dtype
label_desc: Use image node_id 1 for calling the LocalCaller obj's underlying member method code with example usage: obj.call_model(model_name, request_data, output_schema) and returns: type_util