CurrentRun.ref()
CurrentRun.ref(task_id: str) -> Any:
"""
Get the output of task with ID `task_id`
args:
task_id: ID of task from which to retrieve output
returns:
the output of the inputted `task_id`
raises:
prism.exception.RefDoesNotExistException if the task ID is not found
"""Example
# tasks/hello_world.py
import prism.task
import prism.target
class HelloWorld(prism.task.PrismTask):
def run(self):
test_str = "Hello, world!"
return test_str# tasks/second_task.py
import prism.task
import prism.target
from prism.runtime import CurrentRun
class SecondTask(prism.task.PrismTask):
def run(self):
hello_world_str = CurrentRun.ref("hello_world.HelloWorld") # default task ID set by Prism
additional_details = "\n" + "This is a Prism project"!
return hello_world_str + additional_detailsLast updated