Avoid execution of custom functions right after resuming/restarting experiment#29
Open
dgruano wants to merge 1 commit intoFYNCH-BIO:hotfixfrom
Open
Avoid execution of custom functions right after resuming/restarting experiment#29dgruano wants to merge 1 commit intoFYNCH-BIO:hotfixfrom
dgruano wants to merge 1 commit intoFYNCH-BIO:hotfixfrom
Conversation
Wait to execute custom functions only after enough timepoints have been captured.
zheins
requested changes
Dec 30, 2020
| logger.debug('elapsed time: %.4f hours' % elapsed_time) | ||
| print("{0}: {1} Hours".format(EXP_NAME, elapsed_time)) | ||
|
|
||
| if self.start_countdown > 0: |
Contributor
There was a problem hiding this comment.
Make this a ternary operator so it's a little more clean.
| self.save_data(data['data'].get(param, []), elapsed_time, | ||
| VIALS, param + '_raw') | ||
| # run custom functions | ||
| self.custom_functions(data, VIALS, elapsed_time) |
Contributor
There was a problem hiding this comment.
Do we really want nothing to happen until this countdown is finished? I feel like the countdown should be used within the custom functions - this way it can be up to the logic within the function to decide how it wants to handle the restart.
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.
What? Why?
Wait to execute custom functions only after enough timepoints have been captured after an experiment pause. This can lead to an unwanted dilution based on OD values logged before an experiment pause. Solves #28
Changes proposed in this pull request:
NOTE: another possible implementation is passing the countdown as a parameter (or a boolean flag) to the custom functions, in case there's logic that should be nevertheless executed.
Checks