Discover all of the brand-new features and improvements to existing capabilities in the Dataiku 11.3 updateLET'S GO

FileNotFoundError when trying to get predictions from Python Function API deployed

sujayramaiah
Level 2
FileNotFoundError when trying to get predictions from Python Function API deployed

We have a model which should predict in real time.
Since we have a lot of custom data pre-processing steps in the flow, we have included all the steps as scripts in the library and have imported the scripts using a python function.
We have deployed an API service with a python function end point.

When trying to get a prediction from a model which has been deployed to the flow, we are seeing this error.

Failed: Failed to run function : <class 'FileNotFoundError'> : [Errno 2] No such file or directory: '/data/dataiku/data_dir/saved_models/ML_EDA/<ModelID>/versions/16635986036/core_params.json'

Can we include the model in the Deployer node?
We are not seeing the model export option to possibly add the model into a managed folder.
Can you please suggest an alternative way to achieve this?

Thanks

--------------------------------------------------------------------------------

I was not able to post a reply to this thread.

We were able to resolve this issue by deploying the model as a prediction end point under the same parent service and invoking the prediction service from the python code of the other end point using the code snippet shown below:

from dataiku.apinode import utils

apinodeclient = utils.get_self_client()
prediction = apinodeclient.predict_record("<EndPoint>","<features>", with_explanations=True)


Operating system used: Linux

0 Kudos
0 Replies