-
Notifications
You must be signed in to change notification settings - Fork 39
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
[SDEV-1916] fix pre calibration failure stops the acquisition #2985
base: master
Are you sure you want to change the base?
[SDEV-1916] fix pre calibration failure stops the acquisition #2985
Conversation
a7b88e5
to
842a560
Compare
@nandishjpatel can you resolve the conflicts in this PR? |
Updates: - The status text in the ROA window of the project tree will show "Open", "Skipped", "Failed" and respective colour - Added autostigmation and autofocus period in the Acquisition panel; previously it was in the acquisition.config file - Added a checkbox `Stop acquisition on failure` which helps is skipping roa acquisition in case of failure
842a560
to
47b50d7
Compare
Done :) |
@@ -84,6 +84,11 @@ | |||
} | |||
|
|||
|
|||
class ROASkipped(Exception): | |||
def __init__(self, message): | |||
super().__init__(message) |
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.
can you log why the ROA is skipped?
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.
Agree, will add the reason to the message and then log it as well
src/odemis/acq/fastem.py
Outdated
exc_info=True) | ||
exception = ex # let the caller handle the exception | ||
else: | ||
exception = ROASkipped(f"Skipped the ROA {self._roa.shape.name.value}") |
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 did you decide to return the ROASkipped
exception and not deal with it similar to how we deal with CancelledError
?
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.
All ROAs ProgressiveFuture
are run in a ProgressiveBatchFuture
. If any ProgressiveFuture
raises an exception inside the ProgressiveBatchFuture
all subsequent ProgressiveFuture
will be cancelled. That's why I don't raise the ROASkipped
and just return it to be later handled for the project tree status.
See here:
odemis/src/odemis/model/_futures.py
Line 568 in 0c0ea72
ex = f.exception() # raises CancelledError if cancelled, otherwise returns error |
NOTE: This PR depends on #2972
[feat] allow skipping roa acquisition in case of failure
Updates:
Stop acquisition on failure
which helps is skipping roa acquisition in case of failureCancelled
Stop acquisition on failure checked (Exception is raised in autostigmation)
Stop acquisition on failure un-checked (Exception is raised in autostigmation)