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?
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: