[DAG] Call Actor method as a part of a DAG

I’m building a DAG which calls an actor method:

filtered_items = workflow.continuation(db_actor.filter_batch.options(num_cpus=0.01).bind(input_batch))

I get:

AttributeError: 'ActorMethod' object has no attribute 'bind'

As a workaround I create a task which calls an actor and use this task in a DAG, but this looks like a waste of resources (in some cases if I need to call this task multiple times it spins up a ton of workers just to call an actor method). Is there a better way?

Hi @dirtyValera workflow doesn’t support actors unfortunately :frowning:

I think it all depends on how expensive your filter_batch is. Start a ray task is not expensive unless your work in the task is super cheap.

Workflow is for persistence, and there is a trade-off there: whether to store them or just re-run them.

For you case, you can either increase the batch size and split the batch inside the task or you can just do it without workflow.

Hi @yic,

Are you aware of any upcoming support for Ray Actors when it comes to Ray’s Workflow?

Currently, I’m using Actors together with Ray’s DAG API. For my use case, I’d like to automatically have the output of each node in the DAG stored. Furthermore, fault tolerance (e.g., re-running a node that failed) is also important. What is your opinion on Ray’s DAG API + Actors vs. Ray’s Workflow here? What do you think would be the most suitable solution for this use case?

Thank you!