[bug fix] Ensure that StopEvent
gets cleared from Context._in_progress["_done"]
after a Workflow run
#17300
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
With the addition of Checkpointing feature, we added the
Context._in_progress
field that marks which steps/events are in progress at the time of the snapshot. (The purpose being that if you reload from a Checkpoint that had some steps/events in progress, then these would have to re-started from scratch when re-running the Workflow.)In doing so, I introduced a bug that didn't clear (
_done
step,StopEvent
) from the_in_progress
attribute when a Workflow has successfully ran. This PR fixes this.Fixes issues that were observed in
llama-deploy
:Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.