classmethod Predictor.preferred_batch_format() ray.air.util.data_batch_conversion.BatchFormat[source]#

Batch format hint for upstream producers to try yielding best block format.

The preferred batch format to use if both _predict_pandas and _predict_numpy are implemented. Defaults to Pandas.

Can be overriden by predictor classes depending on the framework type, e.g. TorchPredictor prefers Numpy and XGBoostPredictor prefers Pandas as native batch format.

DeveloperAPI: This API may change across minor Ray releases.