Skip to content

[FIX] OWLearnerWidget: Don't crash when no features #1389

Merged
kernc merged 1 commit intobiolab:masterfrom
nikicc:empty-data-error
Jun 30, 2016
Merged

[FIX] OWLearnerWidget: Don't crash when no features #1389
kernc merged 1 commit intobiolab:masterfrom
nikicc:empty-data-error

Conversation

@nikicc
Copy link
Copy Markdown
Contributor

@nikicc nikicc commented Jun 30, 2016

If we provide a data set without any features (as unpreprocessed Corspus) learners crashed with a red screen. This PR adds a check for this and shows an error message instead.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 30, 2016

Current coverage is 87.61%

Merging #1389 into master will not change coverage

@@             master      #1389   diff @@
==========================================
  Files            75         75          
  Lines          7460       7460          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           6536       6536          
  Misses          924        924          
  Partials          0          0          

Sunburst

Powered by Codecov. Last updated by ee5b063...9af9a51

"There is nothing to learn.")
elif self.data.X.size == 0:
self.error(self.DATA_ERROR_ID,
"Found array with 0 feature(s) while a minimum of 1 is required.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Data has no features to learn from."? Zero features are plural. 😛

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was being sloppy and just copied the error from scikit 🙈 Corrected.

If we provide a data set without any features (as unpreprocessed Corspus) learners crashed with a red screen. This PR adds a check for this and shows an error message instead.
@nikicc nikicc force-pushed the empty-data-error branch from 385c44b to 9af9a51 Compare June 30, 2016 16:44
@kernc kernc merged commit 7639987 into biolab:master Jun 30, 2016
@nikicc nikicc deleted the empty-data-error branch June 30, 2016 19:37
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.

3 participants