Ray worker GPU count if GPU available

Thanks for the answer, Ricky. No, it’s not causing any trouble.

I have to admit, it did bite me though.

I am using Ray v1.11, (because of other reasons), and for some reason my worker function (annotated with @ray.remote) uses the GPU anyway on Windows without specifying the num_gpus option. So, I’ve been using this code for a few months without issues.

Recently, I deployed on a linux VM through docker, and the worker wasn’t using the GPU, which made me quite perplexed. I didn’t expect Ray to be the issue, since it was working on Windows, but after eliminating the impossible, the improbable was the truth. Ray behaved differently on Linux, and according to the docs, I had to set the num_gpus, so it’s kinda my fault.