-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Subworkflow chaining does not work when run locally #3644
Comments
Thank you for opening your first issue here! 🛠 |
@d-tw this is an excellent catch. you are right, the order is not really controlled locally, as the current local execution engine is a simple python interpreter and does not re-interpret the code. This is indeed a bug, but the fix might be more involved than a quick fix. I would love to know if this is a blocker in some way? |
@kumare3 Thanks for the response! Looking at the flytekit code I realised that the local execution is fundamentally different from what happens on Flyte - it doesn’t use the DAG at all. I hacked together a contextmanager that can be used in unit tests that patches I think it brings us closer to on-Flyte behaviour, i.e. workflow code is only executed during compile, but I’m figuring it out as I go along! So no, it’s not a blocker, but if ever you decide to implement it, I’ll be able to scrap my workaround :) |
@d-tw , would it be possible for you to share the PR? One concern is how this applies to tasks, but I'm sure we can iterate on that as well once we have some code to handle sub-workflows. |
@eapolinario I think this issue is highly correlate to this one? #4080 |
Describe the bug
When the order of two subworkflows is controlled via the chaining operator, the order of execution is not applied when the code is run locally (locally as in "via direct invocation of python", not locally as in "via a local cluster").
When the workflow is published to Flyte, the DAG and subsequent execution are correct.
Expected behavior
The order of execution of subworkflows should be identical between local runs and remote execution, especially in the case of unit testing.
Additional context to reproduce
The version of flytekit is 1.5.0.
Sample code:
Output is:
Expected output is:
Screenshots
When registered with a Flyte cluster, the DAG is correct.
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: