dataeval.detectors.drift.preprocess_drift ========================================= .. py:function:: dataeval.detectors.drift.preprocess_drift(x, model, device = None, preprocess_batch_fn = None, batch_size = int(10000000000.0), dtype = np.float32) Prediction function used for preprocessing step of drift detector. :param x: Batch of instances. :type x: NDArray :param model: Model used for preprocessing. :type model: nn.Module :param device: Device type used. The default None tries to use the GPU and falls back on CPU. Can be specified by passing either torch.device('cuda') or torch.device('cpu'). :type device: torch.device | None, default None :param preprocess_batch_fn: Optional batch preprocessing function. For example to convert a list of objects to a batch which can be processed by the PyTorch model. :type preprocess_batch_fn: Callable | None, default None :param batch_size: Batch size used during prediction. :type batch_size: int, default 1e10 :param dtype: Model output type, either a :term:`NumPy` or torch dtype, e.g. np.float32 or torch.float32. :type dtype: np.dtype | torch.dtype, default np.float32 :returns: Numpy array, torch tensor or tuples of those with model outputs. :rtype: NDArray | torch.Tensor | tuple