-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Ensure KeyboardInterrupt
halts microbatch model execution
#10879
Ensure KeyboardInterrupt
halts microbatch model execution
#10879
Conversation
Need to figure out how to test this. I think we can mock a function called during |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10879 +/- ##
==========================================
- Coverage 89.15% 89.09% -0.06%
==========================================
Files 183 183
Lines 23529 23531 +2
==========================================
- Hits 20977 20965 -12
- Misses 2552 2566 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…l execution Previously we were catching all execptions during microbatch model execution, and gracefully handling them. This ensured that one failing batch didn't cause the rest of the batches to fail / be skipped unnecessarily. However if there is a KeyboardInterrupt or SystemExit, execution should halt. To get this to happen, we're now catching and reraising `KeybaordInterrupts`s and `SystemExit`s.
5c189ab
to
e2869d5
Compare
@@ -568,6 +568,9 @@ def _execute_microbatch_materialization( | |||
# At least one batch has been inserted successfully! | |||
incremental_batch = True | |||
|
|||
except (KeyboardInterrupt, SystemExit): | |||
# reraise it for GraphRunnableTask.execute_nodes to handle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be writing out run results in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The KeyboardInterrupt
handler in GraphRunnableTask.execute_nodes should handle it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one question but otherwise LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarify! LGTM
Resolves #10862
Problem
A
KeyboardInterrupt
during the execution of microbatches would only cause the currently executing batch to stop, and then the rest of the batches (and job) would continue.Solution
Make
KeyboardInterrupt
s halt batch execution.Checklist