[ENH] ConcurrentWidgetMixin: Cancel task on input change#4219
Merged
ales-erjavec merged 2 commits intobiolab:masterfrom Dec 16, 2019
Merged
[ENH] ConcurrentWidgetMixin: Cancel task on input change#4219ales-erjavec merged 2 commits intobiolab:masterfrom
ales-erjavec merged 2 commits intobiolab:masterfrom
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 |
3 tasks
Contributor
|
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: |
Contributor
|
Please rebase to current master. |
0957f5e to
84cb23e
Compare
| 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) |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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
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.
Issue
ConcurrentWidgetMixin subclasses don't stop computation when an input changes.
Description of changes
Set
invalidatedwidget state (instead ofblockingstate) when stopping/starting the task.Includes