Created
June 7, 2020 15:48
-
-
Save IvanNardini/dfbf861f560621b838e489e2430482d0 to your computer and use it in GitHub Desktop.
MLOps series #1 : Batch scoring with Mlflow Model (Mleap flavor) on Google Cloud Platform
This file contains 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
%sh | |
rm -rf /tmp/mleap_python_model_export | |
mkdir /tmp/mleap_python_model_export | |
ls -la /tmp/mleap_python_model_export | |
#Serialize Model to Bundle | |
lrModel.serializeToBundle("jar:file:/tmp/mleap_python_model_export/lrModel.zip", predictions) | |
%sh | |
ls -la /tmp/mleap_python_model_export/ | |
dbutils.fs.cp("file:/tmp/mleap_python_model_export/lrModel.zip", "dbfs:/example/lrModel.zip") | |
display(dbutils.fs.ls("dbfs:/example")) | |
#Deserialize Model to Bundle | |
deserializedPipeline = PipelineModel.deserializeFromBundle("jar:file:/tmp/mleap_python_model_export/lrModel.zip") | |
#Score | |
exampleResults = deserializedPipeline.transform(abt_test) | |
display(exampleResults) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment