Skip to content

[FIX] Lin and Log Regression: Prevent double commit#1401

Merged
kernc merged 2 commits intobiolab:masterfrom
BlazZupan:prevent-double-commit
Jul 8, 2016
Merged

[FIX] Lin and Log Regression: Prevent double commit#1401
kernc merged 2 commits intobiolab:masterfrom
BlazZupan:prevent-double-commit

Conversation

@BlazZupan
Copy link
Contributor

@BlazZupan BlazZupan commented Jul 1, 2016

Both linear and logistic regression committed the learner twice upon initialization. The first time when setting (changing) the attributes for initial setup, and the second time once the initialization was over and when the auto commit was set to True. If the widgets were connected to Test & Score, this resulted in running the testing (e.g. cross validation) twice.

Debugging of these widget lead to discovery a bug of crashing the parallel execution of cross-validation, but only when in debug mode and running through PyCharm on OS X. The fix is to change to sequential execution (n_jobs = 1) but issuing a warning instead of raising an error.

@codecov-io
Copy link

codecov-io commented Jul 1, 2016

Current coverage is 87.92%

Merging #1401 into master will decrease coverage by 0.02%

@@             master      #1401   diff @@
==========================================
  Files            77         77          
  Lines          7582       7584     +2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           6668       6668          
- Misses          914        916     +2   
  Partials          0          0          

Sunburst

Powered by Codecov. Last updated by 7f464a6...0f30c0f

to evaluation methods, i.e. {}(..., n_jobs=1). Setting n_jobs to 1.
'''.format(self.__class__.__name__), OrangeWarning)
mp_queue = mp.Queue()
n_jobs = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

These two lines are probably under-indented. They should be under except. Perhaps move them directly under except above and before warning.

@BlazZupan BlazZupan force-pushed the prevent-double-commit branch from 3727dcf to d47bba7 Compare July 8, 2016 14:05
@BlazZupan BlazZupan force-pushed the prevent-double-commit branch from d47bba7 to 0f30c0f Compare July 8, 2016 14:10
@kernc kernc merged commit c882fcd into biolab:master Jul 8, 2016
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