Transformers pipeline with ray does not work on gpu

I am following the documentation for offline batch inferencing using huggingface.
https://docs.ray.io/en/latest/data/batch_inference.html#batch-inference-home

When I use pipeline, the gpu does not get used. I also get a warning

You seem to be using the pipelines sequentially on GPU. In order to maximize efficiency please use a dataset

Any ideas how to use it?