on 10-03-2022 3:16 PM
Hello,
Let's say I create a custom python operator named com.mycompany.myoperator
In the folder /files/vflow/subengines/com/sap/python36/operators/com/mycompany/myoperator , I have uploaded a file named mymodel.joblib
I'm trying to open this file from my python script with a coding that looks like this
with open('<filepath>', 'rb') as f:
model=load(f)
but it always fails with error message "No such file or directory".
Here are the different values I tried for <filepath>:/files/vflow/subengines/com/sap/python36/operators/com/mycompany/myoperator/mymodel.joblib
/vflow/subengines/com/sap/python36/operators/com/mycompany/myoperator/mymodel.joblib
operators/com/mycompany/myoperator/mymodel.joblib
./operators/com/mycompany/myoperator/mymodel.joblib
../operators/com/mycompany/myoperator/mymodel.joblib
mymodel.joblib
Thanks for your help
Hi Michael,
If you're using a custom dockerfile for your custom operator you should be able to copy the file to the local home dir within the dockerfile. Adding a line like...
COPY mymodel.joblib /home/vflow/mymodel.joblib
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.