Hi All
just trying Ray out on some simple use-cases and can’t see a way of getting intermediate results
How does one retrieve the result of b without re-executing the DAG in the below toy example?
Any help much appreciated
Thank you
import unittest
from ray import workflow
import ray
import tempfile, pathlib
ray_workflow_data = pathlib.Path(tempfile.gettempdir()) / "ray_workflow_data"
ray.init(storage=ray_workflow_data.as_uri(), local_mode=False)
@ray.remote
def task_a():
return 5
@ray.remote
def task_b(x):
return x * 2
@ray.remote
def task_c(y):
return y - 3
class RayTests(unittest.TestCase):
def test_ray(self):
a = task_a.bind()
b = task_b.bind(a)
c = task_c.bind(b)
result_c = workflow.run(c)
assert result_c == 7