Skip to content
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] Predictions: Allow selecting a subset of rows #4871

Merged
merged 4 commits into from
Aug 26, 2020

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Jun 29, 2020

Closes #4869.

Includes
  • Code changes
  • Tests

@janezd janezd changed the title [ENH] Predictions: Allow selecting a subset of rows [WIP] [ENH] Predictions: Allow selecting a subset of rows Jun 29, 2020
@janezd janezd force-pushed the owpredictions-selection branch 4 times, most recently from 8579b09 to 3cca10b Compare June 30, 2020 15:20
@janezd janezd changed the title [WIP] [ENH] Predictions: Allow selecting a subset of rows [ENH] Predictions: Allow selecting a subset of rows Jun 30, 2020
@janezd janezd force-pushed the owpredictions-selection branch 2 times, most recently from b071f89 to 11c6946 Compare June 30, 2020 17:01
@codecov
Copy link

codecov bot commented Jun 30, 2020

Codecov Report

Merging #4871 into master will increase coverage by 0.16%.
The diff coverage is 99.32%.

@@            Coverage Diff             @@
##           master    #4871      +/-   ##
==========================================
+ Coverage   84.12%   84.28%   +0.16%     
==========================================
  Files         283      283              
  Lines       57819    58020     +201     
==========================================
+ Hits        48640    48904     +264     
+ Misses       9179     9116      -63     

@janezd janezd force-pushed the owpredictions-selection branch from 11c6946 to 07f50c3 Compare June 30, 2020 17:30
@PrimozGodec PrimozGodec self-assigned this Jul 31, 2020
@PrimozGodec
Copy link
Contributor

If I first connect data and then model to the Predictions widget it fails when I select a row with:

Traceback (most recent call last):
  File "/Users/primoz/Documents/orange3/Orange/widgets/evaluate/owpredictions.py", line 1119, in select
    self.store.select(selection, flags)
  File "/Users/primoz/Documents/orange3/Orange/widgets/evaluate/owpredictions.py", line 1054, in select
    self.select_rows(rows, flags)
  File "/Users/primoz/Documents/orange3/Orange/widgets/evaluate/owpredictions.py", line 1074, in select_rows
    self._rows ^= rows
  File "/Users/primoz/miniconda3/envs/orange3/lib/python3.8/contextlib.py", line 120, in __exit__
    next(self.gen)
  File "/Users/primoz/Documents/orange3/Orange/widgets/evaluate/owpredictions.py", line 1104, in _emit_changed
    model.emit_selection_rows_changed(selected, deselected)
  File "/Users/primoz/Documents/orange3/Orange/widgets/evaluate/owpredictions.py", line 1151, in emit_selection_rows_changed
    self.selection_from_rows(selected),
  File "/Users/primoz/Documents/orange3/Orange/widgets/evaluate/owpredictions.py", line 1133, in selection_from_rows
    index = model.index
AttributeError: 'NoneType' object has no attribute 'index'

If first the model is connected and the data it works.

The workflow (I used Iris data)
Screenshot 2020-07-31 at 13 09 30

@janezd janezd force-pushed the owpredictions-selection branch from a7af3c0 to c0ec188 Compare August 25, 2020 13:03
@janezd janezd force-pushed the owpredictions-selection branch from c0ec188 to 6231cca Compare August 25, 2020 13:03
@PrimozGodec PrimozGodec merged commit 17a55ea into biolab:master Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Predictions does not support selecting rows
2 participants