[FIX] Lin and Log Regression: Prevent double commit #1401
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.