Repository navigation
feat: own runtime record predictions in mlbundle - #20
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Runtime consumers can now pass a request mapping directly to
LoadedBundle.predict_record()or userow_from_record()for explanations. mlbundle owns feature-key lookup, bounded numeric-string coercion, schema nullability and output ordering. FrozenOutputPredictionrecords include report labels, probabilities or regression values, andpredicted_labelfrom the native classifier decision.Native decisions use sklearn estimator/Pipeline
predict, XGBoost wrapperpredict, CatBoost classpredict(including custom probability thresholds), and ONNX graph label outputs. Labels are validated against each output's classes; probability-only ONNX graphs returnNone. No argmax fallback is added.Exported
seriesfields now contain two orderedcolumnswithid: field1/id: field2, without child mappings. The formerfield1/field2shape is rejected. This is the sole documented mlschema adaptation for MLForm. Schema version remains 2 because no earlier exported bundle used series and format 1 is not frozen.Adds failure-only sklearn environment diagnosis through
EnvironmentMismatchErrorand a re-export hint for safe, differing manifest writer versions. Bumps package and lockfile to 0.1.0a3 and updates runtime, format and security documentation. Existing array/DataFrame restrictions, closed native loaders and container validation remain intact.Validation on Windows / Python 3.14.7:
uv run ruff check .: passed.uv run ruff format --check .: 185 files already formatted.uv run pyright: 0 errors, 0 warnings.uv run pytest: 1772 passed; 91.96% coverage.uv build: wheel and source distribution built.Real CatBoost threshold example: at threshold 0.8, positive probability 0.5684730553350195 returns native/report label
negative. Real 0.1.0a1 manifest and sklearn 1.9.1 -> 1.9.0 load failures produced the new diagnostic messages. No publishing, version tagging or merging is part of this PR.