Skip to content

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

Merged
lanzagar merged 1 commit intobiolab:masterfrom
janezd:fix-predictor-fail
Nov 7, 2018
Merged

[FIX] Predictions: Fix failure after failed predictor#3337
lanzagar merged 1 commit intobiolab:masterfrom
janezd:fix-predictor-fail

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

@janezd janezd force-pushed the fix-predictor-fail branch 3 times, most recently from a6498bb to 62bc1ce Compare October 27, 2018 20:40
@janezd janezd force-pushed the fix-predictor-fail branch from 62bc1ce to 2a3adca Compare October 28, 2018 15:33
@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