-
Notifications
You must be signed in to change notification settings - Fork 34
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
✨ Enable to override params at predict time in KedroPipelineModel #612
✨ Enable to override params at predict time in KedroPipelineModel #612
Conversation
@Calychas This should already work, can you try? If you don't have a custom signature in your pipeline ml factory, you have nothing to change: just train normally and you should see available parameters in the signature of the model in the UI. Then do: model=mlflow.pyfunc.load_model(f"runs:/{run_id}/{artifact_path}")
model.predict(data, params={"<your_param_name>":<your_param_value>}) |
b81a082
to
fadd662
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #612 +/- ##
=======================================
Coverage 99.90% 99.90%
=======================================
Files 30 30
Lines 1054 1063 +9
=======================================
+ Hits 1053 1062 +9
Misses 1 1 ☔ View full report in Codecov by Sentry. |
@Calychas We're getting very close! I haven't had a chance to work on kedro-mlflow these past 2 months, but I'm there again. I've refactored a lot the documentation so it makes the PR messy and I will likely separate it, but It's almost good to go. |
specify signature at runtime with parameters remove unused pydantic validation class make sure that only inference params are allowed, not train ones pass runner through params fix change of default signature in tests add tests add test for runner pin mlflow>=2.7 fix changelog conflict typo
04eca21
to
64ebfd7
Compare
Update doc up doc fix tests update doc huge doc refactoring doc refactoring doc refactoring finish doc update doc
64ebfd7
to
404c0d6
Compare
And... it's on PyPI : https://pypi.org/project/kedro-mlflow/ 🚀 |
Description
Close #445, improve #587 and generalize #580.
The goal is to support inference parameters for KedroPipeline Model, in order to be able to modify inference pipeline behaviour at runtime without retraining (e.g. retraining makes no sense just to change a threshold or the temperature)
Development notes
What have you changed, and how has this been tested?
mlflow>=2.7.0
which is the lowest version that support paramsMlflowHook
to infer parameter signature from the inference pipeline of aPipelineML
. this signature is passed when logging the custom model.This is heavily tested locally with-> Fixed withmlflow==2.17
. The CI test suite fails because of unrelated #613.kedro-mlflow>=0.13.4
.Checklist
CHANGELOG.md
file. Please respect Keep a Changelog guidelines.Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":
I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.
I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.