Hi community, I am a MLE trying to get familiar on flyte/flytekit. I have a question on the mechanism of pyflyte. Following is a very simple code (test.py) that create a task and a workflow with print hello at the first.
However, I found that
python test.py
and
pyflyte run test.py my_wf
give me different output.
1. python: print "hello" for 4 times --> why??
2. pyflyte: work normally. print one time hello and output "b"
Can anyone have a very brief explain on this?
why are you putting bare statement in python code?
if its just python then i think flyte is doing local execution and for that workflow is getting compiled once at least so that explains the multiple print hello but im not sure it explains all 4
a
average-finland-92144
10/19/2023, 3:45 PM
@boundless-pillow-61274 I get the same outcome as you. What i know so far is that the code that's not inside the @workflow annotation is compiled by the Python interpreter itself while the code inside the workflow is handled as a DSL where Flyte generates an execution graph without actually executing the code. Unfortunately, I still don't get why 4