Why can't we specify fractional cpu resources larger than 1.0 in actors?

How severe does this issue affect your experience of using Ray?

  • Low: It annoys or frustrates me for a moment.

In Ray actor resource requirements are all logical requirements that are used to figure out actor bin packing. We are able to specify cpus in fractional amounts 0.01 so we can pack more than the physical cpu cores available on a node. My question is if actor resources are only used for actor bin packing from the scheduler’s perspective, then why not also let users specify fractions more than 1.0?

I believe it is possible to provide more than 1.0 CPU value for actors. For example, the below script works for me.

@ray.remote(num_cpus=2)
class Actor:
    pass

a = Actor.remote()
ray.get(a.__ray_ready__remote())

@sangcho if you specify a floating/fractional value larger than 1.0 it actually doesn’t work (raises a Ray specific runtime error) so try 1.5 for instance.

@sangcho just wanted to see if you were able to test and see the issue I’m talking about
Here is the exact line thats erroring out btw:

Hmm yeah I am not 100% sure about the reason why we don’t support this. cc @ericl do you happen to know?

@ericl I know you guys are busy with the summit but if you could help resolve this issue I’d really appreciate it!

I believe this is a bug being addressed in [Core] "ValueError" For "num_cpus" worker option == 1.5 · Issue #37241 · ray-project/ray · GitHub