Skip to content

[FIX] Catch errors during learning in learner widgets #1949

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

Merged
merged 5 commits into from
Jan 25, 2017

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Jan 24, 2017

Issue

The base widget for learners did not intercept errors occurring during fitting.

Description of changes

Errors are now caught and a basic message that something went wrong is displayed. Widgets can provide more specific error messages when possible.

Some widgets tested self.valid_data to verify that fitting succeeded. This did not really work. Although it now would, the tests are replaced to check whether self.model is not None. This is more appropriate since the data may be valid when the model is not.

A minor fix needed for tests: Model checked whether the domain parameter is given by checking if domain. This is wrong since Domain does not have __bool__, so __len__ is used instead, and so Domain([]) is treated as False.

Includes
  • Code changes
  • Tests

@janezd janezd added this to the 3.3.11 milestone Jan 24, 2017
@codecov-io
Copy link

codecov-io commented Jan 24, 2017

Current coverage is 89.32% (diff: 100%)

Merging #1949 into master will not change coverage

@@             master      #1949   diff @@
==========================================
  Files            86         86          
  Lines          9119       9119          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           8146       8146          
  Misses          973        973          
  Partials          0          0          

Sunburst

Powered by Codecov. Last update 40c677d...08b8f53

@astaric
Copy link
Member

astaric commented Jan 25, 2017

@astaric
Copy link
Member

astaric commented Jan 25, 2017

@astaric
Copy link
Member

astaric commented Jan 25, 2017

@astaric astaric merged commit af3cb70 into biolab:master Jan 25, 2017
astaric added a commit that referenced this pull request Feb 3, 2017
[FIX] Catch errors during learning in learner widgets
(cherry picked from commit af3cb70)
@jerneju
Copy link
Contributor

jerneju commented Feb 9, 2017

@janezd janezd deleted the catch-fit-errors branch April 5, 2019 17:31
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.

4 participants