docstr: Perfrom model inference using async mode.
  
  :param input_data: Input data to be inferenced.
                     Users can put multiple input data in a list or
                     put all data in a DataLoader to infer and get results of all input data.
                     Can be torch.utils.data.dataloader.DataLoader and
                     List[torch.Tensor] or
                     List[List[torch.Tensor]] if the model has multiple inputs.
                     If input_data is a DataLoader object,the format in DataLoader should be
                     (x1, x2, ..., xn, y).
  :param num_requests: Numer of requests in the asynchronous infer requests pool.
                       Each element in input_data will be bound to an idle async
                       infer request in the pool to do inference.
                       Defaults to 0.
                       If 0, it will be set automatically to the optimal number.
  
  :return: A List of torch.Tensor containing result of each input
docstr_tok: ["Perfrom","model","inference","using","async","mode",".",":","param","input_data",":","Input","data","to","be","inferenced",".","Users","can","put","multiple","input","data","in","a","list","or","put","all","data","in","a","DataLoader","to","infer","and","get","results","of","all","input","data",".","Can","be","torch.utils.data.dataloader.DataLoader","and","List","[","torch.Tensor","]","or","List","[","List","[","torch.Tensor","]","]","if","the","model","has","multiple","inputs",".","If","input_data","is","a","DataLoader","object",",","the","format","in","DataLoader","should","be","(","x1",",","x2",",","...",",","xn",",","y",")",".",":","param","num_requests",":","Numer","of","requests","in","the","asynchronous","infer","requests","pool",".","Each","element","in","input_data","will","be","bound","to","an","idle","async","infer","request","in","the","pool","to","do","inference",".","Defaults","to","0",".","If","0",",","it","will","be","set","automatically","to","the","optimal","number",".",":","return",":","A","List","of","torch.Tensor","containing","result","of","each","input"]
code: def async_predict(
      self,
      input_data: Union[
          DataLoader, List[torch.Tensor], List[List[torch.Tensor]]
      ],
      num_requests: int = 0,
  ) -> List[torch.Tensor]:
      """
      Perfrom model inference using async mode.
  
      :param input_data: Input data to be inferenced.
                         Users can put multiple input data in a list or
                         put all data in a DataLoader to infer and get results of all input data.
                         Can be torch.utils.data.dataloader.DataLoader and
                         List[torch.Tensor] or
                         List[List[torch.Tensor]] if the model has multiple inputs.
                         If input_data is a DataLoader object,the format in DataLoader should be
                         (x1, x2, ..., xn, y).
      :param num_requests: Numer of requests in the asynchronous infer requests pool.
                           Each element in input_data will be bound to an idle async
                           infer request in the pool to do inference.
                           Defaults to 0.
                           If 0, it will be set automatically to the optimal number.
  
      :return: A List of torch.Tensor containing result of each input
      """
      if isinstance(input_data, DataLoader):
          # input_data is a DataLoader, retrieve every batch and put them in a list.
          input_list = []
          for data in input_data:
              all_inputs = list(data)[:-1]
              input_list.append(all_inputs)
      else:
          # input_data is list of torch.Tensor
          input_list = input_data
  
      if isinstance(input_list[0], list) and len(input_list[0]) > 1:
          # multiple inputs
          for i, inputs in enumerate(input_list):
              input_list[i] = list(self.on_forward_start(inputs))
      else:
          # single input
  
          # if single input in dataloader, the format is [[batch1], [batch2]]
          # after being converted to list
          # convert to [batch1, batch2] here.
          if isinstance(input_list[0], list):
              input_list = [x[0] for x in input_list]
  
          input_list = list(self.on_forward_start(input_list))
  
      results = self.ov_model.async_predict(input_list, num_requests)
      results = self.numpy_to_tensors(results)
      return results
  
imports: from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import List, Union
  from .dataloader import PytorchOpenVINODataLoader
  from .metric import PytorchOpenVINOMetric
  from ..core.model import OpenVINOModel
  from bigdl.nano.pytorch.model import AcceleratedLightningModule
  from .utils import export
  import torch
  from bigdl.nano.utils.common import invalidInputError
  from ..core.utils import save
  from torch.utils.data.dataloader import DataLoader
  from bigdl.nano.pytorch.context_manager import generate_context_manager, BaseContextManager
  from bigdl.nano.utils.pytorch import get_input_example, get_forward_args, patch_attrs_from_model_to_object, MetaData
  from bigdl.nano.utils.common import SafePickle
label_desc: Use image node_id 12 for calling the PytorchOpenVINOModel obj's underlying member method code with example usage: obj.async_predict(input_data, num_requests) and returns: results