-
Notifications
You must be signed in to change notification settings - Fork 1
v0.6.0 #598
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
Conversation
Reset counter after adjusting autobrightness
remove old pyngrok dependency (no longer used)
Remove unused ngrok utils
…polling of SSAF, and thus improve our ability to track focal drift. May want to tweak EWMA parameters to be less conservative since we can now receive more samples. Needs to be tested extensively on scope however, in particular we need to monitor for any memory increases in case the NCS cannot keep up and we start building up a queue.
formatting
Manually reset predictions handler
…oller instance, use mscope's existing one
Fix potential memory leaks
…hich is excessive, up from 10 which is what we had previously)
… to speed faster. Set it back to normal once fast flow is done.
NCS performance hint --> throughput + increase SSAF polling
…on prior to starting
Faster fast flow
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.
If we turn off fast flow in the future the pneumatic module min step size will stay doubled
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 am similarly concerned if this reset adequately resets step size. Have you done multiple runs in a row where at least one run fails on fastflow? From the scope routine it looks like a failure in fastflow means it'll never reset the step size
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.
QOL change in scope_routines.py will keep pneumatic step size doubled if fast flow is disabled. EDIT: I was mistaken, it will only temporarily double if fast flow is enabled.
How does ngrok work now with the files deleted?
A while back, |
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 the clarification.
Sweet - I'll also wait on @mwlkhoo to review and then if all looks good, we can merge. |
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.
Some comments/questions
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 am similarly concerned if this reset adequately resets step size. Have you done multiple runs in a row where at least one run fails on fastflow? From the scope routine it looks like a failure in fastflow means it'll never reset the step size
if counter >= processing_constants.PERIODIC_AB_PERIOD_NUM_FRAMES: | ||
autobrightness.autobrightness_pid_control(img) | ||
curr_img_brightness = autobrightness.prev_mean_img_brightness | ||
counter = 0 |
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.
This looks good, but how was this loop ever working without this line?
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.
lol it embarrassingly wasn't, this was a long overlooked bug
cell_finder = CellFinder() | ||
flow_controller = FlowController(mscope.pneumatic_module) | ||
mscope.flow_controller.reset() | ||
flow_controller = mscope.flow_controller |
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.
why do we have a local flow_controller
function instead of directly referencing mscope.flow_controller
?
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.
Just for a bit of cleanliness/ease of typing, (instead of having to type mscope.flow_controller
each time).
self.max_confs = {x: [] for x in self.class_ids} | ||
self.curr_min_of_max_confs_by_class = { | ||
x: HIGH_CONF_THRESH - 1e-6 for x in self.class_ids | ||
} | ||
self.min_confs = {x: [] for x in self.class_ids} | ||
self.curr_max_of_min_confs_by_class = { | ||
x: HIGH_CONF_THRESH for x in self.class_ids | ||
} |
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 apologize in advance because I know very little about the predictions handler... but why do these variables need to reset? I assumed these would be consistent across each experiment?
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.
no sweat! These variables hold the predictions for each run - but they are really big arrays - 15 rows * 3.5M columns (which is just an upper bound for how many cells we would reasonably expect YOGO to see). Instead of re-creating this giant array for each run, we just clear it, so that the next run's predictions can fill it up.
… normally when doing fast flow, so that the set up is quicker and more ergonomic for the user (i.e they don't need to wait for a long while for the syringe to hit its stop in the event that debris or stuck cells are messing up the flow estimation calculation. Fix: This properly resets the step size back to what it is normally supposed to be, in the event where fast flow does not reach the target flow rate. Previously it was only being reset when fast flow succeeded.
Looks good, thanks for addressing all my q's! |
Tested on the scope. |
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.
tested by Nick, looks good
…eset_if_fast_flow_fails Reset pneumatic module step size in the case where `fast_flow` fails
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.
Approved
Bumping up to
v0.6.0
to denote a marked increase in SSAF frequency (and hopefully, a concomitant improvement in image focus over the course of a run)FlowController
inscope_routines.py
THROUGHPUT
mode - allows us to run SSAF more frequently (went from 2 imgs/sec --> 10 imgs/sec)Tested on scope while monitoring
htop
to ensure memory usage stayed flat, and tested in the oven at 40C (n=10 runs).