class_docstr: Handler for TorchRec DLRM example
class_docstr_tok: ["Handler","for","TorchRec","DLRM","example"]
docstr: The inference call moves the elements of the tuple onto the device and calls the model
  
  Args:
      data (torch tensor): The data is in the form of Torch Tensor
                           whose shape should match that of the
                            Model Input shape.
  
  Returns:
      (Torch Tensor): The predicted response from the model is returned
                      in this function.
docstr_tok: ["The","inference","call","moves","the","elements","of","the","tuple","onto","the","device","and","calls","the","model","Args",":","data","(","torch","tensor",")",":","The","data","is","in","the","form","of","Torch","Tensor","whose","shape","should","match","that","of","the","Model","Input","shape",".","Returns",":","(","Torch","Tensor",")",":","The","predicted","response","from","the","model","is","returned","in","this","function","."]
code: def inference(self, data):
      """
      The inference call moves the elements of the tuple onto the device and calls the model
  
      Args:
          data (torch tensor): The data is in the form of Torch Tensor
                               whose shape should match that of the
                                Model Input shape.
  
      Returns:
          (Torch Tensor): The predicted response from the model is returned
                          in this function.
      """
  
      with torch.no_grad():
          data = map(lambda x: x.to(self.device), data)
          results = self.model(*data)
      return results
  
file_path: serve/examples/torchrec_dlrm/dlrm_handler.py
imports: import json
  import logging
  import os
  from abc import ABC
  import torch
  from torchrec.datasets.criteo import DEFAULT_CAT_NAMES
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
  from ts.torch_handler.base_handler import BaseHandler
label_desc: Use image node_id 3 for calling the TorchRecDLRMHandler obj's underlying member method code with example usage: obj.inference(data) and returns: results