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

[FIX] Predictions: Fix failure after failed predictor #3337

Merged
merged 1 commit into from
Nov 7, 2018

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Oct 27, 2018

Issue

I predictor fails, it sets results to a string describing an error. When _call_predictors is called again, it tests for pred.results is None or numpy.isnan(pred.results[0]).all(), which crashes because pred.results is a string.

Description of changes

Test for isinstance(pred.results, str) and treat it as None or all nans.

Includes
  • Code changes
  • Tests

@codecov
Copy link

codecov bot commented Oct 28, 2018

Codecov Report

Merging #3337 into master will increase coverage by 0.06%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3337      +/-   ##
==========================================
+ Coverage   82.21%   82.27%   +0.06%     
==========================================
  Files         351      351              
  Lines       62301    62575     +274     
==========================================
+ Hits        51219    51485     +266     
- Misses      11082    11090       +8

@janezd janezd added this to the 3.18 milestone Nov 6, 2018
@lanzagar lanzagar changed the title OWPredictions: Fix failure after failed predictor [FIX] Predictions: Fix failure after failed predictor Nov 7, 2018
@lanzagar lanzagar merged commit 2bda852 into biolab:master Nov 7, 2018
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.

2 participants