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 task
😶🌫️ 1
b
billowy-winter-86593
05/13/2023, 3:25 AM
A fully eager mode is being worked on right now that will allow you to avoid promises all together. But until then there are two options that I know of.
1. Use dynamic tasks to work directly with inputs and then use tasks inside to combine the promises that come from tasks. This sounds like it isn’t an option for you.
2. Try using flyte remote to call registered workflows and wait to inspect outputs. https://docs.flyte.org/projects/flytekit/en/latest/remote.html.
👍 1
t
thousands-car-79657
05/13/2023, 3:42 AM
Thanks! I actually prefer option 1. I’ll try to refactor the code a little bit
b
billowy-winter-86593
05/13/2023, 3:45 AM
Good luck! If you run into issues feel free to post more code and I’ll try to assist.
gratitude thank you 1
t
thousands-car-79657
05/13/2023, 4:45 AM
thanks!
thousands-car-79657
05/13/2023, 6:05 PM
Option1 worked! I basically wrapped add_one in another tasks so like