module, backend, batch_size, device=None, preprocess_batch_fn=None, tokenizer=None, max_len=None)[source]

Takes a function that must be batch evaluated (on tokenized input) and returns a function that handles batching (and tokenization).

Return type:

Callable, batch_size)[source]

Takes a function that already handles batching but additionally performing shuffling and ensures instances are evaluated as part of full batches.

Return type:

Callable, x_ref)[source]

Optionally infer shape from reference data.

Return type:

Optional[Tuple], X, n, update_method=None)[source]

Update reference dataset for drift detectors.

  • X_ref (ndarray) – Current reference dataset.

  • X (ndarray) – New data.

  • n (int) – Count of the total number of instances that have been used so far.

  • update_method (Optional[Dict[str, int]]) – Dict with as key reservoir_sampling or last and as value n. reservoir_sampling will apply reservoir sampling with reservoir of size n while last will return (at most) the last n instances.

Return type:



Updated reference dataset.