Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hello,
I'm facing an issue trying to read a Dataiku Visual Model into a Python code which is a part of a webapp running in a container. I think the model call from dataiku.Model is making the correct call but it's not able to process the get_predictor() command correctly and I'm seeing a file not found error.
if i am running the webapp using local execution then it seems to work just fine the issue raises only when the webapp runs on a container
Attaching the log of the error for refrence
File "/opt/dataiku/python/dataiku/core/saved_model.py", line 202, in get_predictor
self._predictors[version_id] = build_predictor_for_saved_model(model_folder, self.get_type(), sm.get("conditionalOutputs", []))
File "/opt/dataiku/python/dataiku/core/saved_model.py", line 268, in build_predictor_for_saved_model
core_params = dkujson.load_from_filepath(osp.join(model_folder, "core_params.json"))
File "/opt/dataiku/python/dataiku/core/dkujson.py", line 36, in load_from_filepath
with open(filepath) as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/app/dataiku/DSS_DATA_DIR/saved_models/<PROJECTKEY>/<modelid>/versions/initial/core_params.json'
Hello @suhail_shaik
Thank you for reaching out.
On the attached log, the project key and model ids seem to be missing (look at the `<PROJECTKEY>` and `<modelid>` in the filepath)
The issue must probably lie in the definition of your `filepath`, could you attach the code that performs this operation ?
Cheers
Hi @MehdiH
The `<PROJECTKEY>` and `<modelid>` in the file path were deliberately added by me while posting the question here, in the actual error log the path is correct.
The code that i have used is referenced from the below documentation. and you can see that the file path is not manually given.
Interaction with saved models — Dataiku DSS 9.0 documentation
However the above code is running on a containerized execution.
Hi,
Unfortunately, it is not currently possible to use these APIs when the webapp is running in a container. You'll need to run this particular webapp locally.
Hello Clement,
Would this limitation also apply to a notebook run in a container?
Thanks!
Yes it also applies in containerized notebooks