Enhance mini GUI run controls - #288
Draft
michaellans wants to merge 37 commits into
Draft
michaellans wants to merge 37 commits into
michaellans wants to merge 37 commits into
Conversation
…_measurement_with_retry
…g data_and_error_queue
…/close subprocess
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR build on #281 to improve play/pause/resume behavior for running optimizations in Badger. This is done by introducing a 'smart run' mode, which checks the state of the GUI when the play button is pressed against the currently displayed data and determines whether to resume, restart, or load the data and continue based on which parameters have changed. This allows you to pause a routine, resume, change variable ranges or update algorithm parameters and load the data and continue, or switch to new variables and restart with a single play button.
Note that this PR is built on the same branch/commit history as #281, the new changes here start after 76e72eb
Smart Run Controls
'Smart Run' mode handles play/pause/resume/restart.
_pending_restartflag, and will then start the new routine and reset the flag after it receives a 'routine_finished' signalrestart_override_flagwhich is set after actions which can change the machine state and variable values: reset environment, selecting a routine from the run history, and dialing in a solution. The flag is also set when selecting a template. For any of these cases, selecting "resume" from the run options menu will still load the data and continue, but the automatic behavior will be to restart without data.Stopping runs and Termination handling
pausedfield to BadgerOptMonitor to distinguished between running and paused subprocess states. The subprocess is then stopped and restarted when a routine restarts.Data Loading and Routine State
loaded_data_keys_compatibleto be a bool true/false check.Added/updated tests