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

**URL:** https://discuss.ray.io/t/dag-call-actor-method-as-a-part-of-a-dag/10418
**Category:** Ray Core
**Created:** [April 28, 2023, 8:30am UTC](https://discuss.ray.io/t/dag-call-actor-method-as-a-part-of-a-dag/10418 "2023-04-28T08:30:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dirtyValera](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dirtyvalera/32/1575_2.png) [@dirtyValera](https://discuss.ray.io/u/dirtyValera)
#### Post date: [April 28, 2023, 8:30am UTC](https://discuss.ray.io/t/dag-call-actor-method-as-a-part-of-a-dag/10418/1 "2023-04-28T08:30:45Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![yic](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/yic/32/437_2.png) [@yic](https://discuss.ray.io/u/yic)
#### Post date: [May 2, 2023, 6:49pm UTC](https://discuss.ray.io/t/dag-call-actor-method-as-a-part-of-a-dag/10418/2 "2023-05-02T18:49:55Z")

</div>

Hi @dirtyValera workflow doesn’t support actors unfortunately ☹

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.

---

<div class="post-metadata">

### Author: ![sourqe](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sourqe/32/4488_2.png) [@sourqe](https://discuss.ray.io/u/sourqe)
#### Post date: [May 26, 2023, 12:02pm UTC](https://discuss.ray.io/t/dag-call-actor-method-as-a-part-of-a-dag/10418/3 "2023-05-26T12:02:57Z")

</div>

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!
