Updating project-template to recent versions
#95
+20
−10
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.
When following the instructions on how to define our own estimator within the sklearn framework, I went through this repo.
Although I found it quite useful, I feel like it could be improved and updated, to be in line with most recent scikit-learn versions. I believe the code is compatible with sklearn version
1.4.2. For instance, I noticed the code uses an old API for data validation, like hereproject-template/skltemplate/_template.py
Lines 76 to 81 in fc9f82e
According to this, since version
1.6.0thevalidate_dataapi is no longer part of theBase.BaseEstimatorclass, but rather inside ofsklearn.utils.validationmodule.In this pr I made this tiny change to the
_template.pysource code. I've briely run the unit tests and apart from the following errorall other 150 test cases seem to run smoothly.