-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[ENH] ConcurrentWidgetMixin: Cancel task on input change #4219
Conversation
ee78f65
to
1bff0cd
Compare
Codecov Report
@@ Coverage Diff @@
## master #4219 +/- ##
=========================================
- Coverage 86.23% 86.2% -0.03%
=========================================
Files 396 396
Lines 70643 70635 -8
=========================================
- Hits 60918 60890 -28
- Misses 9725 9745 +20 |
If i connect File -> t-SNE, and load iris.tab then housing.tab, then move focus (tab) to the 'Recent' combo box and spam the down arrow key, eventually I get a:
|
Please rebase to current master. |
0957f5e
to
84cb23e
Compare
@@ -513,7 +513,7 @@ def run(self): | |||
|
|||
def __ensure_task_same_for_pca(self, task: Task): | |||
assert self.data is not None | |||
assert task.data is self.data | |||
np.testing.assert_array_equal(task.data.X, self.data.X) |
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.
numpy.testing
should not be used outside of unittests.
I am assuming the cause of this assert violation is a check that the data is the same upon receiving the input but only after having already updated self.data
.
If that is the case I would just remove the assert.
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.
It's replaced with (task.data.X == self.data.X).all()
EDIT: I'll remove it.
50a8a21
to
770ba0e
Compare
The data instance could have changed, but the task was not canceled due to self._invalidated = False.
770ba0e
to
50b7f96
Compare
Issue
ConcurrentWidgetMixin subclasses don't stop computation when an input changes.
Description of changes
Set
invalidated
widget state (instead ofblocking
state) when stopping/starting the task.Includes