feat: promote get_estimator to the headline exporter (roadmap 2.2) - #45
Merged
Conversation
- document get_estimator as the supported way to leave Poniard: it returns a plain sklearn Pipeline (or bare estimator) with no poniard references, retrainable on X/y. - add README section 'Exporting a model (leaving Poniard)'. - add tests: plain sklearn Pipeline, bare estimator without preprocessor, retrain requires X/y, and a pickle round-trip in a subprocess where poniard imports are blocked and PYTHONPATH is stripped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Roadmap 2.2 — promote
get_estimatorto the headline exporter: the supported way to leave Poniard with a plain scikit-learn object.Changes
get_estimatornow leads with the exporter contract — returns a plainsklearn.pipeline.Pipeline(or bare estimator withinclude_preprocessor=False) with no poniard references; documentsretrain=True+X/yfor a fitted, ready-to-predict pipeline.tests/test_get_estimator.py):sklearn.pipeline.Pipeline;include_preprocessor=Falsereturns a bare estimator;retrain=TruewithoutX/yraises;poniardimports are blocked (via abuiltins.__import__guard, robust even if poniard is pip-installed) andPYTHONPATHis stripped — asserting it unpickles as aPipelineand predicts. This is the real definition of "you can delete poniard when you're done."Full suite: 143 passed;
ruffclean.