-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add run_pyfunc_model() to build and run pyfunc model locally #514
Conversation
left a bunch of question, mostly around UX. No major concern and overall it LGTM. With these, user should be able to run docker build + deploy pyfunc locally to test. Just to confirm, does this works for pyfunc v1/3? |
-> Just to confirm, does this works for pyfunc v1/3? Yes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let one more comment if we can hide start_server
from the example at least, so user are only expose to
merlin.run_pyfunc_model(model) #local
merlin.deploy(version) #remote
Description
To improve the user experience in developing the PyFunc model, I'm adding a new
merlin.run_pyfunc_model()
helper function to build and run the PyFunc model's Docker image locally. The new function has the similar arguments asmerlin.log_pyfunc_model()
.Currently, merlin-sdk has (outdated)
ModelVersion.start_server()
that also can be used to run standard and PyFunc models locally. However, there are some drawbacks to the current implementation:start_server()
function, users need to connect to the Merlin server, create a project (if not created yet), create a new model version, and log the model artifacts to the remote MLflow tracking server. This could lead to some unfinished model versions getting uploaded onto the Merlin and MLflow servers.start_server()
will download the artifacts from the MLflow tracking server first to be used to build the Docker image locally.The new
merlin.run_pyfunc_model()
is more straightforward as it can build and run the pyfunc model without creating a new model version and uploading the model artifact:Modifications
run_pyfunc_model()
inpyfunc
packagepyfunc.run_pyfunc_model()
into merlin's__all__
so it can be called viamerlin.run_pyfunc_model()
ModelVersion.start_server()
to usepyfunc.run_pyfunc_model()
for PyFunc modelpyfunc/examples
folderTests
Checklist
Release Notes