How to resolve permission error related to DeepFace in Dataiku?
I am using DeepFace library in Dataiku. When I write code in Jupyter notebook and try to import the library, I am able to do it. But when I try to export it as python recipe and try to execute the same code it's not working. It gives me Permission Error.
How to resolve this?
Best Answer
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,070 Neuron
This error is happening since the DeepFace package is trying to write to a folder you don't have permissions to. You can see the code doing that here:
On the same file you can see the get_deepface_home() function tries to find the DEEPFACE_HOME environment variable and defaults to the current directory + .deepface which is why you get /data/dataiku/.deepface. You can try to set the DEEPFACE_HOME environment variable to a folder your user ID has full write permissions before you import deepface like this:
import os os.environ["DEEPFACE_HOME"] = "/some/folder/"
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,070 Neuron
Are you using the same code environment on both your Jupyter notebook and recipe? Please post the code snippet and error on a code block (the </> icon on the toolbar).
-
Yes, I have changed the Code Environment from Advanced Tab, still I am not able to execute it.