[ENH] added update capability in GridSearchCV and RandomizedSearchCV#1053
Conversation
fkiraly
left a comment
There was a problem hiding this comment.
Thanks, good start!
Some change requests:
- please do not store the data by default, this causes memory leaks in current code. Instead, make the default option the current one - no update happens - and only store data if a strategy is chosen that requires this.
- No pull request is ready without docstrings. Please update the docstrings properly.
f4d92ba to
ead7a7f
Compare
|
Thanks for the review - both points are addressed |
ead7a7f to
cfcd5f3
Compare
fkiraly
left a comment
There was a problem hiding this comment.
Nice!
I think the tag capability:update is not correctly set though?
If full_refit, it should be True; if no_update, it should be False, If inner_only, it should be clone the tag of the inner estimator.
Currently, it is always cloned.
The class tag (in _tags) should be True, since for some setting of parameters the capability is True.
cfcd5f3 to
dea895d
Compare
|
Thanks @fkiraly for catching this. Sorry I overlooked the capability:update tagging in the first pass. I have pushed a fix that sets the class tag to True in _tags and sets the instance tag from update_behaviour: False for no_update, True for full_refit, and clones from the inner estimator for inner_only. Happy to adjust if anything else should change. |
update capability in GridSearchCV and RandomizedSearchCV
update capability in GridSearchCV and RandomizedSearchCVupdate capability in GridSearchCV and RandomizedSearchCV
Reference Issues/PRs
#1050
What does this implement/fix? Explain your changes.
This add the update capability for GridSearchCV and RandomizedSearchCV
BaseGridSearch:
GridSearchCV:
RandomizedSearchCV:
Does your contribution introduce a new dependency? If yes, which one?
No
What should a reviewer concentrate their feedback on?
Did you add any tests for the change?
Any other comments?
PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
skproroot directory (not theCONTRIBUTORS.md). Common badges:code- fixing a bug, or adding code logic.doc- writing or improving documentation or docstrings.bug- reporting or diagnosing a bug (get this pluscodeif you also fixed the bug in the PR).maintenance- CI, test framework, release.See here for full badge reference
For new estimators
docs/source/api_reference/taskname.rst, follow the pattern.Examplessection.python_dependenciestag and ensureddependency isolation, see the estimator dependencies guide.