class_docstr: A predictor for PyTorch models.
  
  Args:
      model: The torch module to use for predictions.
      preprocessor: A preprocessor used to transform data batches prior
          to prediction.
      use_gpu: If set, the model will be moved to GPU on instantiation and
          prediction happens on GPU.
class_docstr_tok: ["A","predictor","for","PyTorch","models",".","Args",":","model",":","The","torch","module","to","use","for","predictions",".","preprocessor",":","A","preprocessor","used","to","transform","data","batches","prior","to","prediction",".","use_gpu",":","If","set",",","the","model","will","be","moved","to","GPU","on","instantiation","and","prediction","happens","on","GPU","."]
code: def __repr__(self):
      return (
          f"{self.__class__.__name__}(model={self.model!r}, "
          f"preprocessor={self._preprocessor!r}, use_gpu={self.use_gpu!r})"
      )
  
file_path: ray/python/ray/train/torch/torch_predictor.py
imports: import logging
  from typing import TYPE_CHECKING, Dict, Optional, Union
  import numpy
  import torch
  from ray.air._internal.torch_utils import convert_ndarray_batch_to_torch_tensor_batch
  from ray.train._internal.dl_predictor import DLPredictor
  from ray.train.predictor import DataBatchType
  from ray.train.torch import TorchCheckpoint
  from ray.util import log_once
  from ray.util.annotations import DeveloperAPI, PublicAPI
label_desc: Use image node_id 2 for calling the TorchPredictor obj's underlying member method code with example usage: obj.__repr__() and returns: self, str, self, str, self, str, self, str