Xinzhou Liu
05/13/2023, 1:07 AMpromise
handling issue due to the flyte task returning a promise that the non-flyte function doesn’t know how to handle? Example:
@dynamic
def flyte_task():
return something
def non_flyte_func():
add_one = 1 + flyte_task()
return add_one
If run remotely as it, it would error out with an error like Unsupported operand type for +: int and Promise
. In my use case, it’s not easy to convert non_flyte_func
to flyte taskEvan Sadler
05/13/2023, 3:25 AMXinzhou Liu
05/13/2023, 3:42 AMEvan Sadler
05/13/2023, 3:45 AMXinzhou Liu
05/13/2023, 4:45 AM@dynamic
def flyte_task():
return something
@task
def add_one(x):
return x + 1
def non_flyte_func():
add_one = add_one(x=flyte_task())
return add_one