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 bug within _run_thread_job #26

Merged
merged 2 commits into from
Dec 8, 2020

Conversation

AlessandroMiola
Copy link
Contributor

Hi @cgnorthcutt,
this PR is intended to fix the incorrect behaviour highlighted within this issue wrt the handling of the best estimator and whose solution was somehow suggested in the issue itself. Indeed, it can be noticed that also sklearn cross-validation functions (see here) do clone the estimators before fitting (thus training a clone on each fold so as to make sure all folds are independent).

Eventually, it still does not solve the problem arising whenever parallelize parameter is set to True (default).

@codecov
Copy link

codecov bot commented Dec 7, 2020

Codecov Report

Merging #26 (0b5daaf) into master (0bea8a0) will decrease coverage by 1.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
- Coverage   72.78%   71.69%   -1.09%     
==========================================
  Files           3        3              
  Lines         158      159       +1     
==========================================
- Hits          115      114       -1     
- Misses         43       45       +2     
Impacted Files Coverage Δ
hypopt/model_selection.py 71.15% <100.00%> (-1.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bea8a0...0b5daaf. Read the comment docs.

@cgnorthcutt
Copy link
Owner

Looks good. Thank you for your contribution @AlessandroMiola and for mentioning that the parallelization issue still remains. Merging.

@cgnorthcutt cgnorthcutt merged commit 8fae7cd into cgnorthcutt:master Dec 8, 2020
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