You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now copy the model.pkl file and paste into the ``model_artifact_folder`` folder. And open the score.py in the ``model_artifact_folder`` folder and add implement the ``load_model`` function. You can also edit ``pre_inference`` and ``post_inference`` function. Below is an example implementation of the score.py.
225
+
Now copy the model.pkl file and paste into the ``model_artifact_folder`` folder. And open the score.py in the ``model_artifact_folder`` folder to add implementation of the ``load_model`` function. You can also add your preprocessing steps in ``pre_inference`` function and postprocessing steps in ``post_inference`` function. Below is an example implementation of the score.py.
248
226
Replace your score.py with the code below.
249
227
250
228
.. code-block:: python3
251
-
:emphasize-lines: 28, 29, 30, 31, 122
229
+
:emphasize-lines: 28, 29, 30, 31, 123
252
230
253
231
# score.py 1.0 generated by ADS 2.8.2 on 20230301_065458
254
232
import os
@@ -396,7 +374,7 @@ Replace your score.py with the code below.
396
374
)
397
375
return {'prediction': yhat}
398
376
399
-
Save the score.py and now call verify to check if it works locally.
377
+
Save the score.py and now call ``.verify()`` to check if it works locally.
400
378
401
379
.. code-block:: python3
402
380
@@ -409,3 +387,25 @@ After verify run successfully, you can save the model to model catalog, deploy a
0 commit comments