Question: Task Scheduling and prioritization

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

  • None: Just asking a question out of curiosity

Hi there, I’m just learning Ray and had a question regarding task submission. From my understanding when we call actor.method.remote() the task is scheduled in such a way that it’s called sequentially for the actor.

Is there a way to raise priority or in essence skip the queue of tasks for a given method.

Here’s an example. If we implement a rudimentary Policy actor in a Self-play context, the actor will receive calls for inference by the self-play actors. eventually we’d want to update that Policy actors state_dict to align with the current evolution of a training model.

is it possible to push the update of weights to the front of the queue so it finishes what ever inference its currently doing and then update?

Thanks for reading.

Hi @KAV101, I don’t think Ray today support actor task priority.

At the same time, for the specific example, one thing you can try is to use AsyncIO actor or threaded actor and leverage Concurrency Groups to essentially have 2 tasks queues for the 2 functions you’d like to call on the Policy actor. But need to keep in mind that, you might need to be careful about the any race conditions.

1 Like