Defining resource requirements to actor method

  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.

I have a requirement which i am wondering if there is some way to do this today and if not, does it make sense to open a request in github

i am working with threaded actors. Meaning I give max concurrency.
However I have an issue with memory. Each call to the actor main remote method requires a different amount of RAM (due to input size, the actor reads the input from a file but i know the size when i call the method).
So I can’t really calculate max concurrency according to the memory that is allocated to the actor since it changes.

What I thought to do but currently don’t see how is:

  1. Define logic resource for the actor (i am using shared file as memory so can’t use memory resource)
  2. Actor will be allocated in node which has this logic resource in the required amount - so far there is a way to do this
  3. Define resource requirement on the call to the remote method (as i know the size only when calling the method).
  4. Ray will schedule the method on the actor only when there is a resource available in the actor it self

thanks

Hi @shiranbi,

Unfortunately, you cannot specify resource requirements on each individual actor method.